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

Conversion of PDS to Sequential files.


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

New User


Joined: 29 Mar 2006
Posts: 3
Location: Kol

PostPosted: Thu Mar 30, 2006 10:30 am
Reply with quote

I have to read a PDS in a cobol program and then update a particular member of that PDS.
What should be the approach.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu Mar 30, 2006 11:12 am
Reply with quote

Not knowing exactly what you want to do, I would use the ISPF Library Management (LM) Services in the following order:

LMINIT to initialize the services.
LMOPEN to allocate and open the PDS.
LMMLIST to list the PDS members and allow processing by one member at a time.
LMGET to read the PDS member contents.
LMPUT to write the particular PDS member contents.
LMCLOSE to close and free the PDS.

As an alternative, you could convert the PDS into a sequential dataset using either TSO PRINTDS or the IEBPTPCH Program, read the contents until the appropriate member information is found, then build an IEBUPDTE suitable output dataset and do the update.
Back to top
View user's profile Send private message
shob

New User


Joined: 29 Mar 2006
Posts: 3
Location: Kol

PostPosted: Thu Mar 30, 2006 12:20 pm
Reply with quote

Actually What I have to do :
First I have to copy all members of PDS in to PS, so that I can read this PS in to Cobol program then in this program I have to update one or more Member of the PDS(now PS). and then again Put the updated PS in to PDS with same member list.
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 Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts 10 byte RBA conversion DB2 2
No new posts 10 byte RBA conversion -non applicati... JCL & VSAM 1
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top