Using the AATWAIT program for testing Continuous State Manager or the MainView Total Object Manager

MainView AutoOPERATOR distributes the AATWAIT program in hilevel.BBLINK that you can use to easily create test Started Tasks (STCs). This is a small program that consumes minimal resources.

Having the capability to easily and quickly create a set of test STCs can be helpful when you want to test proposed changes prior to making the changes to the Continuous State Manager or MainView Total Object Manager applications. By using the AATWAIT program, you can verify that your changes have the desired effect without affecting the production level objects.

After you invoke AATWAIT, it runs for a specified length of time; the default is forever. You can also control these aspects of the program:

  • specify stopping the program after a specified number of minutes or seconds, which you set with the RUN(minutes) parameter (for minutes) or the RUS(seconds) parameter (for seconds)

  • specify stopping the program after a specified number of minutes or seconds and issuing a specified abend code. To specify the abend code and the time span, use ABENDU( code) with either RUN(minutes) or RUS(seconds).

  • stop the program prematurely by issuing the MVS Stop command for the address space; it will stop either normally or with the user abend code that you specified with the ABENDU(code) parameter.

  • specify a number of seconds that simulates a task startup delay, after which a startup completed message (AA2107I) is issued to confirm that the task is ready

  • specify a number of seconds that simulates a task shutdown delay (which issues message AA2113I), followed by message AA2108I to confirm that the task has shut down normally.

  • issue a MVS Cancel command to cause this program to terminate with a system abend code such as abend S222

