I'm going to suggest something a little different. Let me say that I'm not against what Cameron is trying to do. I've done the run the control block thing and I've done the RDJFCB thing.
In the original email the statement was made. "But in emergency, support could override SYSOUT=* with SYSOUT=mydatasetName and my program will be able to determine we can honour the DISPLAYs." I'm assuming that the override would be some type of JCL change. Well what about just adding a parm to the JCL that is used to indicate to do the display or not to do the display. Keep the SYSOUT as a FQDN, maybe a GDG that only has two or three versions. So now the COBOL code checks the parm to indicate how to handle the display stuff. Just a little different way of looking at things. Paul -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Kirk Wolf Sent: Tuesday, March 26, 2024 10:46 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: How can I determine MVS FQDSN from DD Name in Batch COBOL Program? IMO, a assembler subroutine that does RDJFCB is a better option than chasing control blocks. I wrote one that we call from our C++ product and its about 120 lines of assembler code, with XPLINK linkage. However, we use EDCDSECT to convert the JFCB dsect to a C header so that you can look at anything you want from C/C++. It's been very reliable for many years in all sorts of use cases. Kirk Wolf Dovetailed Technologies http:// <http://dovetail.com>coztoolkit.com ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN