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

Deleting Robot/ALERT History Automatically

Creating a Robot/SCHEDULE Reserved Command Variable

To delete Robot/ALERT history automatically using Robot/SCHEDULE, you first create a reserved command variable that calculates the date minus seven days. Then, you use that variable in the programs RBA905 and RBA906 to delete all but the last seven days of transmission and message history.

Creating a Robot/SCHEDULE Reserved Command Variable

  1. In Robot/SCHEDULE, access the Reserved Command Variable panel.
  2. In the Parameter field, enter I-007. This means you want the ISO date minus seven days.
  3. Press function key 12 to save and exit.
  4. Find the new variable in the list panel and enter a 2 next to it. This shows you a value. If the date is seven days earlier, you have defined the variable successfully.

Note: When you use a reserved command variable with programs RBA905 and RBA906, the variable must call the program RBT013 (see the panel above) to take advantage of the Year 2000-compatible date structure.

Using Programs RBA905 and RBA906

In Robot/SCHEDULE, create a command type job for the type of history you want to delete:

  • To delete Robot/ALERT transmission history, use the following command:
  • CALL PGM(RBA905) PARM(‘1940-01-01@@@@#MM#7Y00000000X’)

  • To delete Robot/ALERT message history, use the following command:
  • CALL PGM(RBA906) PARM(‘1940-01-01@@@@#MM#7Y00000000X’)

    where: PARM is 29 characters.

    • characters 1-10 are the From date in Date data type (YYYY-MM-DD) format
    • characters 11-20 are the To date in Date data type (YYYY-MM-DD) format
    • characters 21-24 are the From time
    • characters 25-28 are the To time
    • character 29 is always X

In the above examples:

  • The From date is 1940-01-01. All history from January 1, 1940 to the To date will be deleted.
  • The To date is a Robot/SCHEDULE reserved command variable that calculates today’s date minus 7 (see the previous page for information about creating the Robot/SCHEDULE reserved command variable).
  • Using a From time of 0000 and a To time of 0000 guarantees that all of the history in the specified date range will be deleted.

Note: To delete all Robot/ALERT history, specify the From date as 1940-01-01 and the To date as 2039-12-31.