This product assists you in generating test data or files for testing. Consider the following COBOL program:
000100 IDENTIFICATION DIVISION. 000200 000300 PROGRAM‑ID. DATAGEN. 000400 AUTHOR. J. DOE. 000500 INSTALLATION. DATACEN. 000600 REMARKS. 000700 000800 000900 ENVIRONMENT DIVISION. 000901 INPUT‑OUTPUT SECTION. 000902 FILE‑CONTROL. 000910 COPY OUTFILE. 001000 001100 DATA DIVISION. 001200 001300 FILE SECTION. 001400 COPY OUTREC. 001500 001600 PROCEDURE DIVISION. 001700 BEGIN. 001800 OPEN OUTPUT OUT‑FILE. 001900 0100‑WRITE‑IT. 002000 WRITE OUT‑RECORD. 002010 GO TO 0100‑WRITE‑IT. 002100 0100‑END‑IT. 002200 CLOSE OUT‑FILE. 002300 GOBACK.GOBACK Key
Assume that the COPY codes OUTFILE and OUTREC contain the SELECT and FD information respectively. Use the following command to set a breakpoint at the write statement and display the record contents in COBOL format:
UNCOND 0100‑WRITE‑IT (RECORDS)
Each time statement 1900 is executed, the COBOL program stops and a formatted display of the record for OUT‑FILE appears. To generate the data, type over the values that you want, press the END key to return to the Intercept panel, and press the GO key to write the record.
Adding another File Definition, OPEN, and a READ before the WRITE could make this into a COBOL format record editor.
|
Copyright © 2013 CA.
All rights reserved.
|
|