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
 

 

How to get the Prvious day's Date

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
rchatu214

New User


Joined: 10 Dec 2006
Posts: 5
Location: hyderabad

PostPosted: Thu Jul 17, 2008 6:32 pm    Post subject: How to get the Prvious day's Date
Reply with quote

I have requirement like this.
I have one input file in which one of the field is a date which will be blank initially.But after sorting on another filed, this date field should be updated by previous day's date in the output file. Can any one help on this.

Thanks in advance.
rama
Back to top
View user's profile Send private message

Manuneedhi K

Active User


Joined: 07 May 2008
Posts: 115
Location: Chennai

PostPosted: Thu Jul 17, 2008 6:46 pm    Post subject:
Reply with quote

You can use this logic to get the prev day's date.
Note: In my test file i had the sample data for the first 20 bytes.

Code:

  OPTION COPY                           
  INREC OVERLAY=(1,20,DATE1)           
  OUTREC BUILD=(1,20,(21,8,ZD,SUB,+1)) 
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Jul 17, 2008 9:24 pm    Post subject:
Reply with quote

Manu,

Please update your knowledge of DFSORT before answering questions on it. DFSORT has had the ability to compute relative dates since April, 2006.

DATE1-1 will give yesterdays date in 'yyyymmdd' form. Other variations will give relative dates in other forms.

Rama,

For more information on using relative dates with DFSORT, see:

http://www.ibm.com/systems/support/storage/software/sort/mvs/peug/
Back to top
View user's profile Send private message
Manuneedhi K

Active User


Joined: 07 May 2008
Posts: 115
Location: Chennai

PostPosted: Thu Jul 17, 2008 9:35 pm    Post subject:
Reply with quote

Thanks Frank. I initially tried DATE1P-1 and it didn't work. Should have tried with DATE1-1. My bad. I generally don't respond to DFSORT queries but was so tempted with this one. My apologies.
Back to top
View user's profile Send private message
Manuneedhi K

Active User


Joined: 07 May 2008
Posts: 115
Location: Chennai

PostPosted: Thu Jul 17, 2008 9:42 pm    Post subject:
Reply with quote

Also Frank i have SYNCSORT 1.2.3.1R installed in my shop which doesn't
support DATE1-1 and hence the confusion. Sorry again.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Jul 17, 2008 9:43 pm    Post subject:
Reply with quote

Quote:
I initially tried DATE1P-1 and it didn't work.


Didn't work how? DFSORT supports DATE1P-1 - it gives yesterdays date in P'yyyymmdd' form.
Back to top
View user's profile Send private message
Manuneedhi K

Active User


Joined: 07 May 2008
Posts: 115
Location: Chennai

PostPosted: Thu Jul 17, 2008 9:50 pm    Post subject:
Reply with quote

Frank,

I have clarified that in the second post. We don't have DFSORT here , we run SYNCSORT icon_sad.gif
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Jul 17, 2008 10:15 pm    Post subject:
Reply with quote

Since you use Syncsort, please consider not posting in the DFSORT Forum to avoid confusion.
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 How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts SUBSTR for Date functions Shaheen Shaik DB2 4 Thu Apr 06, 2017 2:14 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm


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