One caution: Make sure the DD name variable is blank-padded to 8 characters or 
DEVTYPE will not work correctly (the trailing "\0" from strcpy will give you 
grief).

Peter

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Charles Mills
Sent: Tuesday, July 30, 2019 11:21 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: XTIOT impact?

Thx

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Farley, Peter x23353
Sent: Tuesday, July 30, 2019 11:00 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: XTIOT impact?

char dvt_ddname[9];
int dvt_retcode;
long long int devtype_info;

strcpy(dvt_ddname, "MYDDNAME");              
__asm(" DEVTYPE %2,%0\n ST 15,%1"            
      : "=m"(devtype_info), "=m"(dvt_retcode)
      : "m"(dvt_ddname)                      
      : "r0","r1","r15" );                   
if (dvt_retcode) {                           
   /* DD Name is NOT present */                             
} else {                                     
   /* DD Name IS present */
}                                            

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of 
Charles Mills
Sent: Tuesday, July 30, 2019 10:45 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: XTIOT impact?

The trouble with us darn mainframers -- we don't do change very well. __asm 
came along to C++ somewhere around V2R2 or V2R3.

Thanks. I will have to give DEVTYPE a shot and figure out how to translate it 
into __asm. I've never done __asm (for the aforementioned reasons).

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

This message and any attachments are intended only for the use of the addressee 
and may contain information that is privileged and confidential. If the reader 
of the message is not the intended recipient or an authorized representative of 
the intended recipient, you are hereby notified that any dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please notify us immediately by e-mail and delete the message and any 
attachments from your system.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to