These instructions show you how to set up Robot Schedule to dynamically calculate and replace specific values within the Local Data Area (LDA) of a Robot Schedule job. This requires the use of the Robot Schedule Learn process, Reserved Command Variables, OPAL (OPerator Assistance Language), and OPAL Data Area Definitions. Refer to the Robot Schedule User Guide and the Robot Schedule OPAL Reference Guide for more information about these functions. These instructions assume that a job with an LDA record already exists in Robot Schedule.
Use the following steps to create the dynamic LDA value:
Enter option 8 from the Job Schedule List to view the Local Data Area Entry panel.
From the Local Data Area Entry panel, determine which section of the LDA has to be changed. In this example, the section to be changed is in positions 101-106.
After the positions of the LDA to be changed have been determined, the LDA must be defined to Robot Schedule as a Data Area Definition.
From the Robot Schedule Main Menu, enter option 2 to go to the Scheduling Objects Menu.
Enter option 6 to go to the Robot Schedule OPAL Object Menu.
Enter option 3 to go to the Maintain Data Area Definitions panel.
Use F6 to add a new data area definition. The Data Area Definition panel displays.
Enter a Data Area Definition name and description, then enter *LDA in the Data Area field and leave the Library field blank. Press F12 to return to the Maintain Data Area Definitions panel.
On the Maintain Data Area Definitions panel, enter option 2 to go to the Data Area Definition Elements panel. This panel will be used to define the sections of the LDA to be changed.
On the Data Area Definition Elements panel, enter the beginning and ending positions of the section to be changed, the OPAL variable to be used, and a description. You must use the OPAL user variables USRFLDn, USRFLGn, USRNBRn, USRCNTn, or USRLONGn. See the Robot SCHEDULE OPAL Reference Guide for definitions and usage of the user variables.
Define a Robot Schedule Reserved Command Variable that will return the correct value to be placed in the LDA. In this example, the LDA of the Robot Schedule job requires the date 30 days ago to be placed in the LDA in positions 101-106. Robot Schedule Reserved Command Variable @@DTM30 will calculate that value. See the section "Defining Robot Schedule Reserved Command Variables" in the Robot Schedule User Guide for more information on creating Reserved Command Variables and the Robot Schedule utility programs that are provided.
Create a Robot Schedule OPAL Object that will use the Reserved Command Variable to change the value in the local data area.
From the Scheduling Objects Menu, enter option 6 to display the Robot Schedule OPAL Object Menu.
Enter option 1 to display Maintain OPAL Objects.
Use F6 to open the panel where you can create a new OPAL object.
Enter the name, description, and logging level for the new OPAL object. Make sure the When should OPAL run flag is set to 1 (Before Submission).
From the Maintain OPAL Objects panel, enter option 2 to edit the OPAL statements of the new OPAL object. On the OPerator Assistance Language panel, enter a RTVDTADFN operation to retrieve the data area value and populate the user variables entered in the data area definition.
Use a CHGTO statement to calculate the Reserved Command Variable value and replace the user variable value with the Reserved Command Variable value.
Use the CHGDTADFN (change data area definition) operation to replace the value in the data area definition with the new value in the user variable.
Compile the OPAL object according to the Robot Schedule OPAL Reference Guide.
After the OPAL object has compiled successfully, attach the OPAL object to the Robot Schedule job that contains the LDA record.
From the Job Schedule List, enter option 10 (Exception Scheduling) next to the job that contains the LDA record.
On the Exception Scheduling panel, enter the OPAL object name in the Execute schedule instructions in OPAL Object field.
Still have questions? We can help. Submit a case to Technical Support.