William (and Bill), many thanks for your answer.
ridicules that i did not found this info by myself. :-( Mvg, Hans Visser Technisch Specialist Getronics PinkRoccade Fauststraat 1, 7323 BA Apeldoorn Postbus 9105, 7300 HN Apeldoorn T: +31 646091151 F: M: +31 646091151 E: [EMAIL PROTECTED] I: www.getronicspinkroccade.nl -----Original Message----- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] Behalf Of William H. Blair Sent: woensdag 4 juni 2008 13:24 To: IBM-MAIN@BAMA.UA.EDU Subject: Re: DASD or VIO Hans Visser asked: > How can i determine in an assembler program whether > a dataset is allocated on dasd or vio? There are many ways to skin this cat. We'll start with the simple way. If that's not appropriate, we can get into the more esoteric ways later. I'll first assume that the data set in question is already allocated to a DDNAME which is NOT part of a concatenation. (If it is, then you will have to look at the DEB associated with an OPEN DCB and then find and examine the UCB address for the specific data set/concatenation number in question. Alternatively, you can make this same, or a different, type of determination in the standard OPEN DCB EXIT.) But the most straightforward way is to just read the JFCB for the DDNAME (which can be done without having to OPEN a DCB for the data set) and examine a flag bit in the JFCB. Here's some sample code that does this; it illustrates how to read the JFCB for a DDNAME, just in case you or someone else needs it. Note that this code is an AMODE 24 program and is not elegant, but it does work. MVC SMFLIB,MSMFLIB COPY "SMFLIB" DCB TO WORK AREA LA R7,SMFJFCB -> "SMFLIB" JFCB USING JFCB,R7 INFORM THE ASSEMBLER LA R8,SMFLIB -> "SMFLIB" DCB USING IHADCB,R8 INFORM THE ASSEMBLER ST R7,SMFXLST SET JFCB ADDRESS IN EXIT LIST MVI SMFXLST,X'87' SET JFCB EXIT ID LA R0,SMFXLST -> EXIT LIST ST R0,DCBEXLST SET EXIT LIST PTR IN DCB MVC RDJFCBL,MRDJFCB COPY PARM LIST TO WORK AREA RDJFCB SMFLIB, READ "SMFLIB" JFCB X MF=(E,RDJFCBL) LTR R15,R15 "SMFLIB" FILE ALLOCATED ? BNZ NOSMFLIB BRANCH IF NOT TM JFCFLGS1,JFCVRDS ALLOCATED TO VIO PSEUDO-DASD? BO TYPEVIO BRANCH IF YES ... DROP R7 DROP "SMFLIB" JFCB DROP R8 DROP "SMFLIB" DCB ... MRDJFCB RDJFCB *-*, X MF=L MRDJFCBZ EQU *-MRDJFCB MSMFLIB DCB DDNAME=SMFLIB, X DSORG=PS, X MACRF=GM SMFDCBZ EQU *-MSMFLIB MOPEN OPEN (*-*,(INPUT)), X MF=L MOPENZ EQU *-MOPEN ... DSA DSECT , DS 18F SAVE AREA RDJFCBL DS XL(MRDJFCBZ) RDJFCB PARM LIST OPENL DS XL(MOPENZ) OPEN PARM LIST SMFXLST DS A "SMFLIB" RDJFCB EXIT LIST DS 0D SMFLIB DS XL(SMFDCBZ) "SMFLIB" (QSAM) DCB DS 0D SMFJFCB DS XL176 "SMFLIB" JFCB * IEFZB4D0 , IEFZB4D2 , IKJEFFDF DFDSECT=YES JFCB DSECT , IEFJFCBN , DCBD DEVD=DA, X DSORG=PS IECEQU , -- WB ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html