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

How to get current date+ ndays display in the output record


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
KUMAR GANGAVARAPU

New User


Joined: 09 May 2007
Posts: 2
Location: SALTLAKE CITY

PostPosted: Wed May 09, 2007 4:43 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Wed May 09, 2007 5:18 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed May 09, 2007 6:07 am
Reply with quote

Hello and welcome to the forums icon_smile.gif

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
View user's profile Send private message
raam_kumar

New User


Joined: 25 Apr 2007
Posts: 44
Location: chennai, India

PostPosted: Wed May 09, 2007 11:00 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed May 09, 2007 7:31 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Wed May 09, 2007 9:55 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Wed May 09, 2007 9:57 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed May 09, 2007 10:12 pm
Reply with quote

Good catch icon_smile.gif

My bad - i thought i'd seen the current date +n successfully used, but when i re-read the post, i confused myself icon_redface.gif
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
Search our Forums:

Back to Top