View previous topic :: View next topic
|
Author |
Message |
chinnielr
New User
Joined: 11 Jul 2005 Posts: 87
|
|
|
|
I have a PS file of LRECL 700. I need to insert current date at the end of the file. The date format I need to insert is mmddyyyy. Now my LRECL should be 708. Please let me know the optimumway of acheiving this.
Thanks in advance,
Chinni. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
chinnielr wrote: |
I have a PS file of LRECL 700. I need to insert current date at the end of the file. The date format I need to insert is mmddyyyy. Now my LRECL should be 708. Please let me know the optimumway of acheiving this. |
I assume you mean "at the end of the record" rather than "at the end of the file"... No matte, have you looked at the sort manual? What you ask is very simple and efficient, something like a sort/copy with an outrec to add the extra 8 bytes. You do have access to a manual, don't you? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Chinni,
Here's a DFSORT job that will insert the current mmddyyyy date at the end of each record:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB/700)
//SORTOUT DD DSN=... output file (FB/708)
//SYSIN DD *
OPTION COPY
INREC OVERLAY=(709:DATE1)
OUTREC BUILD=(1,700,701:713,4,709,4)
/*
|
|
|
Back to top |
|
|
|