Read the Input file add the '|' delimiter between the field and create output file
FILE INFILE FB(80 0)
INPUT-RECORD 1 80 A
INPUT-ID 1 08 N
INPUT-NAM 09 20 A
INPUT-ADD 29 20 A
INPUT-P 49 10 N
FILLER 59 41 A
FILE OUTPUT PRINTER FB(64 0)
*********************************
*WORKING STORAGE
*********************************
WS-PIPE W 1 A
*********************************
*WORKING ROUTINE
*********************************
JOB INPUT(INFILE)
PERFORM WRITE-ROUTINE. PROC
WS-PIPE = '|'
PRINT REDATOUT-RPT
END PROC.
REPORT REDATOUT-RPT
PRINTER OUTFILE +
LINESIZE 63 +
PAGE 0 +
SKIP 0 +
NOPAGE +
NODATE +
NOHEADING +
LINE 01 INPUT-ID +
WS-PIPE +
INPUT-NAME +
WS-PIPE +
INPUT-ADD +
WS-PIPE +
INPUT-PH
FILE INFILE FB(80 0)
INPUT-RECORD 1 80 A
INPUT-ID 1 08 N
INPUT-NAM 09 20 A
INPUT-ADD 29 20 A
INPUT-P 49 10 N
FILLER 59 41 A
FILE OUTPUT PRINTER FB(64 0)
*********************************
*WORKING STORAGE
*********************************
WS-PIPE W 1 A
*********************************
*WORKING ROUTINE
*********************************
JOB INPUT(INFILE)
PERFORM WRITE-ROUTINE. PROC
WS-PIPE = '|'
PRINT REDATOUT-RPT
END PROC.
REPORT REDATOUT-RPT
PRINTER OUTFILE +
LINESIZE 63 +
PAGE 0 +
SKIP 0 +
NOPAGE +
NODATE +
NOHEADING +
LINE 01 INPUT-ID +
WS-PIPE +
INPUT-NAME +
WS-PIPE +
INPUT-ADD +
WS-PIPE +
INPUT-PH
No comments:
Post a Comment