I have got an input file (VB format) of record length 1352. Below is the sample record from the file.
TC139002344528 .°..°...................552
From the above record i need to convert value 552 (starting position 53, lenght 3) to packed decimal (PD), based on the sort key value C13900 (starting position 2,length 6)
Note that all other records not matching key i need to directly write to output file with out doing any conversion,
I need to change the PD (Packed decimal) values lying in Position 53 and length 3 (since the file is in VB format 53 turns to 57 for RDW) to integer format, using the below sort card i am not getting proper output
When used the following Sort got syntax error with below sysout message
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(6,6,CH,EQ,C'C13900' AND '17,2,CH,NE,C' '),
OVERLAY=(57:57,3,PD,ZDF,LENGTH=3))
Sysout message:
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 16595, MODEL 2094 506
SYSIN :
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(6,6,CH,EQ,C'C13900' AND '17,2,CH,NE,C' '),
*
OVERLAY=(57:57,3,PD,ZDF,LENGTH=3))
*
WER268A INREC STATEMENT : SYNTAX ERROR
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
I am still getting syntax error after inserting comma (,) before and after AND
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 16595, MODEL 2094 506
SYSIN :
SORT FIELDS=COPY
INREC IFTHEN=(WHEN=(6,6,CH,EQ,C'C13900',AND,'17,2,CH,NE,C' '),
*
OVERLAY=(57:57,3,PD,ZDF,LENGTH=3))
*
WER268A INREC STATEMENT : SYNTAX ERROR
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Btw which control statements are you refferring boss. i got little confused with your statment.