Help/Systems SEQUEL Software PowerTech Skybot Software ShowCase
Help/Systems
The World's Leader in IBM iSeries Software Solutions

Using Robot/REPLAY with BPCS

Product: 
Robot/REPLAY

Before You Begin

This Help/FACTS provides an example of using Robot/REPLAY to capture and automate an interactive BPCS process. If you have any questions about using Robot/REPLAY to automate this, or other processes, call Help/Systems Technical Support at 952-933-0609.

Note: You can automate any process that can be typed at a terminal. Before you start the Robot/REPLAY learn process, practice using the application you want Robot/REPLAY to learn. By knowing how to navigate your application’s menu system, you avoid capturing unnecessary screens.

Security

  • The user profile that will run the object must be enrolled in Robot/REPLAY.
  • The user profile that runs Robot/REPLAY must be signed on to the iSeries (Power Systems, System i, AS/400) with *ALLOBJ authority.

Scheduling and Job Queues

You use Robot/SCHEDULE, the job scheduler, to schedule your Replay object to run. This allows you to automate many processes that used to require human intervention. However, when Robot/SCHEDULE submits a Replay object to batch, the Replay object waits in batch until all batch processes that it submits have finished (this is why you will see batch jobs waiting in the background on the system until all activity is finished). Therefore, we recommend submitting the Replay object to a multi-threaded job queue.

Example of Robot/REPLAY Learning an Interactive BPCS Job

  1. First, we start Robot/REPLAY by entering the command RBTRPYLIB/RPY on a command line.
  2. Press function key 6 to create a new Replay object.
  3. From the Replay Object Setup panel that appears, we tell Robot/REPLAY which command to execute first. In the example, we type go main to access the Main Menu. Then, tell Robot/REPLAY the specific device to run the object, or specify *ANY. Because we specified a device, we can also indicate whether Robot/REPLAY should use any device, or cancel if the device cannot be allocated. Then, we press Enter.

  4. On the Learn Replay Object panel, we change the default from 0 to 1 to allow jobs to be submitted during the Replay Learn session. Then, we press Enter to have Robot/REPLAY start learning.

  5. We are now in the Robot/REPLAY interactive learn session. On the Main Menu that appears, we enter the command go bpcs1 to tell Robot/REPLAY how to get to the initial BPCS menu and be signed in to the BPCS application. Then, we press Enter.

  6. On the BPCS Menu, we type 1 to access the BPCS test environment and press Enter.

  7. In the BPCS Test Environment, we type SYS to access the BPCS System Function module and press Enter.

  8. On the System Functions menu, we select option 23, System Reorgs menu, by typing 23 and pressing Enter.

  9. On the System Functions menu, we select option 2, Reset On Order, Allocated (to run job INV971), by typing 2 and pressing Enter.

  10. On the Test Environment panel, we press Enter to run the INV971 job. When the job has finished, we press function key 3 to exit the BPCS menus.

  11. When we return to the Main Menu, we type signoff *list to end the Replay session. Robot/REPLAY has learned how to run BPCS job INV971. Now we can schedule and run this interactive job automatically.

IMPORTANT—Checking For Records

If you create a Robot/REPLAY object using a job that runs a query to select records, be aware of the following concern: If no records exist that meet the query’s criteria, different screens will appear, the path the Replay object follows will change, and the Replay object will fail. This can be a problem for any Replay object that checks for records. There are two ways to avoid this situation:

  • Use OPAL® (OPerator Automation Language®) to create a program that checks to see whether records exist to be processed. If the program finds no records to process, it does not run the Replay object. You would use logic such as IF OBJSTS EQ EXISTS AND OBJSTS EQ RECORDS AND OBJSTS NE LOCKED to determine whether to run the Replay object. For more information, refer to the Retrieve Object Status example in the Check Current Status section of the Robot/SCHEDULE OPAL Reference Guide.
  • Create a BPCS program to populate a data area with a value indicating whether or not the file the Replay object will process has records. Then, create an OPAL program that determines whether to run the Replay object based on the contents of the data area. You would use logic such as IF USRFLD EQ 1 (1 meaning that records exist), run the Replay object. For more information, refer to the Retrieve Data Area Definition example in the OPAL Operations section of the Robot/SCHEDULE OPAL Reference Guide.

 

Updated March 8, 2013