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
 

 

Syncsort - DATEDIFF syntax error

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Raja Durai

New User


Joined: 06 Jul 2008
Posts: 6
Location: chennai

PostPosted: Thu May 10, 2012 11:14 pm    Post subject: Syncsort - DATEDIFF syntax error
Reply with quote

Hi,

I am just trying in SYNCSORT to find the difference between the dates but it is not working. Can you please help me with the below code?

Code:
//STEP01   EXEC PGM=SORT                             
//SORTIN   DD *                                     
20010101 20010101                                   
20010101 20010102                                   
20010101 20010103                                   
20010101 20010104                                   
/*                                                   
//SORTOUT  DD SYSOUT=*                               
//SYSOUT   DD SYSOUT=*                               
//SYSIN    DD *                                     
  INREC FIELDS=(1,8,Y4T,DATEDIFF,10,8,Y4T)           
  SORT FIELDS=COPY                                   
/* 


and my sysout looks like :

Code:
SYSIN :                                         
  INREC FIELDS=(1,8,Y4T,DATEDIFF,10,8,Y4T)       
                                   *                           
  SORT FIELDS=COPY                               
WER268A  INREC STATEMENT   : SYNTAX ERROR       
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000   
WER449I  SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Thu May 10, 2012 11:44 pm    Post subject: Reply to: Difference between two dates
Reply with quote

Did you read the thread? What level of Syncsort are you on? What does your documentation say about DATEDIFF?
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: Thu May 10, 2012 11:49 pm    Post subject:
Reply with quote

Hello,

Looks like you dd not post what may be the most important bit of the sysout for this question. . .

At the top of the sysout is the release of Syncsort that is being used.

If it is not at least 1.4, i don't believe DATEDIFF is available. . .

Also, i believe the syntax is not complete/correct.
Back to top
View user's profile Send private message
Raja Durai

New User


Joined: 06 Jul 2008
Posts: 6
Location: chennai

PostPosted: Fri May 11, 2012 12:43 am    Post subject: Reply to: Difference between two dates
Reply with quote

Hi,

Our shop using SYNCSORT FOR Z/OS 1.4.0.1R.
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: Fri May 11, 2012 1:09 am    Post subject:
Reply with quote

Hello,

Then you need to look in the manual and correct the syntax.

If i remember, you need to specify the date fields and a place to store the difference. . .
Back to top
View user's profile Send private message
Raja Durai

New User


Joined: 06 Jul 2008
Posts: 6
Location: chennai

PostPosted: Fri May 11, 2012 1:13 am    Post subject: Reply to: Difference between two dates
Reply with quote

Thank you D.Sch .. I will try
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Fri May 11, 2012 1:22 am    Post subject: Reply to: Difference between two dates
Reply with quote

And please don't tailgate an old topic, but start a new one with your own question next time.
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: Fri May 11, 2012 1:22 am    Post subject: Reply to: Difference between two dates
Reply with quote

You're welcome - good luck icon_smile.gif

If you post your solution, it will most likely help someone else one day. So far yours is the first Syncsort topic to mention datediff.
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: Fri May 11, 2012 1:33 am    Post subject:
Reply with quote

Follow up:

You might want to look at DT and/or DTNS in the manual (or anything else that might be needed by DATEDIFF.

Not able to test just now, but did manage a quick look in the manual.

Your question has been split to a new topic.
Back to top
View user's profile Send private message
Raja Durai

New User


Joined: 06 Jul 2008
Posts: 6
Location: chennai

PostPosted: Tue May 15, 2012 1:06 am    Post subject: Reply to: Syncsort - DATEDIFF syntax error
Reply with quote

Hi

The Below JCL would work with DATEDIFF for SYNCSORT 1.4 .

Code:
//SORT1 EXEC PGM=SORT,PARM='CENTWIN=80'                             
//SYSOUT  DD SYSOUT=*                                               
//SORTOUT DD SYSOUT=*                                               
//SORTIN  DD *                                                     
20010101 20010101                                                   
20010101 20010102                                                   
20010101 20010103                                                   
20010101 20010104                                                   
//SYSIN   DD *                                                     
 INREC FIELDS=(1,18,                                               
       DATEDIFF=(10,8,DTNS=(4MD),1,8,DTNS=(4MD),DAY),M12,LENGTH=3) 
 SORT FIELDS=COPY                                                   
/*
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: Tue May 15, 2012 7:00 pm    Post subject: Reply to: Syncsort - DATEDIFF syntax error
Reply with quote

Thanks, Raja icon_smile.gif

d
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 S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 1 Fri Dec 02, 2016 9:47 am
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm


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