IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Insert Current Date using Syncsort


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 2146
Location: At my coffee table

PostPosted: Tue Jun 03, 2008 1:08 am
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
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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Jun 03, 2008 1:28 am
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
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: 496
Location: USA

PostPosted: Tue Jun 03, 2008 8:33 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts Need to convert date format DFSORT/ICETOOL 20
Search our Forums:

Back to Top