Get Export (QleGetExp) API


  Omissible Parameter Group:

1 Activation mark Input Binary(4)
2 Export number Input Binary(4)
3 Export name length Input Binary(4)
4 Export name Input Char(*)
5 Exported item Output PTR(OPN)
6 Type of export item Output Binary(4)
7 Error code I/O Char(*)

  Returned Value:

  Exported item Output PTR(OPN)

  Service Program: QLEAWI

  Default Public Authority: *USE

  Threadsafe: Yes

The Get Export (QleGetExp) API allows the caller to resolve a pointer to an export (either data or procedure) either by name or export number. The pointer is materialized for the specified activation. If the activation mark given is zero, then all activations in the activation group are searched (no guaranteed search order). The QleGetExp API is identical to the Get Export Long (QleGetExpLong) API, except that the QleGetExpLong API takes a BINARY(8) activation mark as the first parameter instead of a BINARY(4) activation mark.


Authorities and Locks

None.


Omissible Parameter Group

Activation mark
INPUT; BINARY(4)

The activation containing the export. If this parameter is omitted, then it is treated as if a 0 was specified. This parameter may not be omitted if the search is done by export number.

The following special value is supported for this parameter:

0 All of the activations in the caller's activation group are searched. If more than one activation contains the specified export, it is undefined as to which of those activations the export is taken from.

Export number
INPUT; BINARY(4)

Materialize the nth exported identifier in the service program. The order is defined by the binding service language with the first exported identifier being 1. If this parameter is omitted, then it is treated as if a 0 was specified.

The following special value is supported for this parameter:

0 Materialize the item named in the export name parameter.

Export name length
INPUT; BINARY(4)

The length of the export name. If this parameter is omitted, then it is treated as if a 0 was specified. This parameter is ignored if the export number parameter is not zero.

The following special value is supported for this parameter:

0 The export name is a null-terminated string.

Export name
INPUT; CHAR(*)

A string containing the name of the exported identifier. The name is matched exactly, without CCSID conversion or folding to uppercase. This parameter is ignored if the export number parameter is not zero. The export name cannot be omitted if the export number is omitted.

Exported item
OUTPUT; PTR(OPN)

The procedure pointer or space pointer to the exported item. If the identifier could not be exported, this value is null.

Type of export item
OUTPUT; BINARY(4)

The type of the exported item. The possible types follow:

0 Export was not found
1 Export is a procedure
2 Export is data
3 Export not accessible

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter. If this parameter is omitted, diagnostic and escape messages are issued to the application.


Returned Value

Pointer to exported item
OUTPUT; PTR(OPN)

This API returns the value for the pointer to the exported item parameter.


Error Messages

Message ID Error Message Text
CPF24B4 E Severe error while addressing parameter list.
CPF3C1D E Length specified in parameter &1 not valid.
CPF3C1E E Required parameter &1 omitted.
CPF3C90 E Literal value cannot be changed.
CPF3CF1 E Error code parameter not valid.
CPF3CF2 E Error(s) occurred during running of &1 API.
MCH4421 E At least one field in the allocation strategy is not valid.
MCH4422 E &1 cannot be called in the default activation group.


API introduced: V3R6

[ Back to top | Program and CL Command APIs | APIs by category ]