Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to Delete first two lines of each member in PDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to Delete first two lines of each member in PDS
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    Post subject:
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

Moderator Team Head


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

PostPosted: Fri Feb 10, 2006 9:39 pm    Post subject: Re: How to Delete first two lines of each member in PDS
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

Moderator Team Head


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

PostPosted: Fri Feb 10, 2006 9:46 pm    Post subject: Re: How to Delete first two lines of each member in PDS
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts Delete IMS remote transaction when MO... Sam Singh IMS DB/DC 0 Wed Aug 23, 2017 9:12 pm
No new posts member list compare jzhardy TSO/ISPF 6 Fri May 12, 2017 3:18 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Browsing member from any PDS shiitiizz CLIST & REXX 7 Wed Mar 08, 2017 1:17 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us