The following procedures discuss scheduling JBA jobs through Robot Schedule.

The Learn Feature in Robot Schedule

Robot Schedule has a Learn feature that 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: The Learn feature in Robot Schedule can only be used from an IBM i (OS/400, i5/OS) command line. The Learn feature cannot be used within the Robot Schedule GUI environment.

  1. Enter the following command on the command line in the JBA menu system:


    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.

  2. 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 the Robot Schedule database, but does not submit the job.

  3. 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.

  4. 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.

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.

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.

Note: If you do not understand LDA or Robot Schedule Reserved Command Variables, see the Robot Schedule User Guide.

  • 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 a certain number of 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 database with the values used in the LDA so you can see if the job’s LDA was correct.

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. 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 Robot Schedule Reserved Command 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 selecting the JBA job with option 5 from the Robot Schedule Job Schedule List.


Still have questions? We can help. Submit a case to technical support

Last Modified On:
You don't have the appropriate permissions.
No, open a new Support Case