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:

  1. Enter option 8 from the Job Schedule List to view the Local Data Area Entry panel.

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

  3. From the Robot Schedule Main Menu, enter option 2 to go to the Scheduling Objects Menu.

  4. Enter option 6 to go to the Robot Schedule OPAL Object Menu.

  5. Enter option 3 to go to the Maintain Data Area Definitions panel.

  6. Use F6 to add a new data area definition. The Data Area Definition panel displays.

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

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

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

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

  11. Create a Robot Schedule OPAL Object that will use the Reserved Command Variable to change the value in the local data area.

    1. From the Scheduling Objects Menu, enter option 6 to display the Robot Schedule OPAL Object Menu.

    2. Enter option 1 to display Maintain OPAL Objects.

    3. Use F6 to open the panel where you can create a new OPAL object.

  12. 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).

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

  14. Use a CHGTO statement to calculate the Reserved Command Variable value and replace the user variable value with the Reserved Command Variable value.

    ]

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

  16. Compile the OPAL object according to the Robot Schedule OPAL Reference Guide.

  17. After the OPAL object has compiled successfully, attach the OPAL object to the Robot Schedule job that contains the LDA record.

    1. From the Job Schedule List, enter option 10 (Exception Scheduling) next to the job that contains the LDA record.

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

Last Modified On: March 08, 2018