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 older than certain date

 
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: Thu Sep 02, 2010 7:55 pm    Post subject: retrieve all records from dataset older than certain date
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    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Fri Sep 03, 2010 1:04 pm    Post subject: Reply to: retrieve all records from dataset older than certa
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    Post subject:
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,


http://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    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 Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 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


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