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
 

 

Regd Date Functions in Syncsort

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

New User


Joined: 02 Jun 2013
Posts: 11
Location: India

PostPosted: Fri Jul 01, 2016 8:21 pm    Post subject: Regd Date Functions in Syncsort
Reply with quote

I am trying to subtract 1 year from current date. I used the below options but I am getting errors,


Code:

SYSIN :                                                 
  INREC FIELDS=(1,10,11:&DATE1P)                         
  SORT FIELDS=COPY                                       
  OUTREC FIELDS=(1,10,DATEADD=(11,5,DTNSP=(YMD),-1,YEAR))
                                  *                     
WER271A  OUTREC STATEMENT  : NUMERIC FIELD ERROR         




Code:

SYSIN :                                                     
  INREC FIELDS=(1,10,11:DATE1)                               
  SORT FIELDS=COPY                                           
  OUTREC FIELDS=(1,10,SUBYEARS=(11,8,DT=(YMD),-1,YEAR))     
                      *                                     
WER268A  OUTREC STATEMENT  : SYNTAX ERROR                   


Could you please help me on to resolve this.

Thanks & Regards,
Muralikrishnan R[
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7912
Location: Bellevue, IA

PostPosted: Fri Jul 01, 2016 8:49 pm    Post subject:
Reply with quote

Does the SYNCSORT manual tell you that you can subtract a year from a date? If so, use what the manual recommends. If you cannot find it in the manual, contact the vendor to determine whether or not what you want to do is even possible, and if so how to do it. If your site is licensed for the product, you have access to the documentation and vendor support.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Fri Jul 01, 2016 9:07 pm    Post subject:
Reply with quote

Please try and check if sync sort supports.
Code:
//SYSOUT DD SYSOUT=*                                     
//SORTIN   DD *                                           
20160701                                                 
//SORTOUT DD SYSOUT=*                                     
//SYSIN DD *                                             
    OPTION COPY                                           
    OUTREC BUILD=(1,8,Y4T,SUBYEARS,+1,TOGREG=Y4T(/),2X,   
                  1,8,Y4T,SUBYEARS,+1,TOGREG=Y4T(-))     
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 syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 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
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm


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