Author: smileheal
Subject: Dynamic output file creation in cobol using BPXWDYN
Posted: Thu Jun 15, 2017 10:53 pm (GMT 5.5)
Hi, i am trying to create multiple output files dynamically from a Cobol pgm using BPXWDYN routine.
But when i ran the compiled load in JCL, the files are not created after the successful job run.
Below the Cobol logic.
JCL:
Subject: Dynamic output file creation in cobol using BPXWDYN
Posted: Thu Jun 15, 2017 10:53 pm (GMT 5.5)
Hi, i am trying to create multiple output files dynamically from a Cobol pgm using BPXWDYN routine.
But when i ran the compiled load in JCL, the files are not created after the successful job run.
Below the Cobol logic.
Code: |
SELECT OP-FILE ASSIGN TO DD1 FD OP-FILE RECORDING MODE IS F LABEL RECORDS ARE STANDARD. 01 OP-REC PIC X(10). PROCEDURE DIVISION. MOVE 'ABC.BAR.DD01' TO FN. STRING 'ALLOC DD(DD1) DSN('FN') NEW ' 'CATALOG' 'LRECL(10) RECFM(F,B)' DELIMITED BY SIZE INTO WS-ALLOC-STRING CALL 'BPXDWYN' USING WS-ALLOC-STRING OPEN OUTPUT OP-FILE MOVE '123' TO OP-REC. WRITE OP-REC. CLOSE OP-FILE |
JCL:
Code: |
STEP01 EXEC PGM=ABC SYSOUT DD SYSOUT=* DD1 DD DSN=ABC.DD1 |