Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

GETPRGV - Get program version

&pagelevel(3)&pagelevel

General

Application area:

Linking and loading; see "Linking and loading"

Macro type:

Type S, MF format 2: standard/C/D/E/L/M form; see "S-type macros"


See also the “BLSSERV” manual [4 (Related publications)] for information on the dynamic binder loader DBL.

Macro description

The GETPRGV macro outputs the program version that was previously selected by the user with the SELPRGV macro or the SELECT-PROGRAM-VERSION command.

Macro format and description of operands

GETPRGV

MF=S / C / D / E / L / M

,PRGNAME=<name 1..32>

,PRGNAM@=<var: name 32..32> / (<reg: pointer>)

,PRGVER@=<var: structure> / <var: pointer> / (<reg: pointer>)

,PARAM=<var: pointer> / (<reg: pointer>)

,PREFIX=P / p

,MACID=BGT / macid

PRGNAME=<name 1..32>
Program name. The name may contain alphanumerical characters only. May be specified only if MF=L or MF=S.

PRGNAM@=<var: name 32..32> / (<reg: pointer>)
Symbolic address or register containing the address of a 32 character field, which contains the the program name. Shorter name specifications must be padded with blanks.
May be specified only if MF=M.

PRGVER@=

Address of a structure in which the program was entered by DBL if a version was selected. The DSECT <prefix><macid>VRDS for the structure is generated if MF=D and has the following layout:

Byte

Length

Field name

Description

0

1

VERL

Program version length

1

24

VERS

Program version

<var: structure>
Symbolic address of the structure. May be specified only if MF=L or MF=S.

<var: pointer>
Symbolic address of an auxiliary field containing the address of the structure.May be specified only if MF=M.

(<reg: pointer>)
Register containing the address of the structure. May be specified only if MF=M.

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.

It is possible to specify a PREFIX 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”).

Notes on the macro call

  • DBL first searches the program versions for which SCOPE=PROGRAM was set (see SELPRGV macro). If DBL finds the specified program among them it transfers the program version and terminates the search.

  • Valid class 6 memory addresses must be specified in PRGNAM@ and PRGVER@.

Return information and error flags

The program version and its length are transferred in the structure that was specified using the PRGVER@ parameter.

Standard header:

+---------------+
|   |   |   |   |
|c|c|b|b|a|a|a|a|

+---------------+

The following return code relating to the execution of the GETPRGV 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'01'

X'0001'

PRGNAME not specified or invalid.

X'00'

X'01'

X'0002'

PRGVER@ not specified or invalid.

X'00'

X'00'

X'0004'

A version for the program has not been selected.

X'00'

X'00'

X'0007'

Program not found with the name specified.

X'00'

X'20'

X'0300'

System error.

X'00'

X'01'

X'FFFF'

The function is no longer or not yet supported.

X'00'

X'03'

X'FFFF'

The interface version is not supported.

Other return codes which, in accordance with conventions, apply to all macros are given in the table “Standard return codes” (Standard header).