View previous topic :: View next topic
|
Author |
Message |
shob
New User
Joined: 29 Mar 2006 Posts: 3 Location: Kol
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
shob
New User
Joined: 29 Mar 2006 Posts: 3 Location: Kol
|
|
|
|
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 |
|
|
|