Posted: Wed Apr 20, 2011 2:58 pm Post subject: Reading all members of a PDS and extracting pgm exec
Since last week, I have to write a Cobol program which reads all the members of a PDS, one by one, and collect some information, such as the pgm exec.
I've looked online, and the only interesting answer was on this forum but answering an other problem (listing all members of a PDS).
I've seen some website dealing with the subject. It suggest "dynamically allocating one member, opening, reading, closing, and dynamically allocating the next member", but I don't know how to do that.
Can somebody explain me that ?
Am-I on the good direction ?
why not use batch 3.14/3.15 to search for selected items?
use the IDPFX parm, which will place the members name to the left on everyline.
then you can write a cobol program to parse the output. _________________ Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.
You can use ISPF Library Management (LM) Services to do this whole process without having to deal with dynamic allocation. The ISPF Services will deal with all of that for you. The downside, or course, is that you will have to learn how to use them properly.
Is there any reason why you can't convert the PDS to a sequential dataset first using IEBPTPCH, and then process that instead?
Joined: 09 Aug 2008 Posts: 1631 Location: Mumbai, India
Posted: Thu Jun 16, 2011 1:39 pm Post subject: Re: Reading all members of a PDS and extracting pgm exec
I have to write a Cobol program which reads all the members of a PDS, one by one, and collect some information, such as the pgm exec.
I fyou just need the program name on EXEC - I'm with Dick and Kevin. ISPF 3.14/5 and IEBPTPCH will give you intermediate output and then you can even use a simple SORT application to get what you want. _________________ Regards,
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum