General
Application area: | Linking and loading; see "Linking and loading" |
Macro type: | Type S, MF format 2: standard/C/D/L/E/M form; see "S-type macros" |
See also the “BLSSERV” manual [4 (Related publications)] for information in the dynamic binder loader DBL.
Macro description
The PINF macro provides the user with information on programs that were loaded by means of the LOAD-EXECUTABLE-PROGRAM or START-EXECUTABLE-PROGRAM (or LOAD-PROGRAM or START-PROGRAM) command.
The following information can be requested:
the internal program name (SELECT=INTNAME),
the internal program version (SELECT=INTVERS),
the creation date of the program (SELECT=INTDATE),
the copyright name of the program (SELECT=COPRIGHT),
the name of the library in which the program is stored (SELECT=FILENAME),
the element name of the program in the library (SELECT=ELEMNAME),
the element version (SELECT=ELEMVERS),
the element type (SELECT=ELEMTYPE),
the name that was specified in the load call in the START-PROGRAM or LOAD-PROGRAM command (SELECT=SPECNAME),
an indicator that shows whether the program was loaded by the static loader ELDE or was the first module of a load unit and was loaded by DBL (SELECT=LOADTYPE).
All information is displayed in the output field in hexadecimal form.
Macro format and description of operands
PINF |
SELECT=INTNAME / INTVERS / INTDATE / COPRIGHT / FILENAME / ELEMNAME / ELEMVERS / ELEMTYPE / SPECNAME / LOADTYPE ,VERSION=001 / 002 ,ADDR=addr / (r) [,LEN=integer] ,MF=S / C / D / E / L / M [,PARAM=addr / (r)] ,PREFIX=P / p ,MACID=BPI / macid |
The operands are described in alphabetical order below.
ADDR=addr
Specifies the symbolic address of a field to which DBL is to transfer the information.
(r)
Register containing the address value “addr”. May be specified only in conjunction with MF=M.
LEN=
Specifies the length in bytes of the output field specified in ADDR.
If this operand is not specified, the minimum length (4 bytes) is used.
integer
The minimum length is 4 bytes. If several items of information are specified in SELECT, the total length of the output field must be the sum of the lengths of the information items (see the SELECT operand).
MF=
For a general description of the MF operand, its operand values and any of the specified operands PARAM, PREFIX and MACID, see section “S-type macros”. The valid MF values are given at the start of the macro description under “Macro type” and are included in the macro format.
A PREFIX can be specified in the C form, D form or M form of the macro and additionally a MACID in the C form or M form (see section “S-type macros”).
SELECT=
Specifies the type of information to be output. The symbolic names of the desired items of information must be specified here. Up to 8 items of information may be requested simultaneously. The following tables list the items of information that can be requested, giving their symbolic names, the length of the information and a description.
Meaning of the output with VERSION=001
The letters in parentheses in the table have the following meanings:
(D): | The program was loaded by the dynamic binder loader DBL. The information |
(S): | The program was loaded by the static loader ELDE (load module, C-type library |
Symb. | Length | Description |
INTNAME | 41 | Internal program name: (D): (S): |
INTVERS | 24 | interne Programmversion: (D): (S): |
INTDATE | 10 | Creation date of the program in yyyy-mm-dd format (D): (S): |
COPRIGHT | 64 | Copyright name of the program (D): (S): |
FILENAME | 54 | (D): (S): |
ELEMNAME | 64 | (D): (S): |
ELEMVERS | 24 | (D): (S): |
ELEMTYPE | 8 | Contains a letter identifying the element type and 7 blanks. (D): (S): |
SPECNAME | 64 | Contains the name that was specified in the load call in the START- (D): (S): |
LOADTYPE | 1 | Indicator for the type of the loaded program: = 0 : (S)
|
Meaning of the output with VERSION=002
The letters in parentheses in the table have the following meanings:
(D): | The program was loaded by the dynamic binder loader DBL. The information |
(S): | The program was loaded by the static loader ELDE (load module, C-type library |
Symb. | Length | Description |
INTNAME | 41 | Internal program name: (D): (S): |
INTVERS | 24 | interne Programmversion: (D): (S): |
INTDATE | 10 | Creation date of the program in yyyy-mm-dd format (D): (S): |
COPRIGHT | 64 | Copyright name of the program (D): (S): |
FILENAME | 54 | (D): (S): |
ELEMNAME | 64 | (D): (S): |
ELEMVERS | 24 | (D): (S): |
ELEMTYPE | 8 | Contains a letter identifying the element type and 7 blanks. (D): (S): |
SPECNAME | 64 | Contains the name that was specified in the load call in the START- (D): (S): |
LOADTYPE | 1 | Indicator for the type of the loaded program: = 0 : (S)
|
VERSION=
Defines the required macro version and thus the layout of the output.
001
Version 1 of the PINF macro is used. In this case no distinction is made between load modules and PAM-LLMs in the output.
002
Version 2 of the PINF macro is used. This specification is supported as of BLSSERV V2.5.
The information output for PAM-LLMs is different from the information for load modules.
Notes on the macro call
A macro in the form MF=M is normally used to modify the parameter list dynamically.
If, however, the parameter list is modified directly with MF=D by means of symbolic names, the user should bear in mind the following points for the macro processor:
The entries must be made sequentially from the first position.
Entries that follow the entries currently available are ignored.
A null entry amongst the entries currently available is ignored, but is nevertheless treated as a valid entry.
Return information and error flags
The requested information is transferred to the field specified in the ADDR operand.
Standard header:
+---------------+ | | | | | |c|c|b|b|a|a|a|a| +---------------+
The following return code relating to the execution of the PINF macro is transferred in the standard header (cc=Subcode2,bb=Subcode1,aaaa=Maincode)
X'cc' | X'bb' | X'aaaa' | Meaning |
X'00' | X'00' | X'0000' | The macro was executed normally |
X'00' | X'40' | X'0001' | The desired information is not yet defined (warning) or is no longer |
X'00' | X'01' | X'0010' | The output field is too small |
X'00' | X'01' | X'0020' | An unknown symbolic name was specified in SELECT |
X'00' | X'01' | X'0070' | The memory area for the output field is not assigned |
X'00' | X'20' | X'0090' | Internal error |
X'00' | X'01' | X'0100' | The SELECT operand is missing |
X'00' | X'01' | X'0110' | More than 8 items of information were specified for SELECT |
X'00' | X'01' | X'FFFF' | The function is no longer or not yet supported |
X'00' | X'02' | X'FFFF' | The function is not available |
X'00' | X'03' | X'FFFF' | The version of the interface is not supported |
Example
The PINFBSP program calls the PINF macro and outputs the following information:
the internal program name
the library name
the name of the library element
the element type
the element version
the name specified in the load call.
PINFBSP CSECT PINFBSP AMODE ANY PINFBSP RMODE ANY BASR 10,0 USING *,10 GPARMOD 31 PRINT GEN EJECT * ***** PINF SELECT = INTNAME ***** * INTNAM MVC MTEXT(24),=CL24'PINF SEL=INTNAME' MVC MEXPECT(4),=XL4'00000000' PINF SELECT=INTNAME,ADDR=ZONE,LEN=41 ——————————————————————— (1) L 15,4(1) ——————————————————————————————————————————————— (2) CL 15,MEXPECT BE WINTNAM ——————————————————————————————————————————————— (3) BAS 12,MEREXP ————————————————————————————————————————————— (4) B FILNAM ———————————————————————————————————————————————— (5) WINTNAM MVC MAREA,MTEXT ——————————————————————————————————————————— (6) MVC ZAREA(41),ZONE BAS 12,WRINFO * ***** PINF SELECT = FILENAME ***** * FILNAM MVC MTEXT(24),=CL24'PINF SEL=FILENAME' MVC MEXPECT(4),=XL4'00000000' PINF SELECT=FILENAME,ADDR=ZONE,LEN=54 —————————————————————— (7) L 15,4(1) CL 15,MEXPECT BE WFILNAM BAS 12,MEREXP B ELMT WFILNAM MVC MAREA,MTEXT ——————————————————————————————————————————— (8) MVC ZAREA(54),ZONE BAS 12,WRINFO *
***** PINF SELECT = ELEMNAME, ELEMVERS, ELEMTYPE ***** * ELMT MVC MTEXT(24),=CL24'PINF SEL=ELEMxxxx' MVC MEXPECT(4),=XL4'00000000' PINF SELECT=(ELEMNAME,ELEMVERS,ELEMTYPE),ADDR=ZONE,LEN=96 —— (9) L 15,4(1) CL 15,MEXPECT BE WELMT BAS 12,MEREXP B SPNAM WELMT MVC MAREA(24),=CL24'PINF SEL=ELEMNAME' ———————————————————— (10) MVC ZAREA(64),ZONE BAS 12,WRINFO * MVC MAREA(24),=CL24'PINF SEL=ELEMVERS' ———————————————————— (11) MVC ZAREA(24),ZONE+64 BAS 12,WRINFO * MVC MAREA(24),=CL24'PINF SEL=ELEMTYPE' ———————————————————— (12) MVC ZAREA(8),ZONE+88 BAS 12,WRINFO * ***** PINF SELECT = SPECNAME ***** * SPNAM MVC MTEXT(24),=CL24'PINF SEL=SPECNAME' MVC MEXPECT(4),=XL4'00000000' PINF SELECT=SPECNAME,ADDR=ZONE,LEN=64 —————————————————————— (13) L 15,4(1) CL 15,MEXPECT BE WSPNAM BAS 12,MEREXP B MTERM WSPNAM MVC MAREA,MTEXT ——————————————————————————————————————————— (14) MVC ZAREA(64),ZONE BAS 12,WRINFO * MTERM TERM ————————————————————————————————————————————————————————— (15) MTERMD TERM DUMP=Y —————————————————————————————————————————————————— (16) * **** Definitions **** MEREXP DS 0H MVC MPACK(4),MEXPECT —————————————————————————————————————— (17) UNPK MEXP+1(9),MPACK(5) NC MEXP+1(8),=X'0F0F0F0F0F0F0F0F' TR MEXP+1(8),MTAB MVI MEXP,C'(' MVC MEXP+9(10),MCEXP *
MEREAL ST 15,MPACK —————————————————————————————————————————————— (18) UNPK MRS(9),MPACK(5) NC MRS(8),=X'0F0F0F0F0F0F0F0F' TR MRS(8),MTAB MVI MRS+8,MBLANK * MEWROUT DS 0H WROUT MMSG,MTERMD ——————————————————————————————————————————— (19) MVI MTEXT,MBLANK —————————————————————————————————————————— (20) MVC MTEXT+1(51),MTEXT BR 12 * WRINFO DS 0H WROUT AREA,MTERMD ——————————————————————————————————————————— (21) MVI ZAREA,MBLANK MVC ZAREA+1(95),ZAREA BR 12 * **** DATA DEFINITION **** * AREA DC Y(LAREA) DC CL3' ' MAREA DC CL24' ' ZAREA DC CL96' ' LAREA EQU *-AREA MMSG DC Y(MMSGE) DC C' ==ERROR== ' MTEXT DC CL24' ' MRS DC CL9' ' MEXP DC CL19' ' MMSGE EQU *-MMSG MBLANK EQU X'40' MCEXP DC C' EXPECTED)' MPACK DS F DC X'00' MTAB DC C'0123456789ABCDEF' MEXPECT DC F'0' ZONE DS CL96 END
(1) | The PINF macro is called. The internal program name is requested; this name has a maximum length of 41 bytes and is to be stored in the |
(2) | The macro return code, which is stored in the second word of the standard header, is loaded into register R15. Then the actual return code is compared with the expected return code X'00000000'. |
(3) | Once the macro has been executed successfully, the program goes on to output the information returned by PINF. | ||||
(4) | In the event of unsuccessful macro execution, the program branches to the error handling routine. | ||||
(5) | Once error handling is complete, the program continues with the next PINF call. | ||||
(6) | The internal program name written to the ZONE field by the PINF macro is output. | ||||
(7) | The PINF macro is called again. The name of the program library is requested; this name has a maximum length of 54 bytes and is to be stored in the | ||||
(8) | The library name is output. | ||||
(9) | The PINF macro is called again. The following items of information are requested:
A total of 96 bytes must be reserved for these three items of information. | ||||
(10) | The element name is output. It begins at the start of the | ||||
(11) | The element version is output. It starts at the symbolic address ZONE+64 and has a length of 24 bytes. | ||||
(12) | The element type is output. It starts at the symbolic address ZONE+88 and has a length of 8 bytes. | ||||
(13) | The PINF macro is called again. The symbol name specified in the load call (e.g. in START-EXECUTABLE-PROGRAM) is requested. The symbol name has a maximum length of 64 bytes and is to be stored in the | ||||
(14) | The symbol name specified in the load call is output. | ||||
(15) | The program is terminated normally. | ||||
(16) | If errors occurred in the WROUT macro, the program is terminated with a dump. | ||||
(17) | The expected macro return code is edited as a string to be output at a later time. | ||||
(18) | The actual macro return code is edited as a string to be output at a later time. | ||||
(19) | An error message is issued if the PINF macro returned a return code
|
(20) | The fields |
(21) | The requested program information is output. The |
Runtime log
/start-assembh % BLS0500 PROGRAM 'ASSEMBH', VERSION '<ver>' OF '<date>' LOADED % ASS6010 <ver> OF BS2000 ASSEMBH READY //compile source=*library-element(macexmp.lib,pinfbsp), - // compiler-action=module-generation(module-format=llm), - // module-library=macexmp.lib, - // listing=parameters(output=*library-element(macexmp.lib,pinfbsp)) % ASS6011 ASSEMBLY TIME: 381 MSEC % ASS6018 0 FLAGS, 0 PRIVILEGED FLAGS, 0 MNOTES % ASS6019 HIGHEST ERROR-WEIGHT: NO ERRORS % ASS6006 LISTING GENERATOR TIME: 143 MSEC //end % ASS6012 END OF ASSEMBH /start-executable-program library=macexmp.lib,element-or-symbol=pinfbsp % BLS0523 ELEMENT 'PINFBSP', VERSION '@' FROM LIBRARY ':2OSG:$QM212.MACEXMP.LIB' IN PROCESS % BLS0524 LLM 'PINFBSP', VERSION ' ' OF '<date> <time>' LOADED PINF SEL=INTNAME PINFBSP PINF SEL=FILENAME :2OSG:$QM212.MACEXMP.LIB PINF SEL=ELEMNAME PINFBSP PINF SEL=ELEMVERS ~ PINF SEL=ELEMTYPE L PINF SEL=SPECNAME PINFBSP
(22) | The requested information is output to SYSOUT. The internal program name is PINFBSP. The module was fetched from the program library MACEXMP.LIB, where it is stored as an LLM with the name PINFBSP. The name PINFBSP was specified in the load call (in START-EXECUTABLE-PROGRAM). |