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

  • ... Graham Hobbs
    • ... James Robinson
      • ... Chase, John
    • ... Chase, John
      • ... Doc Farmer
        • ... HARDING, JERRY (CTR)
    • ... Brian Westerman
    • ... Timothy Sipples
      • ... Visser, Hans (PinkRoccade Infrastructure Services Technisch Specialist)
        • ... William H. Blair
          • ... Visser, Hans (PinkRoccade Infrastructure Services Technisch Specialist)
        • ... Binyamin Dissen
      • ... Chase, John
    • ... Bill Klein
    • ... Timothy Sipples
      • ... Chase, John

Reply via email to