Am 20.03.2015 um 01:07 schrieb Walt Farrell:
On Thu, 19 Mar 2015 18:43:45 -0500, Dale R. Smith <[email protected]> 
wrote:

If you are not adverse to chasing MVS control blocks from COBOL code, (instead 
of using a system interface like RDJFCB), then take a look at some sample COBOL 
code written by Gilbert Saint-Flour at the bottom of this page:  
http://gsf-soft.com/Freeware/

In particular, COB2JOB and COB2SYS.

I don't think you can safely get dsnames for allocated ddnames just by chasing 
control blocks. That _can_ work with if the system is configured to have SWA 
below the line, but I wouldn't want to count on having that configuration in 
effect. As soon as you have SWA above the line I think you have to use SWAREQ 
or some other system service to do at least part of the processing.

That's what I did: all the control block chasing in C,
and SWAREQ with a small ASSEMBLER subprogram,
callable from C.

This is a general pattern for enabling C programs to do
system related processing: identify services that can't be
done using pure C and write small ASSEMBLER function
blocks for them which can be called by C. I have written
lots of them over the years, one for example: get the current
contents of the general registers (escpecially register 13); that
enables me to do a stack trace (calling hierarchy, including
function names etc.) without using ASSEMBLER ... all in C.

Kind regards

Bernd

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

Reply via email to