Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Tue Dec 03, 2002 11:43 am Post subject: Insert date and time of run (timestamps) into records
For information on how you can use the DATEn, DATEn(c), DATEnP, TIMEn, TIMEn(c) and TIMEnP options of DFSORT's INREC, OUTREC and OUTFIL OUTREC statements to insert timestamps into your output records, see the "How can I put timestamps in my output records?" Ask Professor Sort item at:
Joined: 02 Dec 2002 Posts: 70 Topics: 19 Location: California
Posted: Wed Feb 12, 2003 4:15 pm Post subject:
Is it possible insert date timestamps into output records using SYNCSORT ? _________________ Venkataramana
-- Good judgement comes from experience, and often experience comes from bad judgement.
Joined: 26 Nov 2002 Posts: 12367 Topics: 75 Location: San Jose
Posted: Wed Feb 12, 2003 5:21 pm Post subject:
Venkata ramana reddy,
Yes you can add the date and time into the output records using syncsort. Post the details of the output file i.e LRECL,RECFM, and the date & time format and position of the fields.
Joined: 02 Dec 2002 Posts: 70 Topics: 19 Location: California
Posted: Wed Feb 12, 2003 9:21 pm Post subject:
Kolusu,
Here are the details you wanted :
Code:
LRECL : 80
RECFM : FB
Date Format : MMDDYY
Position : 1 to 8
Awaiting for your early reply..... _________________ Venkataramana
-- Good judgement comes from experience, and often experience comes from bad judgement.
Joined: 26 Nov 2002 Posts: 12367 Topics: 75 Location: San Jose
Posted: Wed Feb 12, 2003 10:06 pm Post subject:
venkata ramana reddy,
The following Jcl will give you the desired results.A brief explanation of the job.
The first copy operator gets the system date in MM/DD/CCYY format.The second copy operator takes this date and creates the control cards for the actual copy of the input DSN.The output from this copy would be as follows:
Code:
OUTREC FIELDS=(C'02122003',1,72)
Now the 3rd copy uses that control card and creates the output with the current date in 1st postion followed by 72 bytes from the input file for a total length of 80 bytes.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Feb 13, 2003 1:10 pm Post subject:
For the record, here's the easier way to do this with DFSORT (although the job above would work with DFSORT's ICETOOL as well):
Code:
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION COPY
* Generate current date in form C'yyyymmdd'
INREC FIELDS=(DATE1,1,72)
* Rearrange date to C'mmddyyyy'
OUTREC FIELDS=(5,4,1,4,9,72)
/*
To get the date as mmddyy instead of mmddyyyy, the OUTREC statement would be:
Code:
OUTREC FIELDS=(5,4,3,2,9,72)
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Joined: 02 Dec 2002 Posts: 70 Topics: 19 Location: California
Posted: Thu Feb 13, 2003 1:20 pm Post subject:
Kolusu,
Thank you very much. Your solution worked.
Frank: I do not have DFSORT in our shop. We use SYNCSORT _________________ Venkataramana
-- Good judgement comes from experience, and often experience comes from bad judgement.
Joined: 02 Dec 2002 Posts: 100 Topics: 2 Location: Pasadena, California, USA
Posted: Thu Feb 13, 2003 1:28 pm Post subject:
Venkata Ramana Reddy,
What Frank is saying is he works for IBM and "wrote the book" on DFSORT. As a competive product, SYNCSORT belongs to another vendor. It would not be professional of him to tell you how to use a competitor's tool. And it could also cause legal and professional problems for him if he did.
Let me also add that when a DFSORT solution is presented, and you have SYNCSORT, just try it to see if it works. Oftentimes they do.
Disclaimer: I do not work for a software vendor and can make that suggestion.
Last edited by CaptBill on Thu Feb 13, 2003 2:37 pm; edited 1 time in total
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Feb 13, 2003 2:30 pm Post subject:
Venkata,
Yes, I know you use Syncsort. I didn't give the DFSORT solution for you. I gave it for all of the DFSORT users who might do a search on this very often asked question and find this thread. That's why I said "for the record". _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum