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

Using Robot/REPLAY With JBA

Product: 
Robot/REPLAY

This Help/FACTS shows how you can use Robot/REPLAY to automate interactive JBA processes that normally require an operator to change parameters. Use this Help/FACTS with the Robot/REPLAY and Robot/SCHEDULE User Guides.

General Tips

JBA requires special libraries in the system library list to run their menu system. For these examples, we created a sample program (shown later) to handle those library lists. You can easily create this CL program and call it within a Robot/SCHEDULE job.

Security

The RBTREPLAY profile that comes with Robot/REPLAY must be authorized to the menu options that you want to run from Robot/SCHEDULE. You must either use the JBA menu security options to set this up, or you must enroll your JBA user profile into Robot/REPLAY (refer to the Robot/REPLAY User Guide for user profile requirements and enrollment information).

Make sure that the Robot/SCHEDULE job’s user profile has authority to the profile in the Robot/REPLAY object. We recommend making both profiles the same.

Batch Issues

With Robot/REPLAY, after a job is scheduled as a Robot/SCHEDULE job, be sure that the Robot/SCHEDULE job is submitted to a multi-threaded job queue. The initial Robot/SCHEDULE job must be able to submit other child jobs. If these child jobs are submitted to the same job queue, nothing executes. Some users submit Replay objects to the RBTSLEEPER subsystem, but we recommend creating your own multi-threaded job queue.

Example 1: Month-End Inventory Update

In this example we create a Replay object and edit some of its images.

  1. First, we enter the RBTRPYLIB/RPY command to display the Work with Replay Objects panel, listing the Replay objects that are built. We press function key 6 to create a new Replay object.
  2. On the Replay Object Entry Panel, we enter the object name, description, application name, user profile, and interactive command to execute.
    • We name the Replay object INV_MNTHLY.
    • The user profile must be authorized to use JBA and must be enrolled in Robot/REPLAY (for more information, see the Robot/REPLAY User Guide).
    • For the interactive command to execute, we recommend using go main, or call qcmd.
  3. Once the panels are captured and the Replay object is created, we select the Replay object with option 2 from the Work with Replay Objects panel.
  4. The Work with Replay Images panel displays, listing all of the panel images created while you learned the Replay object. From this panel, you can select a panel and change its description to something more meaningful. We recommend changing descriptions for the panels that use reserved command variables to make it easier to find them when you need to edit them.
  5. We can use option 1 to select an image to edit.

  6. From the Change Replay Image panel we can:
    • Change the name of the panel description
    • Press function key 8 to see the actual image that was learned for this panel.
  7. This is the image of panel 1, the main JBA menu. The bottom of the panel displays a description of the keys used during the learn process. Option /INC is a shortcut to the Inventory Updates Menu.
  8. We can display the remaining images of the Replay object. Notice that on the Inventory Updates Menu, we chose option 2—Month-end update.
  9. While learning the Inventory Update, we fill in the parameters we need for our company. Robot/REPLAY learns exactly what is entered.
  10. The Month End Update Confirmation panel confirms that we selected this process. This is the last panel before signing off the JBA menu system.
  11. The final step in learning a Replay object is to sign off using 90, followed by either signoff *list, or RPYENDLRN.

Example 2: Master Production Schedule

For the master production schedule, we must enter dates. In this example, we use reserved command variables to supply dynamic dates.

  1. We named this Replay object MPS_MAIN6 and start it with the go main command.
  2.  

  3. When the main menu signon displays, we execute the command call jbaprod.
  4. We’ll review some of the images in the Replay object by selecting them using option 1 from the Work with Replay Images panel. The MPS option is number 4 on the OP2 menu.
  5. The next MPS panel is the Master Production Schedule – Run Selection. In this example, we chose 01 as the Model.
  6. The production schedule requests dates as parameters for running the schedule. Robot/SCHEDULE reserved command variables supply current dates whenever the Replay object is run. Any input field on this panel can have a reserved command variable, but you cannot enter it on this
  7. panel.
  8. To enter a reserved command variable, place your cursor on the input field and press function key 4 to display a pop-up window listing reserved command variables you can select. (You must be in Edit a Replay Object mode.)

  9. This pop-up window displays when you press function key 4. You can either type in the reserved command variable or press function key 4 again to display the list. If you cannot find the reserved command variable you need, you can create one (see the Robot/SCHEDULE User Guide).
  10. In this example, our customer created reserved command variable, @@DAT360. When this Replay object runs, the variable will be replaced with the date that is 360 days from the run date.

  11. In this image, we ended the learn process by signing off using option 90, followed by either signoff *list, or RPYENDLRN.

Example 3: Scheduling MRP

MRP is a business function that should be scheduled to run after hours. In this example we show some of the critical panels that we captured during the Replay learn process to create and schedule MRP, and how we used Robot/SCHEDULE during and after the learn process.

  1. First, we display the OS/400 main menu with go main.
  2. Then, we call the main JBA menu with call jbaprod.
  3. When we “learned” the Replay object for MRP, we captured six panels. We’ll look at panel number 4 because it needs reserved command variables for dates. We select it using option 1.
  4. On the MRP Run Options panel, we need dates to run the update process. Some reserved command variables have already been substituted into this panel. You can move your cursor to these positions and press function key 4 to see the actual reserved command variable.
  5. Our customer built a reserved command variable called @@DATE2, which will be replaced by the current date at run time.
  6. Next, we use Robot/REPLAY’s interface to Robot/SCHEDULE to schedule the Replay objects to run unattended. From the Work with Replay Objects panel, we select option 7 to schedule a command job in Robot/SCHEDULE. The Replay objects can take on attributes as a group job, reactive, date, dayno, or a simple day-of-the-week job.
  7. When the Initial Job Setup panel displays, we enter the times and days for the job to run.

  8. Now we press function key 10 to display the ROBOT Command Entry panel. Initially the MRP_MAIN6 Robot/SCHEDULE Job has one command, RPYEXECUTE, which runs the Replay Object MRP_MAIN6. We need to add another command that calls the program JBALIBS and sets up the system library list for JBA applications. We also need to reorder these commands so the program call is the first command in the list.
  9. We use option 7 to insert the following command to call the JBALIBS program. (You must create this program yourself—see the sample on the following page.)
  10. CALL PGM(MFGPGMLIB/JBALIBS)

  11. Now, we must reorder the sequence of numbers so that the program call comes before the RPYEXECUTE command. We decided to use 11 and 50 as the sequence numbers. (Leaving a numeric gap makes it easier if we need to add steps later.) When we are finished, the MRP_MAIN6 job contains the commands shown below.
  12. It’s time to exit and start Robot/SCHEDULE. We press function key 3 to return to the Robot/REPLAY initial panel.
  13. We will use Robot/SCHEDULE to specify the job queue and check our results. First, we start Robot/SCHEDULE and select option 1, job Schedule List, to display the Job Schedule List panel. Next, we use option 5 for the Robot/SCHEDULE job MRP_MAIN6 to display it in the Control Options panel.
  14. On the MRP_MAIN6 Control Options panel, we enter the job queue where we want the Replay object to run. We start the Replay object in a multi-threaded job queue (recommended).
  15. When we are finished, we press function key 3 to return to the Job Schedule List panel.

  16. On the Job Schedule List panel we use option 3 to display the ROBOT Command Entry panel and verify that MPS_MAIN6 is scheduled the same way as MRP_MAIN6.

 

Updated July 9, 2004