You will always see a FQDSN for an allocated dataset; you will need to parse the name to determine whether it is a temporary or SPOOL dataset.
There are several supported was to obtain the DSN, RDJFCB with a JFCB exit RDJFCB with an ARL exit DAIR SVC 99 BPXWDYN All but the last are assembler only. -- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 עַם יִשְׂרָאֵל חַי נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר ________________________________________ From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of Cameron Conacher <000003cfc59146bb-dmarc-requ...@listserv.ua.edu> Sent: Monday, March 25, 2024 11:46 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: How can I determine MVS FQDSN from DD Name in Batch COBOL Program? Hello. Back again. Previously I had inquired about retrieving RACF details from the MVS control Blocks at runtime. Name I would like to retrieve the Fully Qualified Data set name for a specific DD (SYSOUT). Why? Well I would like my COBOL program to allow COBOL Displays in Production ONLY when the User specified a FQDN. If the JOB has SYSOUT DD *, then I will skip the COBOL displays to prevent filling the SPOOL. But in emergency, support could override SYSOUT=* with SYSOUT=mydatasetName and my program will be able to determine we can honour the DISPLAYs. Yeah, maybe this is a make work project? Maybe the pain killers working over time? Thanks Cameron Conacher Senior Engineer American Express Canada Inc. GCICS 2225 Sheppard Avenue East, Toronto, ON M2J 5C2 cameron.conac...@aexp.com<mailto:cameron.conac...@aexp.com> Office: 1-437-836-5265 Mobile: 1-416-409-5147 https://amex.webex.com/join/cameron.conacher Note I will be OOO on PTO March 23 throough March 31 2024 inclusive. ________________________________ American Express made the following annotations ________________________________ This e-mail was sent to you by a representative of Amex Bank of Canada, P.O. Box 3204, Station "F", Toronto, ON, M1W 3W7, http://www.americanexpress.ca/. If you no longer wish to receive these e-mails, please notify the sender by reply e-mail. This e-mail is solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by reply e-mail and immediately and permanently delete this e-mail and any attachments. Thank you. American Express a fait les remarques suivantes Ce courriel vous a ?t? envoy? par un repr?sentant de la Banque Amex du Canada, C.P. 3204, succursale F, Toronto (Ontario) M1W 3W7, http://www.americanexpress.ca/. Si, par la suite, vous ne souhaitez plus recevoir ces courriels, veuillez en aviser les exp?diteurs par courriel. Ce courriel est r?serv? au seul destinataire indiqu? et peut renfermer des renseignements confidentiels et privil?gi?s. Si vous n'?tes pas le destinataire pr?vu, toute divulgation, duplication, utilisation ou distribution du courriel est interdite. Si vous avez re?u ce courriel par erreur, veuillez en aviser l'exp?diteur par courriel et d?truire imm?diatement le courriel et toute pi?ce jointe. Merci. ---------------------------------------------------------------------- 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