Previous Topic: LOCSTEM()

Next Topic: MEMORY()

LU2()

Use the LU2() function to enable the CA-GSS/ISERVE Logon Facility to communicate with devices defined as logical unit 2.

Syntax

The LU2() function has this syntax:

Form 1:

xx yy = LU2(BRACKET,rpl,[xx],[yy])

Form 2:

result = LU2(SEND,rpl,outrec)

Form 3:

input = LU2(RECEIVE,rpl)

Form 4:

input = LU2(SENDREC,rpl,outrec,[option])

Form 5:

result = LU2(CLSDST,rpl)

Arguments

The LU2() function takes these arguments:

xx

BB (begin bracket) or NBB (no begin bracket).

yy

EB (end bracket) or NEB (no end bracket).

BRACKET

Modifies the SNA brackets to be used with the next SEND or RECEIVE operation. If new values are omitted, the current state is returned.

rpl

RPL address, as passed to the IMOD by the Logon Facility.

result

Error text (if the SEND or CLSDST operation fails).

SEND

Transmits a record.

outrec

Complete 3270 data stream.

input

Results of a 3270 READ MODIFIED operation, a complete 3270 data stream.

RECEIVE

Issues a VTAM RECEIVE against the specific terminal session. The IMOD task is suspended until the terminal operator presses ENTER and a READ MODIFIED is completed.

SENDREC

Transmits a 3270 data stream to the terminal, waits for operator action, and receives the results.

option

One of these options:

Bracket Determines and sets the appropriate bracket state for the next transmission

NOBracket Indicates that the bracket indicators in the RPL are not changed.

Default: Bracket.

CLSDST

Issues a VTAM CLOSEDEST against the RPL. This terminates the session and returns control of the terminal to VTAM. If omitted, a CLSDST is automatically generated at the end of the IMOD task.

Usage Notes

Return Codes

The LU2() function produces these return codes:

101 - 104 ARG n MISSING OR INVALID

126 NOT RPL

127 NO RPL

128 NOT ACB

129 NO ACB

130 ACB IS OPEN

131 ACB NOT OPEN

135 PHASE: type rpl13 rpl14 rpl15

136 PHASE: type R15: xx REASON: xx

Example

parse arg rpl .                       /* Obtain RPL from caller   */
queue 'at 1 1 attr /prot/ data /Enter transaction =>/'
queue 'attr /input high / cursor at 1 79 attr /prot/'
screen = $3270(,,'erase','reset')     /* Construct screen         */
if rc ^= 0 then signal error_$3270
input = lu2('sendrec',rpl,screen)     /* Send screen, read screen */
input = ds3270('from','field',,,1,22) /* Extract input field      */
if rc ^= 0 then signal err_ds3270
...
 result = lu2('clsdst',rpl)            /* Terminate session        */
return