MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Inserting a line using Sort

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
meetrb
Beginner


Joined: 24 Nov 2003
Posts: 40
Topics: 15

PostPosted: Mon Apr 12, 2004 4:04 am    Post subject: Inserting a line using Sort Reply with quote

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
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Mon Apr 12, 2004 5:28 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
meetrb
Beginner


Joined: 24 Nov 2003
Posts: 40
Topics: 15

PostPosted: Mon Apr 12, 2004 5:54 am    Post subject: Reply with quote

There will be around 10 to 15 records in the member.
I had just given the two records as an example.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Mon Apr 12, 2004 8:26 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group