Asynchronous Execution With Ideal
search cancel

Asynchronous Execution With Ideal

book

Article ID: 28290

calendar_today

Updated On:

Products

Datacom DATACOM - AD Datacom/AD Datacom/DB

Issue/Introduction

Earlier releases of Ideal supported asynchronous execution (runs without a real terminal) by the artifice of using a "sequential" Terminal Control Table Entry defined to CICS. This was an unsatisfactory workaround for various reasons.

    • It was not possible to pass a RUN parameter directly. Various methods for storing data for the application to pick up were possible, but required extra non-Ideal code either as a subprogram in the Ideal run-unit, or in the invoking routine, or both.
    • It was impractical to trigger the application from a Transient Data queue, or external message source.
    • Failure of a run using a sequential terminal could leave internal resources unavailable, leading to such errors as GKU return codes from Datadictionary. Some problems could put the terminal out of service, requiring manual intervention to reinstate it.
    • A custom solution was needed to make VPE permit execution at a sequential terminal instead of a 3270 type device.
  • The applications requesting the asynchronous service had a single server (the sequential device) to which they could pass the work. If more than one was set up, extra code was required to choose an available terminal to process the work.

This led us to introduce a new asynchronous transaction driver that combined the functions of SC00SAST (used for asynchronous compilations) and SC00INIT (the terminal-based driver) which can be used without any terminal at all and eliminates the need for the site-specific VPE solutions.

SC00NATD uses its own transaction table SCASTRAN, which is similar in function to SC00TRAN, to determine which Ideal program to run for a given CICS transaction ID. It handles the retrieval of parameter data passed on the START request, if any, and uses it to build a RUN command to start the Ideal execution.

This new module was provided with maintenance level 9707. It has been enhanced a number of times since to make the parameter optional, allow it to be triggered from a TD queue, and to allow a signon member to be executed to set certain options, such as decimal and currency options.

Resolution

Setting up asynchronous execution

Add CICS PPT entries for modules SC00NATD and SCASTRAN with LANG=ASM, RES=NO and EXECKEY=USER. (Module SCASTRAN will be assembled in Step 2 below.)

Setting up an Ideal asynchronous run:

  1. Add an entry in SCASTRAN that specifies the following: - TRANID=xxxxxxxx = 4-character transaction ID for the Ideal program- TRNDATA='sssppppppppvvvv'sss = 3-character system name where the program residespppppppp = 8-character program name (padded with blanks)vvvv = version number of the program or PROD- DFLTUSR=uuu
    uuu = 3-character user IDIMPORTANT: This user ID MUST be given RUN-PROD authority in the system sss above, even if it also has Ideal Administrator authority.
  2. Assemble SCASTRAN.
    MVS sample JCL://JOBCARD
    //*
    //* ASSEMBLE/LINK TO USERLOAD//*//ASMSTP EXEC PGM=ASMA90,PARM='DECK,NOOBJ',REGION=2048K//SYSLIB DD DSN=your.ipc42.MACLIB,DISP=SHR <<===//SYSUT1 DD DSN=&&SYSUT1,SPACE=(1024,(120,120),,,ROUND),
    // UNIT=VIO,DCB=BUFNO=1//SYSPUNCH DD DSN=&&ASMOBJ,UNIT=SYSDA,
    // SPACE=(3120,(400,100),RLSE),// DISP=(,PASS),// DCB=BLKSIZE=3120//SYSPRINT DD SYSOUT=*//SYSIN DD *SCASYNTB TYPE=INITIALSCASYNTB TYPE=ENTRY, X TRANID=xxxx, X TRNDATA='sssppppppppvvvv', X DFLTUSR=uuuSCASYNTB TYPE=FINAL//LNKSTP EXEC PGM=HEWLKED,COND=(5,LT,ASMSTP),// PARM='LIST,LET,XREF,MAP'//SYSLIN DD DSN=&&ASMOBJ,DISP=(OLD,DELETE)
    // DD DDNAME=SYSIN//SYSLMOD DD DSN=your.ideal.load.library,DISP=SHR <<===//SYSUT1 DD DSN=&&SYSUT1,SPACE=(1024,(120,120),,,ROUND),
    // UNIT=VIO,DCB=BUFNO=1//SYSPRINT DD SYSOUT=*//SYSIN DD *
    NAME SCASTRAN(R)//
      • Any messages other than internal errors which are always recorded in ADRLOG will not be available for an asynchronous run. Ideal programs that run asynchronously will not be attached to a terminal; therefore, any TRANSMIT or NOTIFY statements are invalid for this type of run.Add a PCT entry for the asynchronous Ideal transaction (TRANID specified in Step 1.) This PCT entry should point to the new module SC00NATD and should be defined with TWASIZE=64. Note: This PCT entry will not appear when the Ideal command 'DISPLAY PCT' is issued.
      • RUNLIST and REPORT output directed to destination LIBRARY will be routed to the user ID specified by the DFLTUSR parameter in SCASTRAN.

    • This asynchronous run is similar to a run started within Ideal by the INITIATE statement. A single 01-level RUN parameter can be passed to the Ideal program: (a group field cannot be passed). The fact that we are internally building a RUN command limits the length of the string to 43 bytes, the same limit you would have if you typed the command into a terminal.

Example:

Ideal program CUSTLIST will produce a report of all CUSTOMER rows for a particular state determined by the run parameter. To run Ideal program CUSTLIST asynchronously (under transaction CUST) started from a non-Ideal application:

  1. Define a PCT entry for the asynchronous transaction - TRANSID=CUSTPROGRAM=SC00NATDTWASIZE=64
  2. Assemble SCASTRAN - SCASYNTB TYPE=INITIALSCASYNTB TYPE=ENTRY,TRANID=CUST,TRNDATA='$IDCUSTLIST0001',DFLTUSR=ASY
    SCASYNTB TYPE=FINAL
  3. Start transaction CUST and provide a RUN parameter - ... COBOL CICS Command Level program01 WOR-DATA PIC X(2) VALUE 'TX'.PROCEDURE DIVISION.START-IDEAL.EXEC CICS STARTTRANSID('CUST')FROM(WOR-DATA)LENGTH(+2)END-EXEC....
  4. The SIGNON member for user ASY could be set up to establish any run-time options that differ from the site defaults. For example: SET ENV DATEFOR 'YEAR, LCMON DD'

 

Additional Information

Information on Asynchronous Transactions can be found in Chapter 15 of the Ideal Administration Guide.