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 Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts SMTP the current generation number of... Jyothi Kulunde JCL & VSAM 4 Thu May 04, 2017 4:08 pm
No new posts LISTIDR compiled date/time jerryte IBM Tools 3 Thu Apr 20, 2017 7:37 pm
No new posts SUBSTR for Date functions Shaheen Shaik DB2 4 Thu Apr 06, 2017 2:14 pm
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm


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