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

selecting only yesterdays records froma ps.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
hiravibk
Warnings : 1

Active User


Joined: 14 Dec 2008
Posts: 107
Location: India

PostPosted: Tue Apr 14, 2009 2:36 pm
Reply with quote

Hi All,
I have requirement to select only yesterdays records from a PS using a sort..I know similar process can be done for todays date using the below code
Code:

//SORTOUT DD SYSOUT=*                       
//SYSIN    DD    *                           
  OPTION COPY                               
  INREC OVERLAY=(81:7,4,1,2,4,2)             
  OUTFIL OMIT=(81,8,CH,EQ,DATE1),         
    BUILD=(1,80)                             
/*

But, how can i do it yesterdays date. Please explain me how to do it.

Thank you,
Ravi
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Tue Apr 14, 2009 3:13 pm
Reply with quote

hiravibk,
Try this.

Code:


//SORTOUT DD SYSOUT=*                       
//SYSIN    DD    *                           
  OPTION COPY                               
  INREC OVERLAY=(81:7,4,1,2,4,2)             
  OUTFIL OMIT=(81,8,CH,EQ,&DATE1-1),         
    BUILD=(1,80)                             
/*



Thanks
Krishy
Back to top
View user's profile Send private message
hiravibk
Warnings : 1

Active User


Joined: 14 Dec 2008
Posts: 107
Location: India

PostPosted: Tue Apr 14, 2009 3:24 pm
Reply with quote

Hi Krishy,

your code worked fine.Thank you so much.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
No new posts JCL sortcard to print only the records DFSORT/ICETOOL 11
Search our Forums:

Back to Top