View previous topic :: View next topic
|
Author |
Message |
rchatu214
New User
Joined: 10 Dec 2006 Posts: 5 Location: hyderabad
|
|
|
|
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 |
|
|
Manuneedhi K
Active User
Joined: 07 May 2008 Posts: 115 Location: Chennai
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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:
www.ibm.com/systems/support/storage/software/sort/mvs/peug/ |
|
Back to top |
|
|
Manuneedhi K
Active User
Joined: 07 May 2008 Posts: 115 Location: Chennai
|
|
|
|
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 |
|
|
Manuneedhi K
Active User
Joined: 07 May 2008 Posts: 115 Location: Chennai
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
Manuneedhi K
Active User
Joined: 07 May 2008 Posts: 115 Location: Chennai
|
|
|
|
Frank,
I have clarified that in the second post. We don't have DFSORT here , we run SYNCSORT |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Since you use Syncsort, please consider not posting in the DFSORT Forum to avoid confusion. |
|
Back to top |
|
|
|