Charles,

I have been watching this thread and if I am not mistaken you want to know which instructions are available (or not) at execution time. I am not knowledgeable of c/c++ but unless you compile the program at run time (with the correct arch type) you will always get an 0C1 if you execute the instruction on a machine that is incapable of executing that instruction. I would suggest that you compile at the lowest level and therefore should run on all types of the machine. If you are concerned about "efficiency" there is no real answer and you are exercising a way to get a medical condition(ulcer). Tell your boss to either ship the source and compile it whenever the machine type changes (make the customer do it). OR just ship at the lowest architected of the Z models or let the customer do it. We are probably talking about a few CPU seconds or there unless this is a MAJOR usage animal. Then I would suggest let the responsibility lie with the customer.

Ed
On Nov 29, 2015, at 4:18 PM, Charles Mills wrote:

Right. Basic problem is program is compiled for z196, customer runs it on
z10.

CSRSI gets the machine type and a lot more. CSRSI is basically a wrapper for
STSI.

I implemented the table approach but have decided to switch to Kirk's
facility bit test approach.

Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM- [email protected]] On
Behalf Of J O Skip Robinson
Sent: Sunday, November 29, 2015 12:33 PM
To: [email protected]
Subject: Re: Straightforward way to determine hardware architecture level?

I get it. There are different meanings of 'architecture level'. You need more granularity. Not knowing the ins and outs of the various control blocks
suggested by others, I would take the KISS approach with a table of
supported models and what action you would take for each. A substantial but not endless list. Inelegant, but easy(ish) to build and maintain. DISPLAY M=CPU gives detail on CPC family and model number in various formats. If a match is not found in your table, use the highest one you support and issue a warning message. You have to determine this at run time because a program could easily need to run on a machine higher or lower than one it's compiled
on.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to