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
 

 

Insert Current Date using Syncsort

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

New User


Joined: 05 Jan 2008
Posts: 15
Location: Sacramento, Ca

PostPosted: Tue Jun 03, 2008 12:32 am    Post subject: Insert Current Date using Syncsort
Reply with quote

I've searched the forum and unable to find my answer.
I'm trying to insert the current date using syncsort. Below is what I currently have:

Code:

  JOINKEYS FILES=F1,FIELDS=(1,15,A)                       
  JOINKEYS FILES=F2,FIELDS=(1,15,A)                       
  JOIN UNPAIRED,F2,ONLY                                   
  SORT FIELDS=COPY                                         
   OUTFIL FILES=01,OUTREC=(1,121),REMOVECC,               
    TRAILER1=('TOTAL TAPE COUNT: ',COUNT=(M11,LENGTH=4))   
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Tue Jun 03, 2008 1:08 am    Post subject:
Reply with quote

Have you looked at the various &DATE parameters?
SyncSort 2.76 for z/OS 1.2 Programmer’s Guide wrote:
&DATE
The &DATE subparameter specifies the current system date and requires 8 bytes to display mm/dd/yy.
Back to top
View user's profile Send private message
Evantra

New User


Joined: 05 Jan 2008
Posts: 15
Location: Sacramento, Ca

PostPosted: Tue Jun 03, 2008 1:19 am    Post subject: Insert Current Date using Syncsor
Reply with quote

Thanks for the reply CICS Guy,

I did try that before I posted here and it did not work. I put it in the trailer. Maybe I coded it wrong there somehow.

Thanks
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 Jun 03, 2008 1:28 am    Post subject:
Reply with quote

Hello Ed and welcome to the forums,

I'll confess to being a bit confused. Your request mentions getting the current date into the output, but your example shows creating a trailer with a record count - with the M11 specified.

Here's an example of getting the current date into the output records - the data isn't much use, but notice that "today" is in the first 8 bytes of the output records.

Code:

//SORTIN   DD *                     
123456789012345678901234567890     
234567890123456789012345678901     
/*                                 
//SORTOUT  DD SYSOUT=*             
//SYSIN    DD *                     
    SORT FIELDS=COPY               
    OUTREC FIELDS=(&DATE1,         
                   8,72)           
/*                                 

gives:

2008060289012345678901234567890 
2008060290123456789012345678901 


Something that is always useful is if along with a question, sample input and desired output from that input is shown. Mentioning the dsorg/lrecl can also save time.
Back to top
View user's profile Send private message
Evantra

New User


Joined: 05 Jan 2008
Posts: 15
Location: Sacramento, Ca

PostPosted: Tue Jun 03, 2008 1:36 am    Post subject: 'Insert Current Date using Syncsort
Reply with quote

I will try that. Thanks for the help and suggestions!
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Tue Jun 03, 2008 8:33 pm    Post subject: Re: Insert Current Date using Syncsort
Reply with quote

Ed VanBebber wrote:
I've searched the forum and unable to find my answer.
I'm trying to insert the current date using syncsort. Below is what I currently have:

Code:

  JOINKEYS FILES=F1,FIELDS=(1,15,A)                       
  JOINKEYS FILES=F2,FIELDS=(1,15,A)                       
  JOIN UNPAIRED,F2,ONLY                                   
  SORT FIELDS=COPY                                         
   OUTFIL FILES=01,OUTREC=(1,121),REMOVECC,               
    TRAILER1=('TOTAL TAPE COUNT: ',COUNT=(M11,LENGTH=4))   

Try this:
Code:
   OUTFIL FILES=01,OUTREC=(1,121),REMOVECC,               
    TRAILER1=('TOTAL TAPE COUNT: ',COUNT=(M11,LENGTH=4),   
       45:&DATE)     

Position 45 can be changed to any position per your requirements.
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 Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
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


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