I assume you have a way to poke around in a live address space, perhaps not even your own, and examine control blocks. The TIOT's DDname is findable from the TCB, so presumably you can find the TCB. In the TCB is the address of the first OPENed DEB. Find that DEB and run through the chain of DEBs until you come to the one with the same TIOT offset in the TIOT's DDname entry you are interested in. Within that DEB is the address of the OPENed DCB. Find that DCB and make sure that it has been OPENed (examine the flag bit that says the DCB is OPEN; I think it is at offset X'31'; just be sure you know where offset 0 is, because the DCB, like many other ancient structures, is complex, and it has a prefix). With the help of a mapping DSECT of the DCB, look at the flag bytes within the DCB that describe the types of I/O requests that will be made against the DDname (read, write, check, get locate, put move, etc.). If you don't see any flag bits indicating any kind of write or! put, then it's read-only.
At least that was the way we wrote the code in TMON/MVS in 1987. Bill Fairchild Rocket Software -----Original Message----- From: IBM Mainframe Assembler List [mailto:[email protected]] On Behalf Of Scott Bennett Sent: Wednesday, September 01, 2010 3:54 PM To: [email protected] Subject: Any ideas on how to know if a DDNAME is input or output? I need to know if a DDNAME is input or output to a job step, I know some can be both but will handle that manually. I was planning to use informatino found in TIOT and/or JFCB to determine if a DDNAME looks like somthing that is input or looks like output. Has anyone had to perform this task? If so how did you make a best guess on a DDNAME being input or output? Thanks, Scott
