Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Compiler and Runtime Migration Guide


Invoking a COBOL program with an MVS ATTACH

When you invoke a COBOL main program by using an MVS ATTACH, Language Environment processes parameter lists differently than VS COBOL II.

Under Language Environment, when a COBOL program is invoked directly by using ATTACH SVC (including the invocation of a batch program by the operating system and invocation from TSO CALL/ATTACH), the parameter list is always processed as a "PARM=" style.

In VS COBOL II, when a COBOL program is invoked directly by using ATTACH SVC (including the invocation of a batch program by the operating system and invocation from TSO CALL/ATTACH), the parameter list is processed as a "PARM=" style only when:

Otherwise, register 1 and the parameter list are passed without change.

There are two ways to get compatible behavior:

  1. Change the main program to Language Environment-conforming assembler, and use PLIST=OS keyword in the CEEENTRY macro. Then have the assembler program call the COBOL program. The sample code below shows how to do this.
    ASMLE3   CEEENTRY PPA=MAINPPA,AUTO=WORKSIZE,MAIN=YES,PLIST=OS
             USING WORKAREA,13
             L     15,A1C401P         Get the addr of the COBOL pgm
             BALR  14,15              Call it with parm list unchanged
    *====================================================================
    *   Terminate Language Environment.
    *====================================================================
             CEETERM  RC=0
    MAINPPA  CEEPPA                   Constants describing the code block
    *====================================================================
    *        The Workarea and DSA
    *====================================================================
    A1C401P  DC    V(A1C401P)         VCON FOR COBOL pgm
    WORKAREA DSECT
             ORG    *+CEEDSASZ        Leave space for the DSA fixed part
             DS     0D
    WORKSIZE EQU    *-WORKAREA
             CEEDSA                   Mapping of the Dynamic Save Area
             CEECAA                   Mapping of the Common Anchor Area
             CEEEDB                   Mapping of the Enclave Data Block
             END   ASMLE3
  2. You can modify Language Environment to ensure that the parameter list processing for a COBOL main program invoked by using an ATTACH has the same behavior as when the COBOL program runs with the VS COBOL II run time. To modify the parameter list processing under Language Environment, run the sample customization job IGZWAPSX with a modified copy of IGZEPSX (the COBOL parameter list exit routine).
    For instructions on how to modify IGZEPSX see:
    • For OS/390 and z/OS: Language Environment for z/OS Customization

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)