Previous Topic: Implementation of a Complex Resource Definition for ADABAS

Next Topic: How the PLOG Status Can Be Monitored

Starting and Stopping Methods

The way you start and stop an ADABAS resource typically depends on the state of the resource.

For example, when you start the resource after a failure, you want to find out the state of the database, close any open files, and do a cleanup.

Use a process to implement this type of complex operation method. You can, for example, create a job that performs the preliminary investigation and maintenance functions, submit the job through a process, and wait for the completion of the job before instructing the process to start the resource.

Example: Implement the Starting Method

One scenario for starting an ADABAS resource requires the detection of the completion of the PLOG Protection Log job. You can implement a process to handle the requirement.

Implement a process to start ADABAS on completion of the PLOG job

  1. Create a step to use a SYSCMD macro to check the status of the PLOG job:

     SOLVPROD--- Automation Services : SYSCMD Macro Parameter Definition ----------- Command ===> Function=BROWSE .- System Command ------------------------------------------------------------. | | | Command ..... D J,PLOG | | | | Jobname ..... PLOG | | | | Wait Time ... 30 Wait Time Expiry Return Code ... 69 | ’-----------------------------------------------------------------------------’ .- Response Message Analysis -------------------------------------------------. | S=Extended Filter | | Message Text Return Extended | | Code Filter? | | ___ PLOG NOT FOUND 0 NO | | ___ $HASP395 PLOG ENDED 0 NO | | ___ | | ___ | | ___ | | | ’-----------------------------------------------------------------------------’ F1=Help F2=Split F3=Exit F9=Swap

    The step waits for the messages and sets the return code to 0.

  2. Create a step to detect a return code of 0 and use a SYSCMD macro to start the ADABAS resource:

     SOLVPROD--- Automation Services : SYSCMD Macro Parameter Definition ----------- Command ===> Function=BROWSE .- System Command ------------------------------------------------------------. | | | Command ..... S ADABAS | | | | Jobname ..... ________ | | | | Wait Time ... 0 Wait Time Expiry Return Code ... 69 | ’-----------------------------------------------------------------------------’ .- Response Message Analysis -------------------------------------------------. | D=Delete Extended Filter S=Extended Filter | | Message Text Return Extended | | Code Filter? | | | | | | | | | | | | | ’-----------------------------------------------------------------------------’ F1=Help F2=Split F3=Ok F9=Swap F12=Cancel

    This step starts the ADABAS resource.

  3. Create a step to use the SETRC macro to set the process return code to 99.
  4. Save the process.
  5. Define the expected activation completion message rule, and specify the process as the activation process on the Activation Details panel of the ADABAS resource definition.

    The resource definition uses the process to provide the starting method.