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).

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of David Crayford
Sent: Monday, July 29, 2019 8:04 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: XTIOT impact?

__asm() is perfectly valid for C++. I used it all the time. 

> On 30 Jul 2019, at 6:00 am, Charles Mills <charl...@mcn.org> wrote:
> 
> Thanks. __asm is C but not C++, unfortunately.
> 
> Charles
> 
> 
> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] 
> On
Behalf Of Farley, Peter x23353
> Sent: Monday, July 29, 2019 5:37 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: XTIOT impact?
> 
> If all you need to know is whether a DD name is allocated or not, I 
> think
the DEVTYPE macro is the simplest method.  Any non-zero return code indicates 
non-existence once you have the macro invocation working (there is a "syntax" 
RC that you will never get after you have it coded to work).
> 
> And DEVTYPE is very simple to code as an "__asm" statement in XL C/C++.

--

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