Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Retrieve all records from dataset which is older than 50 day

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Retrieve all records from dataset which is older than 50 day
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: 8593
Location: Back in jolly old England

PostPosted: Fri Sep 03, 2010 4:15 pm    Post subject:
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    Post subject:
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: 578
Location: USA

PostPosted: Fri Sep 03, 2010 8:17 pm    Post subject:
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    Post subject: Reply to: Retrieve all records from dataset which is older t
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 7 Fri Mar 24, 2017 2:24 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts Join giving more records than expected Danielle.Filteau SYNCSORT 2 Thu Mar 09, 2017 3:28 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us