View previous topic :: View next topic
|
Author |
Message |
KUMAR GANGAVARAPU
New User
Joined: 09 May 2007 Posts: 2 Location: SALTLAKE CITY
|
|
|
|
Hi,
I have an input file in that for particular position( 39 to 47) if i found space i need to replace it by current date+90 days (for example, 20070808, if it is today), How we can do it by sort??? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Actually, date+90 days for today would be 20070806. I know that because I used this DFSORT statement to find out:
Code: |
INREC BUILD=(39:DATE1+90)
|
You can use that same DFSORT function to get what you want. You'll need z/OS DFSORT V1R5 PTF UK90007 or DFSORT R14 PTF UK90006 (April, 2006) in order to use DFSORT's DATEn+d function. If you don't have the April, 2006 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the April, 2006 PTF, see:
Use [URL] BBCode for External Links |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forums
Please go to this link for some related info - the part that most relates to your question is at the bottom. It probably won't be the answer you want . . .
http://ibmmainframes.com/viewtopic.php?t=18157
Also, positions 39 to 47 is 9 bytes long.
When you have a question, it is a good idea to search as you will often get an answer much quicker than waiting for a reply.
Good luck. |
|
Back to top |
|
|
raam_kumar
New User
Joined: 25 Apr 2007 Posts: 44 Location: chennai, India
|
|
|
|
Hi Frank
I tried testing the date function in my shop. but i have got
ABEND=S000 U0016 REASON=00000000
Here is the code which i have used
SORT FIELDS=(1,8,CH,A)
INREC BUILD=(1:1,35,36:DATE1+10)
To find the version of sort which we are using i queried in our help and got the following output
Item Vendor Product Release Data Base
SORT IBM Z/OS DFSORT UTILITY V1R5 M
SORT SYNCSORT SYNCSORT UTILITY V3R6 & PRIOR M
SORT SYNCSORT SYNCSORT UTILITY V3R7 M
SORT SYNCSORT SYNCSORT Z/OS UTIL V1R1 M
SORT SYNCSORT SYNCSORT Z/OS UTIL V1R2 M
I remember,once you have stated in one of my post saying that since the messages which i have in my spool starts with 'WER' I am using SYNCSORT.
Can you please let me know whether this is possible in SYNCSORT |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
This will be moved from the DFSORT forum. You are running Syncsort and that product is not part of the DFSORT forum.
Your product list shows both DFSORT and Syncsort. Are you permitted to use DFSORT and Syncsort? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
Can you please let me know whether this is possible in SYNCSORT
|
DFSORT supports the daten+d and daten-d functions in BUILD. Syncsort does NOT support those functions. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
Please go to this link for some related info |
That post relates to doing arithmetic on a date field in a record which is not supported by sort products.
This thread relates to creating a constant for current date + n days which is supported by DFSORT. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Good catch
My bad - i thought i'd seen the current date +n successfully used, but when i re-read the post, i confused myself |
|
Back to top |
|
|
|