Page 1 of 1

inrec when=group with overlay

PostPosted: Wed May 08, 2013 7:25 pm
by ranga_subham
Hi,

My below code is ending with error -

INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,11,ZD,EQ,NUM),OVERLAY=(510:C'T'))


Error:
 INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,11,ZD,EQ,NUM),OVERLAY=(1:C'T'))
                                                 *               
WER268A  INREC STATEMENT   : SYNTAX ERROR                         
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                     


Can you please help.

Thanks.

Re: inrec when=group with overlay

PostPosted: Wed May 08, 2013 7:50 pm
by BillyBoyo
You're missing a "closing bracket" for the IFTHEN=(

Should be

...NUM)),OVERLAY=...

Re: inrec when=group with overlay

PostPosted: Wed May 08, 2013 8:21 pm
by ranga_subham
Hi,

I modified it per your suggestion but still it does not get through. Please help.

//SYSIN    DD *                                                       
 SORT FIELDS=COPY                                                     
 INCLUDE COND=(1,5,ZD,EQ,00000)                                       
 INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,11,ZD,EQ,NUM)),OVERLAY=(510:C'T'))


Error:
SYSIN :                                                             
 SORT FIELDS=COPY                                                   
 INCLUDE COND=(1,5,ZD,EQ,00000)                                     
 INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,11,ZD,EQ,NUM)),OVERLAY=(510:C'T'))
                                                 *                   
WER268A  INREC STATEMENT   : SYNTAX ERROR                           
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE                       


Thanks.

Re: inrec when=group with overlay

PostPosted: Wed May 08, 2013 9:11 pm
by BillyBoyo
OK, ignore what I said.

You can't use OVERLAY with WHEN=GROUP. You use PUSH. You can't PUSH a literal, only data from the record which has defined the start of the group.

So, you'd best tell us what you're trying to do, so we can suggest a way to do it. If you want to try on your own, "extend" your record on IFTHEN=(WHEN=INIT to include a value of 'T' in a particular position. Use that in the PUSH. Drop the extension later.