View previous topic :: View next topic |
Author |
Message |
meetrb Beginner
Joined: 24 Nov 2003 Posts: 40 Topics: 15
|
Posted: Mon Apr 12, 2004 4:04 am Post subject: Inserting a line using Sort |
|
|
Hi,
I need to insert a line between records in a member of a pds.
Ex:
If the current data in the member is:
AAA
BBB
I want the line xxx_yyyymmddhhmmss to be inserted in between the two lines. The 'yyyymmddhhmmss' being substituted with the current date and time.
The data would then become:
AAA
xxx_20040412201201
BBB
The sort step would be present in a daily job. Therefore if the line is already present I want to replace the existing date and time with the current date and time.
I got the initial start after I went thorugh the following links
http://www.mvsforums.com/helpboards/viewtopic.php?t=940
http://www.mvsforums.com/helpboards/viewtopic.php?t=1647
http://www.mvsforums.com/helpboards/viewtopic.php?t=1948
But can this be done using SORT?
There is a restriction that I cannot use any REXX execs.
Thanks,
Meetrb |
|
Back to top |
|
|
Dibakar Advanced
Joined: 02 Dec 2002 Posts: 700 Topics: 63 Location: USA
|
Posted: Mon Apr 12, 2004 5:28 am Post subject: |
|
|
Do you have only two records in your input file? If there are a lot then SAS/Easytrieve looks a better candidate for the solution. |
|
Back to top |
|
|
meetrb Beginner
Joined: 24 Nov 2003 Posts: 40 Topics: 15
|
Posted: Mon Apr 12, 2004 5:54 am Post subject: |
|
|
There will be around 10 to 15 records in the member.
I had just given the two records as an example. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Mon Apr 12, 2004 8:26 am Post subject: |
|
|
meetrb,
Will it be always the second record ? or a different one? Let me know the exact line number you want to insert/update the record. Also I am assuming that since your input is a pds , it has lrecl of 80 and is of FB RECFM.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
|
|