IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sort to include date check for mmddyyyy format


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
subbu1522

New User


Joined: 11 Sep 2008
Posts: 29
Location: USA

PostPosted: Tue Feb 15, 2011 3:13 am
Reply with quote

Hi,

I have a FB file of length 422 that has a date field in positions 32-39 - the date is in the format mmddyyyy.

I need to include all records with the date greater than 10/14/2010 (mm/dd/yyyy).

Can this be done in a sort step?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Feb 15, 2011 3:31 am
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file (FB/422)
//SORTOUT DD DSN=...  output file (FB/422)
//SYSIN DD *
  INREC OVERLAY=(423:36,4,32,4)
  OPTION COPY
  OUTFIL INCLUDE=(423,8,CH,GT,C'20101014'),BUILD=(1,422)
/*
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Format data from multiple records usi... SYNCSORT 4
No new posts Alternative of JoinKeys in SORT DFSORT/ICETOOL 2
No new posts Sorting date into YYYYMMDD, and creat... DFSORT/ICETOOL 13
No new posts Sort SMF records? SYNCSORT 6
No new posts To Sort detail records in a file with... SYNCSORT 5
Search our Forums:


Back to Top