View previous topic :: View next topic
|
Author |
Message |
vicharapusrinu Warnings : 1 New User
Joined: 04 Dec 2006 Posts: 63 Location: Hyderabad
|
|
|
|
RF –VB
Date started at 19th (RDW - 4 bytes NOT included) position in MM/DD/YY format
Ex: 03/23/09 is at 19th position to 26th position
I would like to retrieve all records from data set which is older than 50 days
Could you please provide sort card for the same? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Please see THIS previous topic. |
|
Back to top |
|
|
vicharapusrinu Warnings : 1 New User
Joined: 04 Dec 2006 Posts: 63 Location: Hyderabad
|
|
|
|
Hi Expat,
Thanks a lot for providing precious instances.
But in previous topic, date has been hot coded, but in my current case I need older than 50 days (date should NOT mention) and my current data set is VB
Please let me know if you require any more details?
Thanks in advance… |
|
Back to top |
|
|
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
vicharapusrinu,
Assuming input of VB,80... see if below jcl works for you...
Code: |
//STEP01 EXEC PGM=SORT
//SORTIN DD DISP=SHR,DSN=INPUT VB FILE
//SORTOUT DD DSN=OUTPUT VB FILE,
//SYSIN DD *
INREC OVERLAY=(11:5,76,5:29,8,UFF,M11,LENGTH=6)
SORT FIELDS=COPY
OUTFIL INCLUDE=(5,6,Y2W,LT,Y'DATE1'-50),BUILD=(1,4,11,76)
/*
//SYSOUT DD SYSOUT=*
//*
|
I am not sure if direct INCLUDE comparison is possible for date in MM/DD/YY format.
Thanks, |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
vicharapusrinu,
Assuming that you want the records with current date-50 days, use the following DFSORT JCL
Code: |
//STEP0100 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=Your input any lrecl vb file,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
INREC BUILD=(1,4,23,8,UFF,M11,LENGTH=6,5)
OUTFIL INCLUDE=(5,6,Y2W,LT,Y'DATE1'-50),BUILD=(1,4,11)
//* |
|
|
Back to top |
|
|
|