Are you prevented from using the Library Services (LM) functions from ISPF?  If 
not, that would be a way in Cobol to do this.  


Lizette


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Ze'ev Atlas
Sent: Saturday, July 06, 2013 8:31 PM
To: [email protected]
Subject: Reading PDS/PDSE members from within COBOL in a loop

Hi All
I would assume that this question was asked many times before, but I could not 
have yet find the answer.

I need to write a native z/OS COBOL program and it cannot be done in any of the 
other popular languages or environments for the reasons enumerated below.  The 
program should be a driver that gets a PDS or PDSE library name, reads the 
directory of that library and then opens each member in turn in a loop and 
reads it and apply some process that uses calls to some LE package.  Could that 
be done and is there any freely available sample code?


Reasons why I cannot use other solutions I know that there are other GREAT 
solutions, by far better then my solution.  I agree in advance with anybody who 
has a better solution, but I am not interested:
I do not know PL/I well enough and am not interested in improving my knowledge.
Rexx would not cut it in this case because Rexx interface with persistent LE 
environment is complicated I know how to do it in Assembler but I am refraining 
from coding in Assembler any more It cannot be using USS as the whole purpose 
of the project is doing something from within native z/OS.
I am not interested in the existing IBM (or vendor) utilities since I need  to 
apply my process to each member and each line in that member.  Also, vendor 
utilities may not be available to everybody.


The only solution other then COBOL driver that I could consider is if it could 
be done from within the SORT utility (as the driver) because of its ubiquity, 
but I could not figure out whether and how it could be done.

Thanks
ZA

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to