MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Syncsort - how to get yesterdays date

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
shanrice
Beginner


Joined: 04 Nov 2006
Posts: 5
Topics: 2

PostPosted: Sat Nov 04, 2006 8:26 pm    Post subject: Syncsort - how to get yesterdays date Reply with quote

I am currently using &DATE in sort OUTREC for getting the current date. My requirement changed and I would like to write yesterdays date while writing to output.

Is there a way to subtract 1 day and get yesterdays date using sort (OUTREC)?

TIA
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12357
Topics: 75
Location: San Jose

PostPosted: Sun Nov 05, 2006 6:05 pm    Post subject: Reply with quote

shanrice,

Syncsort does not have the ability to calculate the dates. However if your intention is to pick yesterday's records then you can use the &date1 in the include/omit cond

Code:

//STEP0100  EXEC  PGM=SORT       
//SYSOUT    DD SYSOUT=*           
//SORTIN    DD *                     
20061103                           
20061104                           
20061105                           
//SORTOUT   DD SYSOUT=*             
//SYSIN     DD *                   
  SORT FIELDS=COPY                       
  INCLUDE COND=(1,8,CH,EQ,&DATE1-1)
/*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
shanrice
Beginner


Joined: 04 Nov 2006
Posts: 5
Topics: 2

PostPosted: Sun Nov 05, 2006 7:23 pm    Post subject: Reply with quote

Thanks for your info. I will get the date from a pgm.
Back to top
View user's profile Send private message
shanrice
Beginner


Joined: 04 Nov 2006
Posts: 5
Topics: 2

PostPosted: Sun Nov 05, 2006 8:28 pm    Post subject: Reply with quote

I googled again on my original requirement and looks like there is an option to get yesterdays date. I will give it a try tomorrow.

Code:


   INREC OVERLAY=(81:DATE1-1)
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12357
Topics: 75
Location: San Jose

PostPosted: Sun Nov 05, 2006 9:19 pm    Post subject: Reply with quote

shanrice wrote:
I googled again on my original requirement and looks like there is an option to get yesterdays date. I will give it a try tomorrow.

Code:


   INREC OVERLAY=(81:DATE1-1)


That syntax is only valid with DFSORT. Syncsort Does not support date arthimetic on inrec/outrec

Kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group