Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to get current date+ ndays display in the output record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to get current date+ ndays display in the output record
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 Moderator


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

PostPosted: Wed May 09, 2007 5:18 am    Post subject:
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:

www.ibm.com/servers/storage/support/software/sort/mvs/peug/
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Wed May 09, 2007 6:07 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Wed May 09, 2007 7:31 pm    Post subject:
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 Moderator


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

PostPosted: Wed May 09, 2007 9:55 pm    Post subject:
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 Moderator


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

PostPosted: Wed May 09, 2007 9:57 pm    Post subject:
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

Site Director


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

PostPosted: Wed May 09, 2007 10:12 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts it is possible output a SET value fro... Martylin JCL & VSAM 2 Fri Sep 22, 2017 7:08 am
No new posts Binary to display characters Roy Ware SYNCSORT 3 Tue Sep 19, 2017 8:46 pm
No new posts Validate the Date girishb2 DFSORT/ICETOOL 9 Tue Sep 19, 2017 1:12 am
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us