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

retrieve all records from dataset older than certain date


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

New User


Joined: 04 Dec 2006
Posts: 63
Location: Hyderabad

PostPosted: Thu Sep 02, 2010 7:55 pm
Reply with quote

I/P file details

RF –FB
LRECL—100


Date started at 19th 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 03/23/10

Ex:
02/20/09
08/22/08
03/20/10…… etc

Regards,
Srini.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Sep 02, 2010 9:30 pm
Reply with quote

Yvonne1980,

Use this DFSORT JCL

Code:

//STEP0100 EXEC PGM=SORT   
//SYSOUT   DD SYSOUT=*     
//SORTIN   DD DSN=Your input 100 byte FB file,DISP=SHR
//SORTOUT  DD SYSOUT=*                                 
//SYSIN    DD *                                         
  SORT FIELDS=COPY                                     
  INREC OVERLAY=(101:19,8,UFF,M11,LENGTH=6)             
  OUTFIL BUILD=(1,100),INCLUDE=(101,6,Y2W,LT,Y'100323')
//*
Back to top
View user's profile Send private message
vicharapusrinu
Warnings : 1

New User


Joined: 04 Dec 2006
Posts: 63
Location: Hyderabad

PostPosted: Fri Sep 03, 2010 12:21 pm
Reply with quote

Skolusu,

Thanks for providing solution,

Could you please let me know what would be changes in sort cart if my input data set is VB?


Regards,
Srini.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Sep 03, 2010 1:04 pm
Reply with quote

that all Your fields positions/offset will have to be shifted right 4 bytes to account for the RDW

for a F[B] record the first <userdata> byte will be at position 1/offset 0

for a V[B] record the first <userdata> byte will be at position 5/offset 4
( position 1/offset 0 will contain the RDW - 4 bytes )
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Sep 03, 2010 10:23 pm
Reply with quote

vicharapusrinu wrote:
Skolusu,

Thanks for providing solution,

Could you please let me know what would be changes in sort cart if my input data set is VB?


Regards,
Srini.


vicharapusrinu,


ibmmainframes.com/viewtopic.php?p=248417#248417
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
Search our Forums:

Back to Top