I'm struggling to get PARSE to work on a VB File.
What I want to achieve is the following
a) Extract records from the VB File (Record format . . . : VB Record length . . . : 204) of the following format, only extract those records where chars from position 16 for length 5 are 10POL (as below)
"0000002","10POL","","0000000085","AV01","ORDM","NOCMGMP","AC",
"0000072","10POL","PZ54128690","0000000011","AV01","MRLY","NOCMGMP","AC",
"0000073","10POL","PZ54148961","0000000012","AV01","MRLY","NOCMGMP","AC",
"0000150","10POL","","0000000090","AV01","ORDM","NOCMGMP","AC",
b) Create an output file whereby the only content is that of the fourth comma delimited field
I was trying to use PARSE along with OUTFIL or OUTREC to define the layout to DFSORT but kept getting error messages
SORT FIELDS=COPY
INCLUDE COND=(16,5,CH,EQ,C'10POL')
OUTREC PARSE=(%01=(ENDBEFR=C',',FIXLEN=9),
%02=(ENDBEFR=C',',FIXLEN=7),
%03=(ENDBEFR=C',',FIXLEN=12),
%04=(ENDBEFR=C',',FIXLEN=13)),
BUILD=(5:%04)
G RECORD TYPE IS V - DATA STARTS IN POSITION 5
2 INCONSISTENT *OUTREC IFTHEN 0 REFORMATTING FIELD FOUND
0 C5-K51706 C6-K51706 C7-K54602 C8-K51706 E7-K51706
3 END OF DFSORT