IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to Delete first two lines of each member in PDS


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kalyanatiit

New User


Joined: 04 Sep 2005
Posts: 8

PostPosted: Thu Feb 09, 2006 5:06 pm
Reply with quote

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

New User


Joined: 23 Nov 2005
Posts: 69
Location: Minneapolis, MN USA

PostPosted: Fri Feb 10, 2006 2:52 am
Reply with quote

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

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Feb 10, 2006 9:39 pm
Reply with quote

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

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Feb 10, 2006 9:46 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts DELETE SPUFI DB2 1
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
No new posts Searching for a member but don't know... TSO/ISPF 6
Search our Forums:

Back to Top