Interfacing Robot/SCHEDULE With JBA
The following procedures discuss scheduling JBA jobs through Robot/SCHEDULE.
Robot/SCHEDULE’s Learn Feature
The Learn feature can be used to capture the JBA setup. You can enter the JBA menu system and turn Learn on. Then, any tasks you submit using the SBMJOB command automatically become part of the Robot/SCHEDULE database.
Note: Robot/SCHEDULE’s Learn feature can be used only from an iSeries or AS/400 command line. The Learn feature cannot be used within the Robot/SCHEDULE GUI environment.
- Enter the following command on the command line in the JBA menu system:
- ROBOTLIB/RBTSTRLRN (ENTER)
- Find the menu option that you want to learn into Robot/SCHEDULE. You must fill out all of the parameters that you need and submit the task to batch. Learn puts the information into Robot/SCHEDULE’s data base, but does not submit the job.
- After you have learned in the jobs you need, execute RBO and choose the option to go into Robot/SCHEDULE. Option 1 on the main menu takes you into the job schedule list. You should see the jobs you added from the JBA menu system.
- You can apply any of the Robot/SCHEDULE features to these jobs. See the Robot/SCHEDULE User Guide for more information about using Robot/SCHEDULE.
Note: JBA sometimes clears the library QTEMP. This can cause problems with the LEARN process. The Learn process may get an error trying to clear the object RBTWK out of QTEMP. If this occurs, please restart the command above.
Command Examples of a Robot/SCHEDULE Job Running JBA
The following are example command lines entered to run a JBA job through Robot/SCHEDULE. After learning the JBA job, you can edit the Robot/SCHEDULE Command Entry panel for the job. Display it by selecting the job with option 3 from the Robot/SCHEDULE Job Schedule List.
- Sequence 7 through 20 must contain the command CHGSYSLIBL. JBA expects all of these libraries to be in the system portion of the library list. There are two other ways to do this. You could replace all 6 lines with a CL program that could do this for you. This would speed up the entry process for new Robot/SCHEDULE jobs.
- Sequence 21 is the CHGDTAARA command. JBA passes its parameters in an LDA (local data area). This command is being used to modify a date; every time the job runs it puts today’s date in this position of the LDA. If you need to modify more than one spot of the LDA, you will need multiple CHGDTAARA commands. In the Value parameter we have the value of @@DATE, which is a Robot/SCHEDULE Reserved Command Variable. There are many Reserved Command Variables shipped with Robot/SCHEDULE for calculating today’s date plus or minus so many days.
- Sequence 30 is the call to the JBA processing program, which starts processing the various batch programs that you will be running. This command is created by Robot/SCHEDULE when you learn the JBA job.
- Sequence 40 is the command RBTBCHUPD, which is a feature of Robot/SCHEDULE. It is an API that can update the values in any Robot/SCHEDULE job. In this case it is optional, but highly recommended. In this example, we process the JBA job and then use RBTBCHUPD to update the Robot/SCHEDULE data base with the values used in the LDA so you can see if the job’s LDA was correct.
Another alternative is to permanently put these libraries in your system library list on your system. Then you would not have to add these libraries at all. You should call JBA first to make sure that this is okay. We did not test this.
If you do not understand LDA or Reserved Variables, see the Robot/SCHEDULE User Guide.

LDA Entry Panel
This panel can be used to view the layout of the LDA in a JBA job. Display it by selecting the JBA job with option 8 from the Robot/SCHEDULE Job Schedule List. Every time the job runs via Robot/SCHEDULE, the job starts in batch with the values that are in this panel. In step 2, we used the Robot Command Entry panel to modify the LDA. In the Local Data Area Entry panel, you can change the contents of the LDA by just typing over a value.
Note: For parameters that must change every day, we recommend using Reserved Variables. The procedures in the Command Entry area should be used for parameters that must change every time you run the job.

Job Control Panels
This panel establishes the work management objects that will be used to control objects, such as library lists, job descriptions, job queues etc. The only parameter we modify for each learned job is the Current Library parameter. This must be ROBOTLIB so that ROBOTLIB is always in the job’s library list. Without this value, the JBA jobs will get errors when passing control of running the job back to Robot/SCHEDULE. Display this panel by the selecting the JBA job with option 5 from the Robot/SCHEDULE Job Schedule List.




