Except that Enterprise COBOL restricts "ADDRESS OF" so that items in the FILE section may NOT be used, and a FILE cannot be used as a parameter to a CALLed subroutine unless it is a QSAM file. VSAM files are specifically excluded from being used as an argument in a CALL statement. At least they are in Enterprise COBOL V4.1, don't know about V5.1.
<*Gr-r-r*> Peter -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Chambers, David W. Sent: Monday, February 10, 2014 4:06 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: file types Long, long time ago the COBOL FD was just a pointer to the DCB: pass the FD to a subprogram and map any DCB fields of interest in LINKAGE-SECTION, passing back any required information to caller. More modern versions of COBOL and LE may well have clobbered that method but I recall doing a similar thing for PL/I via the FIB(?) when we converted to Enterprise flavor. Memory fades and I've never been a PL/1 programmer. In any case, "SET ADDRESS" opens up the world of programmer-accessible z/OS control blocks to COBOL and a good starting place is often your TCB which is pointed to in offset x'21C' in the PSA. You don't *need* to write in Assembler unless you just want to. Never anything wrong with writing Assembler, IMHO. Don't forget that the DDNAME in the DCB is overwritten after OPEN. I may have forgotten that once or, well, more than twice. -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN