CBL NOADV Identification Division. Program-id. DynSOut. Environment Division. Configuration Section. Input-Output Section. File-Control. Select RR-FICHIER assign UT-S-S8TRAC. Data Division. File Section. FD RR-FICHIER block 00000 records recording F. 01 RR00. 10 RR00-ASA PIC X(1). 10 RR00-LINE PIC X(132). Working-Storage Section. 01 W-CEEENV-PROG PIC X(8) VALUE 'CEEENV '. 01 W-CEEENV-FUNC PIC 9(8) COMP-5. 88 F-CEEENV-GET VALUE 1. 88 F-CEEENV-DEFINE VALUE 2. 88 F-CEEENV-CLEAR VALUE 3. 88 F-CEEENV-DELETE VALUE 4. 88 F-CEEENV-REPLACE VALUE 5. 01 W-CE00-FC PIC X(12). 01 W-CE00-ADDR POINTER. * 01 W-RR00-DDN PIC X(6) VALUE 'S8TRAC'. 01 W-RR00-DDN-L PIC 9(8) COMP-5 VALUE 6. 01 W-RR00-DSN PIC X(256) VALUE * 'SYSOUT(''*'')'. Z'ALLOC DD(S8TRAC) SYSOUT' . * 'DSN(DUMMY) SYSOUT(''*'')'. 01 W-RR00-DSN-L PIC 9(8) COMP-5 VALUE * 11. 22. Procedure Division. Main. * Native Cobol method : * * Set F-CEEENV-DEFINE to True * Set W-CE00-ADDR to address of W-RR00-DSN * Call W-CEEENV-PROG using W-CEEENV-FUNC * W-RR00-DDN-L * W-RR00-DDN * W-RR00-DSN-L * W-CE00-ADDR * W-CE00-FC * * IGZ0251W An invalid keyword SYSOUT was found at position 1 in * environment variable S8TRAC while processing file * RR-FICHIER in program DYNSOUT. * * BPXWDYN method : * - REMARKS : 'SYSOUT(*)' produre RC=24... * Call 'BPXWDYN' using W-RR00-DSN * Open Output RR-FICHIER Move 'Hello World !' to RR00-LINE Write RR00 after advancing page Move 'One more time' to RR00-LINE Write RR00 after advancing 3 lines . Bye. Goback . End program DynSOut.