Page 1 of 1

Error while PARSING the records

PostPosted: Fri Dec 27, 2019 12:42 pm
by gadde9
My input data set has data in below format, and file is a pipe delimited file with a '.' at the end
AAAAAAAAAA|BBBBB|CCCCCCC|||DDDDD|EEEE EEEEEE|FF|GGGGGG|HH|IIIII|JJJJJJJJJJJ|KKKKKKKKKK|LLLLLLLL|||MM|N|||OOOOOO.
 


I want to write the below fields to output file,

AAAAAAAAAA,JJJJJJJJJJJ,OOOOOO


I have written below sort step, but I'm getting the error as,

WER813I  INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED
WER268A  OUTREC STATEMENT  : SYNTAX ERROR
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE


Can you let me know what is the issue here?

//***********************************************************
//PARSSTP  EXEC PGM=SORT
//SORTWK03 DD UNIT=SYSDA,SPACE=(CYL,150,,CONTIG)
//SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,150,,CONTIG)
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,150,,CONTIG)
//*
//SORTIN   DD DSN=TEST.YY.XXX.ZZZXXX,DISP=SHR
//*
//SORTOUT  DD DSN=TEST.YY.XXX.ZZZXXX.OUTPUT,
//            UNIT=DISK,SPACE=(CYL,(5,5),RLSE),
//             DISP=(NEW,CATLG,DELETE),
//            DCB=(RECFM=FB,LRECL=256,BLKSIZE=0)
//*
//LISTOUT  DD SYSOUT=*,DCB=(RECFM=FA,LRECL=80,BLKSIZE=80)
//SYSOUT   DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN    DD *
  SORT FIELDS=COPY
  OUTREC PARSE=(%01=(ENDBEFR=C'|',FIXLEN=10),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %12=(ENDBEFR=C'|',FIXLEN=11),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %21=(ENDBEFR=C'.',FIXLEN=6),
       BUILD=(%01,C',',12:%12,'C',24:%21,227X)
/*

Re: Error while PARSING the records

PostPosted: Fri Dec 27, 2019 3:33 pm
by NicC
Please use the code tags to present code, data, anything requiring a fixed pitch font.

The error messages begin WER which means that you are using Syncsort - topic moved

Try referring to the syntax for OUTREC - is PARSE compatible with BUILD? I would do the parsing on the input phase (INREC) not the output phase.

Re: Error while PARSING the records

PostPosted: Fri Dec 27, 2019 5:54 pm
by gadde9
Thanks for the reply Nic.

Re: Error while PARSING the records

PostPosted: Fri Dec 27, 2019 6:07 pm
by sergeyken
gadde9 wrote:Can you let me know what is the issue here?

//SYSIN    DD *
  SORT FIELDS=COPY
  OUTREC PARSE=(%01=(ENDBEFR=C'|',FIXLEN=10),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %12=(ENDBEFR=C'|',FIXLEN=11),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %=(ENDBEFR=C'|'),
                %21=(ENDBEFR=C'.',FIXLEN=6),
       BUILD=(%01,C',',12:%12,'C',24:%21,227X)
/*

If you only tried just to count open/close brackets in you statement, you'd find the error immediately.

Can you count pairing brackets?