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
 

 

Date calculation thru SORT card.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
bshkris

New User


Joined: 21 Mar 2005
Posts: 22
Location: pune

PostPosted: Tue Jul 08, 2014 1:56 pm    Post subject: Date calculation thru SORT card.
Reply with quote

Hi,

I have 2 date feilds in input file.
Let say the date feilds starts in below positions

Length start pos end pos
DATE1 10 308 317
DATE2 10 318 327

I have date1 value 2014-09-23. Now i want to add 9months to date1 and place it in date2 feild.

I was able to calculate 1 year to date1 but failed to add 9 months.

The below is sort card for adding one year.
OUTREC FIELDS=(1,317,318,4,ZD,ADD,+1,EDIT=(TTTT),322,29)
the file's total length is 350 bytes, our date feilds exists from 308 to 327 bytes.

If any one has idea how to do calculate the 9 months advanced date from given input value by using sort card, please let me know.
Appriciate your help.

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

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7234

PostPosted: Tue Jul 08, 2014 3:31 pm    Post subject: Reply to: Date calculation thru SORT card.
Reply with quote

Can you post the sysout from a SORT step (doesn't matter which) so we can see what version you are at?
Back to top
View user's profile Send private message
bshkris

New User


Joined: 21 Mar 2005
Posts: 22
Location: pune

PostPosted: Tue Jul 08, 2014 3:59 pm    Post subject:
Reply with quote

********************************* TOP OF DATA **********************************
1 SYNCSORT FOR Z/OS 1.4.1.0R U.S. PATENTS: 4210961, 5117495 (C) 2010 SYNCS
EAST z/OS 1.13.0
SYNCSORT LICENSED FOR LICE
SYSIN :
SORT FIELDS=COPY
INREC OVERLAY=(308:30,10,318:30,10)
OUTREC FIELDS=(1,317,318,4,ZD,ADD,+1,EDIT=(TTTT),322,29)
OUTREC FIELDS=(1,317,318,4,ZD,ADD,+1,EDIT=(TTTT),322,29)
*
WER269A OUTREC STATEMENT : DUPLICATE STATEMENT FOUND
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
******************************** BOTTOM OF DATA ********************************
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7234

PostPosted: Tue Jul 08, 2014 5:21 pm    Post subject: Reply to: Date calculation thru SORT card.
Reply with quote

OK, you have SyncSort, whose questions belong in the JCL forum.

You are fairly current with SyncSort. Consult your documentation. You should find DATEADD which is of use to you if you can define "nine months" as a number of days.

If not, ask the analyst what is supposed to happen when you add nine months to 31 of May.

You need to know, exactly, what "nine months" means. These are computers, they know nothing themselves.
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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


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