IIRC, I had a similar problem once, when trying to retrieve the DS name from a 3 byte item which was located in the TIOT near the DD name. This was not possible to do using pure C, because the 3 byte item (which was an address in early stages of MVS) now is a sort of handle to an area which has moved above the line, and to translate this handle to an address, you need the SWAREQ macro.
I ended up writing a wrapper for SWAREQ, usable from C, in ASSEMBLER. Look here: CSWAREQ CSECT * *----------------------------------------------------------- * * int cswareq (char *psva, char **ppjfcb); * * PSVA IST DER ZEIGER AUF EIN SVA-HANDLE * (Z.B. DER JFBC-POINTER AUS DER TIOT). * * ZU DIESEM SVA-HANDLE LIEFERT SWAREQ * DIE ECHTE ADRESSE (DER JFCB LIEGT IN DER SWA - * SCHEDULER WORK AREA -, DESHALB IST DAS ETWAS * KOMPLIZIERTER). * * DIE ADRESSE DES JFCB WIRD IM ERFOLGSFALL AN * DEN AUFRUFER ALS 2. PARAMETER ZURUECKGEGEBEN. * *----------------------------------------------------------- * STM 14,12,12(13) LR 11,15 USING CSWAREQ,11 LA 15,SAVEAREA ST 15,8(13) ST 13,4(15) LR 13,15 * L 4,0(1) ADRESSE SVA L 5,4(1) ADRESSE DES JFCB-POINTERS * LA 6,EPA ADRESSE EPA NACH AEPA ST 6,AEPA USING ZB505,6 XC SWAEPAX,SWAEPAX EPA INITIALISIEREN * MVC SWVA,0(4) SWAREQ FCODE=RL,EPA=AEPA,UNAUTH=YES,MF=(E,SWAPARMS) * LTR 15,15 BZ RETOK * XC 0(4,5),0(5) B RET * RETOK DS 0H MVC 0(4,5),SWBLKPTR * RET DS 0H L 13,4(13) L 14,12(13) LM 0,12,20(13) BR 14 * *----------------------------------------------------------- * SAVEAREA DS 18F * AEPA DS A EPA DS CL28 * SWAPARMS SWAREQ MF=L * CVT DSECT=YES * IEFJESCT * IEFZB505 LOCEPAX=YES * END HTH, kind regards Bernd Am 05.02.2018 um 17:29 schrieb Patrick Roehl:
I'm writing some new code in C++ and can't find how to get info normally found in RDJFCB. Specifically, I'm looking for getting info on an existing dataset: space used, unit & volser, disposition, etc. ---------------------------------------------------------------------- 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