These capabilities allow you to make the test STCs simulate real-world conditions. When invoking the AATWAIT program, you can use any of the following optional parameters:

  • RUN(minutes) specifies when to stop the program, in number of minutes.

    Replace minutes with any value from 0 through 999999. RUN(0), the default, tells the program to run without stopping.

    Valid values are 0 through 999999 minutes.

  • RUS(seconds): sspecifies when to stop the program, in number of seconds. If not specified, the value of the RUN(minutes) is used

    Replace seconds with 0 or with any value from 2 through 999999. RUS(0), the default, tells the program to run without stopping.

    You cannot specify 1 second.

    Note

    The RUN() and RUS() parameters are mutually exclusive; you can specify only one, or you can omit both.

  • ABENDU(code) specifies that the program issues the specified abend code when stopped.

    Valid values for code are NONE or any abend code from 0 through 4095. The default, NONE, means the program ends normally.

  • WSTART(seconds) specifies the number of seconds between when the task starts and when it issues the startup complete message (AA2107I).

    Replace seconds with any value from 1 through 999999.

    Choose a value that simulates the processing time for your task startup, after which the task is ready. If you omit this parameter, the task starts after a 5-second delay (the default) and does not issue message AA2107I. To receive AA2107I, you must specify this parameter.

  • WSTOP(seconds) specifies the number of seconds between the start of task termination and its completion.

    Replace seconds with any value from 1 through 999999.

    Choose a value that simulates the shutdown processing time for a task.

    If you specify this parameter, the task issues message AA2113I when shutdown starts and AA2108I when it completes. In contrast, if you omit this parameter, the task stops immediately upon receipt of a STOP command, or when the time specified by RUN(minutes) or RUS(seconds) has elapsed; in this case, no messages are issued.

    One STC procedure in PROCLIB should suffice no matter how many test objects you need to create. Customize the sample JCL shown in the following figure with information from your installation environment.

    Sample JCL

    //WAIT PROC RUN=,           run time (minutes)        
    //          RUS=,           run time (seconds)         
    //          ABEND=,         user ABEND code
    //          WSTART=,        start delay (seconds)
    //          WSTOP=          shutdown delay (seconds)
    //*
    //* AutoOPERATOR 7.3.00
    //* Program for AutoOPERATOR CSM and TOM testing
    //*
    //* RUN = default is zero; means run forever
    //*     = RUN for 0 - 999999 minutes
    //*     = RUN and RUS cannot both be specified at the same time
    //*
    //* RUS = similar to RUN but specified in seconds
    //*     = RUS(0) is 'run forever'
    //*     = RUS(nnnnnnn) supports a range of 2-999999 seconds
    //*     = if not specified, the value for RUN is used
    //*     = RUN and RUS cannot both be specified at the same time
    //*
    //* ABEND = default is none; means terminate normally
    //*       = specify a number to stop with user abend nnnn (0 - 4095)
    //*
    //* WSTART = default is none; means no start up processing delay
    //*        = valid values are 1-999999 
    //*        = when specified, message AA2107I is issued
    //*
    //* WSTOP = default is none; means no shutdown processing delay
    //*       = valid values are 1-999999 
    //*       = when specified, messages AA2113I and AA2108I are issued
    //*
    //* DON'T MAKE COPIES OF THIS PROC !!
    //*
    //* YOU CAN START A STC WITH ANY NAME YOU LIKE EG.
    //*
    //* S AAO,JOBNAME=AAOTEST1
    //* S AAO,JOBNAME=AAOTEST2
    //* S AAO,JOBNAME=AAOTEST3,RUN=5
    //* S AAO,JOBNAME=AAOTEST4,RUN=5,ABEND=10
    //* S AAO,JOBNAME=AAOTEST5,ABEND=20
    //* S AAO,JOBNAME=AAOTEST6,RUS=75,WSTART=15
    //* S AAO,JOBNAME=AAOTEST7,RUN=5,WSTART=15,WSTOP=10
    //*
    //STEP01 EXEC PGM=AATWAIT,
    //   PARM='(RUN(&RUN) ABENDU(&ABEND),WSTART(&WSTART)',
    //        'WSTOP(&WSTOP) RUS(&RUS)')
    //STEPLIB DD DISP=SHR,DSN=hlq.BBLINK

    For example, assuming the PROCLIB member is called AAO, you can start multiple STCs with any desired jobnames as shown in these examples:

    S AAO,RUN=100
    S AAO.AAOTEST1,ABEND=0
    S AAO,JOBNAME=TEST2
    S AAO,JOBNAME=TEST3,RUN=3
    S AAO,JOBNAME=TEST4,ABEND=5
    S AAO,JOBNAME=TEST5,RUN=5,ABEND=6

    In the example shown below, the option to terminate the program with user abend code 1 specified. WSTART and WSTOP simulate task startup and shutdown processing delays.

    If WSTART is not specified, message AA2101I may be viewed as a typical 'ready for work' message. This message is issued 5 seconds after the program starts, to simulate a startup delay.

    This STC was manually stopped with an MVS STOP command, and the resulting message is AA2102I. Because of the WSTOP value, the abend is delayed until after the AA2108I message is issued. If a value for WSTOP is not specified, the abend occurs immediately after the STOP command is received.

    Partial sample JES listing

    06.41.39 STC01251 ---- TUESDAY,   17 APR YYYY ----                                  
    06.41.39 STC01251  IEF695I START AAODL  WITH JOBNAME AAODLTST IS ASSIGNED TO USER 
    06.41.39 STC01251  $HASP373 AAODLTST STARTED                                        
    06.41.39 STC01251  IEF403I AAODLTST - STARTED - TIME=06.41.39                       
    06.41.39 STC01251  +AA2104I RUN FOR 3      MINUTES                                  
    06.41.39 STC01251  +AA2109I WSTART FOR   10   SECONDS                               
    06.41.39 STC01251  +AA2110I WSTOP FOR    10  SECONDS                                
    06.41.39 STC01251  +AA2101I ISSUE 'P AAODLTST' TO STOP THIS STC (PTF: BPI0000)      
    06.41.49 STC01251  +AA2107I STARTUP OF AAODLTST HAS COMPLETED; TASK READY           
    06.41.49 STC01251  +AA2105I STIMERM FOR 00000179 SECONDS                            
    06.41.59 STC01251  +AA2102I STOP COMMAND ACCEPTED FROM CONSOLE BAODDL2              
    06.41.59 STC01251  +AA2113I SHUTDOWN OF AAODLTST COMMENCING                         
    06.42.09 STC01251  +AA2108I SHUTDOWN OF AAODLTST HAS COMPLETED                      
    06.42.09 STC01251  IEF450I AAODLTST AAODLTST - ABEND=S000 U0001 REASON=00000000
       111                     TIME=06.42.09                                            
    06.42.09 STC01251  -JOBNAME  STEPNAME PROCSTEP    RC   EXCP   CONN    TCB    SRB  
    06.42.09 STC01251  -AAODLTST          STEP001  U0001      5      2    .00    .00    
    06.42.09 STC01251  IEF404I AAODLTST - ENDED - TIME=06.42.09                         
    06.42.09 STC01251  -AAODLTST ENDED.  NAME-                     TOTAL TCB CPU TIME=  
    06.42.09 STC01251  $HASP395 AAODLTST ENDED                                          
    ------ JES2 JOB STATISTICS ------                                                   
            1 //AAODLTST JOB MSGLEVEL=1                                            
            2 //STARTING EXEC AAODL,WSTART=10,WSTOP=10,RUN=3,ABEND=1

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Comments