It's not foolproof, but for both HLL's and assembler the COBANALZ program in CBT file 321 will give you (in the SUMMARY DD output) a pretty good guess at the compiler or assembler version that generated the code. From that you could extrapolate the minimum hardware level required based on the announcement letter for that release of each language's compiler. Crude, but possible, though COBANLZ does not handle "unbound object code", only executables (load module or P.O.).
For HLL compilers that allow you to generate the pseudo-assembler equivalent of the compiled code, you can analyze the compiler listing for instruction uses, but if you only have executable code, obviously that is no help. For executable-only (no source or listing available) assembler, you would need to decode the executable into instructions and data (not trivial by any means) to build a list of instructions used. An instruction trace program like TRACE390 in CBT file 391 could help there, assuming you have the files and JCL needed to run the program once through the trace program. The trace output would provide you with a list of instructions executed to analyze for hardware level. The caveat there is that AFAIK CBT file 391 has not been updated in quite a while and lacks many of the newer z-architecture instructions, not least the whole suite of vector instructions. Running any kind of instruction trace has the caveat that not all instruction paths are guaranteed to be executed, and there could easily be instructions requiring a higher architecture level hiding in un-executed code. In general, if all you have is executable code, I would call this one of those "hard problems". Peter -----Original Message----- From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Mike Hochee Sent: Tuesday, December 8, 2020 5:50 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Determining required z/series hardware level - REVISED Oops, got the hardware lvl for AHI wrong, so changed 'G9' to 'G10' Hi, I'm looking for a utility/program which is capable of reading a z/OS executable, whether an lmod or program object, or unbound object code, and examining it for hardware/architecture level compatibility. I'm not specifically referring to the ARCLVL of on the SYSSTATE macro, although I know there is some correspondence, but rather to the set of unprivileged instructions introduced at a particular hardware architecture levels. Apologies in advance for any imprecise/inaccurate terminology. For example, let's say I happen to know that the most recently introduced z/Series instruction used by a particular executable is the AHI instruction, then I would expect this utility/program to output 'G10', suggesting the minimum hardware architecture required to support execution. I understand things are not always black/white in this area and could be clouded by instruction facility requirements, etc.. Thanks in advance for any suggestions, guidance. Mike -- 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