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

Retrieve all records from dataset which is older than 50 day


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: Fri Sep 03, 2010 4:09 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Sep 03, 2010 4:15 pm
Reply with quote

Please see THIS previous topic.
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 4:27 pm
Reply with quote

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
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Fri Sep 03, 2010 8:17 pm
Reply with quote

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
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:20 pm
Reply with quote

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
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 2
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top