Previous Topic: Setting Up an Asynchronous ExecutionNext Topic: SYSADR Table Declarations for DB2


Sample Application

An example of how this feature might be used would be in a CA Ideal program to produce a report. The program CUSTLIST produces a report of all CUSTOMER rows for a particular state determined by the RUN parameter. To run CUSTLIST asynchronously, under the CUST transaction invoked from a COBOL application, perform the following tasks:

  1. Define the CUST transaction in CICS with TWASIZE=64 and PROGRAM=SC00NATD.
  2. Assemble SCASTRAN.
    SCASYNTB TYPE=INITIAL                  
     SCASYNTB TYPE=ENTRY,                  
    	TRANID=CUST,                   
    	TRNDATA='ORDCUSTLIST0001Y',            
    	DFLTUSR=ASY                    
     SCASYNTB TYPE=FINAL
    

    The CUSTLIST program version 1 in the system ORD expects a RUN parameter. The ASY user ID must be defined with specific authorization to run a program in system ORD, even if the ASY user ID has been defined with administrator authority.
    Note: Continuation characters must be in column 72.

  3. Start transaction CUST and provide a RUN parameter from a COBOL CICS Command Level program.
     ...
           DATA DIVISION.
           WORKING-DATA SECTION.
           01  WOR-DATA   PIC X(2) VALUE 'TX'.      
           PROCEDURE DIVISION. 
           ...     
           START-IDEAL.              
             EXEC CICS START       
               TRANSID('CUST')
               FROM(WOR-DATA)
               LENGTH(+2)    
             END-EXEC.             
           ...   
    

If the report output was directed to DEST LIB, it would be under the ASY user ID as specified by the DFLTUSR parameter in the SCASTRAN entry.