Previous Topic: &$LHOPT=COMMAND Statement

Next Topic: &$LHOPT=INIT Statement


&$LHOPT=GET Statement

This statement indicates that a list entry is to be retrieved. When the value of &$LHOPT is GET, you can use the list service procedure to perform any special processing that is required to get a list entry.

Read-Only Variables

This statement contains the following read-only variables:

&$LHOPT

This variable is set to GET.

&$LHLISTFMT

This variable is set to indicate the format of the list. This variable is set to one of the following values:

ACTION

An action list

MSELECT

A multiple select list

SSELECT

A single select list

NUMBERED

A numbered list

&$LHAPPLID

This variable is set to the ID of the application to which the list belongs.

&$LHLISTTYPE

This variable is set to the type of the displayed list. This variable is set to one of the following:

PUBLIC

The list is a public list.

PRIVATE

The list is a private list.

&$LHLISTUSER

This variable is set to the user ID of the user who owns the list, if it is a private list.

&$LHLISTNAME

This variable is set to the name of the list.

&$LHDESC

This variable is set to the description of the list.

&$LHDATASRC

This variable is set to the data source defined for the list.

&$LHCRITTOTAL

This variable is set to the number of &$LHCRIT variables that contain criteria. The value of this variable is in the range 0 to 9999.

&$LHCRITn

These variables are set to the criteria which the service procedure uses to determine the entries to be included in the list, if variable &$LHCRITTOTAL is greater than zero; n is in the range 1 to the value of &$LHCRITTOTAL.

&$LHSORT

This variable is set to the sort expression defined for the list.

&$LHFMTFLDn

These variables are set to the names of the real fields defined for the list; n is in the range 1 to the number of real fields defined.

&$LHATB*

These variables are set to the panel attributes that can be used to set the intensity, color, and highlighting for data within an entry line.

&$LHTIMEOUT

This variable is set to indicate whether the list panel timed out. This variable is set to one of the following values:

NO

The list panel did not time out.

YES

The list panel timed out.

&$LHRFRESHCMD

This variable is set to indicate whether the REFRESH command was executed by the user. This variable is set to one of the following values:

NO

The REFRESH command was not executed.

YES

The REFRESH command was executed.

&$LHDIRECTION

This variable is set to indicate the retrieval direction. This variable is set to one of the following values:

FWD

Get an entry in a forward direction.

BKWD

Get an entry in a backward direction.

LOCATE

Get the entry with an identifier that matches the value set in &$LHSKIP, if not found, get the first entry which has an identifier less than the value set in &$LHSKIP.

If the value of this variable is null, get the entry identified in &$LHENTID.

&$LHGETALL

This variable is set to indicate whether all entries for the list are retrieved during initialization processing for the list. This variable is set to one of the following values:

NO

Entries are retrieved as required for display on the list.

YES

All entries for the list are retrieved during initialization processing for the list.

&$LHSUPPRESS

This variable is set to indicate whether entries will be suppressed from the list by this procedure when getting entries, by the list exit procedure during entry processing, or by both procedures.

&$LHSKIP

This variable is set to indicate the number of entries to be skipped if &$LHDIRECTION is set to FWD or BKWD. If &$LHDIRECTION is set to LOCATE, it is set to the identifier of the entry to be located, that is, the locate string entered by the user.

&$LHGETFWD#

This variable is set to indicate the number of entries that are to be retrieved in a forward direction until the list is displayed.

Modifiable Variables

This statement contains the following modifiable variables:

&$LHSPDc

These variables contain service procedure data as set by the caller of $CACALL; c is between 0 and 5 alphanumeric and/or national characters. These variables are never set or cleared by the system and must be completely managed by your installation-written NCL procedures.

&$LHENTTOTAL

Use this variable to specify the number of list entries to get for display. This variable can be set to the total number of entries to be displayed on the list when &$LHOPT is set to GET and &$LHRFRESHCMD or &$LHREFRESH is set to YES. The value of this variable is displayed in the top right corner of the list.

&$LHENTID

This variable is set to the identifier of the entry from which to start reading. If &$LHDIRECTION and &$LHSKIP are null, get the entry that has an identifier that matches the value of this variable and if not found return NOT FOUND condition. If this variable is null and &$LHDIRECTION is set to FWD or BKWD, get the first or last entry respectively. You must set this variable to the identifier of the entry returned.

&$LHENTD

This variable is set to the data associated with the entry identified in &$LHENTID. This variable can be set to the data to be associated with the entry returned.

&$LHENTPOS

Use this variable to specify the position of the entry being returned within the list. If &$LHSUPPRESS is not set to YES and the Get all Entries field in the list definition is set to NO, the value of this variable is displayed in the top right corner of the list in front of the total.

&SYSMSG

Use this variable to return a message. If an error occurs during special processing, this variable must be set to an error message.

Return Codes

The variable &RETCODE must be set by the list service procedure to one of the following return codes:

0

Continue processing

4

Entry not found

8

An error occurred; terminate the list