Description of D26C
Download count: 18 this month, 1383 altogether.
Downloads for D26C:
VMARC archive: v-81K
D26C is a program to display the output of diagnose x'26C'. While the same information is generally available through various QUERY commands, if you need the information within a program it is desirable to make the diagnose call and use its output rather than attempting to issue a CP QUERY and screen scrape. This package is intended as a demonstration of accessing the diagnose from a high level language (C). You are welcome to use the program as it is; however, the real purpose is to allow you to imitate the portions of the source code that you need in order to call diagnose x'26C' from your own programs.
To run the D26C program as it is, simply type "D26C" and press Enter. This will give you the list of valid invocations. Each is "D26C" followed by a number indicating the subcode, and then additional text depending on the subcode. So for example to invoke subcode 20 with the input VSWitch name HORSE, use
d26c 20 HORSEThe diagnose uses blanks in some subcode parameters to mean "I want them all"; the way to tell the program this is to use the word "BLANKS", e.g.
d26c 20 BLANKSBe aware that case is significant in the parameters, and generally your inputs will need to be uppercase. To illustrate:
q vswitch horse VSWITCH SYSTEM HORSE Type: QDIO Connected: 0 Maxconn: INFINITE PERSISTENT RESTRICTED IP Accounting: ON USERBASED LOCAL ... Ready; T=0.01/0.01 15:03:35 d26c 20 horse Error. RY1 = 4 Ready; T=0.01/0.01 15:03:45 d26c 20 HORSE Version number: 00010005 Virtual Switch Count: 1 ** Vswitch name: HORSE Type 1: IP (Layer 3) ... Ready; T=0.01/0.01 15:03:55
This package includes the following files.
- D26C MODULE -- Executable
- D26C C -- Primary source code
- HCPCSIBK HFIX -- .h file generated from HCPCSIBK COPY and POSTDING EXEC
- POSTDING EXEC -- Tool to help generate HCPCSIBK .h file
We generate the HCPCSIBK.h file from HCPCSIBK COPY, name it as appropriate -- for this package we have accepted the name POSTDING gives by default, HCPCSIBK HFIX -- and "#include" it in D26C.C. HCPCSIBK COPY is contained in HCPGPI MACLIB, which normally is to be found on the CMS S disk, the MAINT.190 disk. Converting a collection of DSECTs such as HCPCSIBK COPY into a .h file is straightforward but tedious. Conveniently the IBM XLC C compiler does this conversion. The Dignus C compiler has a utility for this as well, D2S, and you can read about it in the Dignus documentation for System/C Utilities. Accepting the default options of D2S generates a .h file with unnamed structs and unions, so we wrote POSTDING EXEC to give them names and do a couple of other things. In retrospect we could have saved ourselves work by making better use of the D2S options, particularly -xanon.
Diagnose x'26C' allows you to specify which version of output you want. The D26C.C program as supplied is for CSI66219, which is z/VM 7.1.0 plus APAR VM66219. In the program, the constant VERSION is used to specify the diagnose output version desired. It is practical to use the #ifdef construct for conditional compiling to let the same D26C.C source code generate multiple versions, with only VERSION needing to be changed, plus including the proper hcpcsibk.h version. This is what we recommend and have done to produce the current version.