Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Mainframe dataset split purushottam DFSORT/ICETOOL 13 Tue Aug 29, 2017 12:28 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts Unable to copy data from spool in a d... srikant314 JCL & VSAM 8 Fri Jul 28, 2017 9:10 pm
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us