View previous topic :: View next topic
|
Author |
Message |
kalyanatiit
New User
Joined: 04 Sep 2005 Posts: 8
|
|
|
|
Hai all,
somebody can provide me JCL, will do that " deleting first 2 lines of each member in PDS". I have a PDS with more than 100 of members.
solution with code would be appreciated.
thanks alot,
Kalyan. |
|
Back to top |
|
|
mak_tcs
New User
Joined: 23 Nov 2005 Posts: 69 Location: Minneapolis, MN USA
|
|
|
|
Hi,
U can easily do it by a REXX macro;
Read PDS member as a sequential file and then execute delete 2 which deleted first two lines of that member. Do this for rest of the members.
Thanks,
Mani |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
While I agree with Mani that this is a process that is much better suited to a custom-written program, you did ask for a JCL solution. The steps would be as follows:
1. A possible couple of steps to create the member list, and format it into a straight list of members. This link shows an example of how to create a member list in batch. The SAS language also has some built-in processes that deal with PDS datasets and member processing.
2. For each member in the list, build JCL to copy the contents of the member to a temporary dataset, and write the contents back into the member minus the first two records. It would probably work best to create and submit one job for each member in the list. The DFSORT/ICETOOL program would work well for this task. Look in the DFSORT forum for examples of copying data with the STARTREC= option. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Also, do NOT ask for entire solutions with the code unless you (or your company) are willing to pay for someone's time and effort.
This is your project that you have been asked to do, not ours. Many of the members are working professionals with their own work that they are being paid to do. This is an open forum for the exchange of ideas, and we are not assets at your personal disposal. |
|
Back to top |
|
|
|