Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

PINF - Output global program information

&pagelevel(3)&pagelevel

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
refers to the first module (LLM or object module) of the load unit to be loaded.

(S):

The program was loaded by the static loader ELDE (load module, C-type library
element) or it is a PAM-LLM that was loaded by the dynamic binding loader
DBL.



Symb.
name

Length
(bytes)

Description

INTNAME

41

Internal program name:

(D):
internal name of the LLM or the first CSECT name of the object module,
if it was loaded from the EAM object module file

(S):
Internal name of the load module or PAM-LLM

INTVERS

24

interne Programmversion:

(D):
Internal version of the LLM

(S):
Internal version of the program or PAM-LLM

INTDATE

10

Creation date of the program in yyyy-mm-dd format
yyyy=year, mm=month, dd=day

(D):
For LLM: creation date of LLM
For object module: execution date of the R-type element or of the
element from the EAM object module file

(S):
Creation date of load module or PAM-LLM

COPRIGHT

64

Copyright name of the program

(D):
Copyright name of the LLM

(S):
Copyright name of the load module or PAM-LLM

FILENAME

54

(D):
Name of the library (program library or OML); if the program was loaded
from the EAM object module file, the field contains blanks

(S):
Name of the cataloged file (of the load module or PAM-LLM) or the
name of the library containing the C-type element (load module)

ELEMNAME

64

(D):
For LLM: the L-type element name.
For object modules, one of the following:
- the R-type element name in the program library
- the element name in an OML or
- the first CSECT name of the object module if it was loaded from the
EAM object module file.

(S):
Name of the C-type element in a program library.

ELEMVERS

24

(D):
For LLM: the version of the L-type element.
For object module: the version of the R-type element in the program
library

(S):
The version of the C-type element in the program library.

ELEMTYPE

8

Contains a letter identifying the element type and 7 blanks.

(D):
L = LLM or R = object module

(S):
C = load module

SPECNAME

64

Contains the name that was specified in the load call in the START-
PROGRAM or LOAD-PROGRAM command:

(D):
The specified symbol or the string “EAM OMF” for the EAM object
module library

(S):
The name of the cataloged file (of the load module or PAM-LLM) or the
name of the C-type element in a program library.

LOADTYPE

1

Indicator for the type of the loaded program:

= 0 : (S)
The program was loaded by the static loader ELDE or it is a PAM-LLM.

!= 0 : (D)
The program was loaded by DBL and the information refers to the first
module of the load unit.


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
refers to the first module (LLM or object module) of the load unit to be loaded or
to a PAM-LLM.

(S):

The program was loaded by the static loader ELDE (load module, C-type library
element).

Symb.
name

Length
(bytes)

Description

INTNAME

41

Internal program name:

(D):
internal name of the LLM or PAM-LLM or the first CSECT name of the
object module, if it was loaded from the EAM object module file

(S):
Internal name of the load module

INTVERS

24

interne Programmversion:

(D):
Internal version of the LLM or PAM-LLM

(S):
Internal program version

INTDATE

10

Creation date of the program in yyyy-mm-dd format
yyyy=year, mm=month, dd=day

(D):
For LLM/PAM-LLM: creation date of LLM/PAM-LLM
For object module: execution date of the R-type element or of the
element from the EAM object module file

(S):
Creation date of load module

COPRIGHT

64

Copyright name of the program

(D):
Copyright name of the LLM or PAM-LLM

(S):
Copyright name of the load module

FILENAME

54

(D):
Name of the library (program library or OML) or filename of the PAM-
LLM; if the program was loaded from the EAM object module file, the
field contains blanks

(S):
Name of the cataloged file (of the load module) or the name of the
library containing the C-type element (load module)

ELEMNAME

64

(D):
For LLM: the L-type element name.
For object modules, one of the following:
- the R-type element name in the program library
- the element name in an OML or
- the first CSECT name of the object module if it was loaded from the
EAM object module file.

(S):
Name of the C-type element in a program library.

ELEMVERS

24

(D):
For LLM: the version of the L-type element.
For object module: the version of the R-type element in the program
library

(S):
The version of the C-type element in the program library.

ELEMTYPE

8

Contains a letter identifying the element type and 7 blanks.

(D):
L = LLM or R = object module

(S):
C = load module

SPECNAME

64

Contains the name that was specified in the load call in the START-
PROGRAM or LOAD-PROGRAM command:

(D):
The specified symbol or the string “EAM OMF” for the EAM object
module library or the filename of the PAM-LLM

(S):
The name of the cataloged file (of the load module) or the name of the
C-type element in a program library.

LOADTYPE

1

Indicator for the type of the loaded program:

= 0 : (S)
The program was loaded by the static loader ELDE.

!= 0 : (D)
The program was loaded by DBL and the information refers to the first
module of the load unit.

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

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 ZONE field.

(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 ZONE field.

(8)

The library name is output.

(9)

The PINF macro is called again. The following items of information are requested:

  • the name of the element in the program library,

  • the element version,

  • the element type.

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 ZONE field and has a length of 64 bytes.

(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 ZONE field.

(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 != X'00000000'. In this case, the following message is issued:

==ERROR==

PINF SEL=zzzzzzzzxxxxxxxx (00000000 EXPECTED)

where:

zzzzzzzz

xxxxxxxx

is the selected information
is the value of the actual macro return code

(20)

The fields MTEXT, MRS and MEXP are assigned blanks (X'40') and the program is continued.

(21)

The requested program information is output. The ZAREA field is then assigned blanks (X'40') and the program is continued.

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