What would the execution JCL for this program be?  In particular, where 
does module DYNAM come from, either in static linkage as shown or 
w/dynamic linkage?

IBM Mainframe Discussion List <[email protected]> wrote on 5/8/2007 
2:33:28 PM:

>        IDENTIFICATION DIVISION.
>        PROGRAM-ID.    DYNAMFIL.
>        ENVIRONMENT DIVISION.
>        INPUT-OUTPUT SECTION.
>        FILE-CONTROL.
>            SELECT VIEW-FILE
>                    ASSIGN TO DYNAMDSN.
>        DATA DIVISION.
>        FILE SECTION.
>        FD  VIEW-FILE
>            RECORD CONTAINS 80 CHARACTERS
>            BLOCK CONTAINS 0000 RECORDS.
>        01  VIEW-FILE-REC.
>            05  FILLER                  PIC X(80).
>        WORKING-STORAGE SECTION.
>        01  DYN-WORK.
>            05  DYN-POINTER   POINTER.
>            05  DYN-RC        PIC S9(9) COMP SYNC VALUE ZERO.
>        01  DYN-WORK.
>            05  DYN-POINTER   POINTER.
>            05  DYN-RC        PIC S9(9) COMP SYNC VALUE ZERO.
>            05  DYN-WORK-AREA PIC X(2000).
>        01  FILE-TEMP-DATA            PIC X(56)
>                VALUE ' THIS DATA WILL BE WRITTEN'.
>        01  WS-CURRENT-DATE.
>            05 WS-CC                  PIC X(02).
>            05 WS-DATE                PIC X(06).
>            05 WS-TIME                PIC X(13).
>        PROCEDURE DIVISION.
>            MOVE FUNCTION CURRENT-DATE TO WS-CURRENT-DATE
>            STRING 'DYNAMDSN=DSN(' DELIMITED BY SIZE
>                   'KXG.TEST.D' DELIMITED BY SIZE
>                   WS-DATE DELIMITED BY SIZE
>                   ') NEW CYL ' DELIMITED BY SIZE
>                   'SPACE(10,10) ' DELIMITED BY SIZE
>                   'CATALOG ' DELIMITED BY SIZE
>                   'MGMTCLAS(MU01DAY) ' DELIMITED BY SIZE
>                   'STORCLAS(SU0BASE) ' DELIMITED BY SIZE
>                   INTO DYN-WORK-AREA.
>            SET DYN-POINTER TO ADDRESS OF DYN-WORK-AREA.
>            CALL 'PUTENV' USING BY VALUE DYN-POINTER
>                          RETURNING DYN-RC.
>            IF DYN-RC = 0
>                OPEN OUTPUT VIEW-FILE
>                WRITE VIEW-FILE-REC
>                          FROM FILE-TEMP-DATA
>                CLOSE VIEW-FILE
>            ELSE
>                DISPLAY '**********ALLOCATED FILE FAILED*************'
>                DISPLAY 'RETURN-CODE=' DYN-RC
>                DISPLAY 'DYN-WORK-AREA = ' DYN-WORK-AREA
>            END-IF.
>            GOBACK.

-----------------------------------------
The information contained in this communication (including any
attachments hereto) is confidential and is intended solely for the
personal and confidential use of the individual or entity to whom
it is addressed. The information may also constitute a legally
privileged confidential communication. If the reader of this
message is not the intended recipient or an agent responsible for
delivering it to the intended recipient, you are hereby notified
that you have received this communication in error and that any
review, dissemination, copying, or unauthorized use of this
information, or the taking of any action in reliance on the
contents of this information is strictly prohibited. If you have
received this communication in error, please notify us immediately
by e-mail, and delete the original message. Thank you

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to