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

Dynamically Changing a Value in the LDA of a Robot/SCHEDULE Job

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, and OPAL Data Area Definitions. Please refer to the Robot/SCHEDULE User Guide and 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.
  3. Once the position(s) of the LDA to be changed have been determined, the LDA must be defined to Robot/SCHEDULE as a Data Area Definition.

  4. From the Robot/SCHEDULE Main Menu, enter option 2 to go to the Scheduling Objects Menu.
  5. Enter option 6 to go to the Robot/SCHEDULE OPAL Object Menu.
  6. Enter option 3 to go to the Maintain Data Area Definitions panel.
  7. Use function key 6 (F6) to add a new data area definition. The Data Area Definition panel displays.
  8. Enter a Data Area Definition name and description, then enter *LDA in the Data Area field and leave the Library field blank. Press function 12 to return to the Maintain Data Area Definitionspanel.
  9. 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.
  10. 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 OPAL Reference Guide for definitions and usage of the user variables.
  11. Define a ROBOT Reserved Command Variable that will return the correct value to be placed in the LDA. In this example, the LDA of the ROBOT job requires the date 30 days ago to be placed in the LDA in positions 101-106. ROBOT Reserved Command Variable @@DTM30 will calculate that value. See the section Defining ROBOT Reserved Command Variables in the ROBOT User Guide for more information on creating Reserved Command Variables and the ROBOT utility programs that are provided.
  12. Create a ROBOT 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 for ROBOT OPAL Object Menu, enter option 1 for Maintain OPAL Objects, and use function key 6 (F6) to create a new OPAL object.
  13. 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).
  14. 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.
  15. Use a CHGTO statement to calculate the Reserved Command Variable value and replace the user variable value with the Reserved Command Variable value.
  16. 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.
  17. Compile the OPAL object according to the ROBOT OPAL Reference Guide. Once the OPAL object has compiled successfully, attach the OPAL object to the ROBOT 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.