View previous topic :: View next topic
|
Author |
Message |
Raghuraman_New
New User
Joined: 03 Oct 2008 Posts: 43 Location: Chennai,India.
|
|
|
|
Hi ,
I need to include the last two year Recods only from the Input History file.
Input :
Data1 09 (Year is 2009)
Data2 01 (Year is 2001)
Data3 08 (Year is 2008)
Data4 89 (Year is 1989)
Data5 98 (Year is 1998)
Data6 07 (Year is 2007)
Output :
Data1 09
Data3 08
Data6 07
Thanks in advance. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Moved to correct forum for SYNCSORT questions
What have you read about in the product manuals for INCLUDE or OMIT ? |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Hello Raghuraman,
This SyncSort for z/OS 1.3 job should produce your requested output:
Code: |
//SORT1 EXEC PGM=SORT,PARM='CENTWIN=80'
//SORTIN DD *
DATA1 09
DATA2 01
DATA3 08
DATA4 89
DATA5 98
DATA6 07
//SORTOUT DD DSN=output.file,...
//SYSOUT DD SYSOUT=*
//SYSIN DD *
INREC OVERLAY=(10:&DATE3-720)
SORT FIELDS=COPY
OUTFIL INCLUDE=(7,2,Y2C,GE,12,2,Y2C),BUILD=(1,8)
/*
|
Regards, |
|
Back to top |
|
|
Raghuraman_New
New User
Joined: 03 Oct 2008 Posts: 43 Location: Chennai,India.
|
|
|
|
Hi ,
Thanks for your immediate response.I tried that code it says "INREC Syntax Error" for the Statement. "INREC OVERLAY=(10:&DATE3-720)".
We are having Syncsort V1.2 only . Could any one provide code compatible for V1.2?
Thanks in Advance.
|
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Raghuram,
Change the control statements in the above job like this and rerun your job. It works with my 1.2 version.
Code: |
//SYSIN DD *
INREC OVERLAY=(10:&DATE3,12,2,Y2C,SUB,7,2,Y2C,M11,LENGTH=5)
SORT FIELDS=COPY
OUTFIL INCLUDE=(17,5,ZD,LE,2),BUILD=(1,8)
|
|
|
Back to top |
|
|
|