Procedure $USERBCI contains all the commands necessary to communicate with a virtual BCI 3270. It may also be used for a real 3270 and be extended by the installation to cater for additional functions. The procedure contains comments which adequately describe the basic functions it performs.
$USERBCI recognizes several commands as functions it must execute. Any other commands received are assumed to be product commands and are processed by specifying them on an &INTCMD statement. This makes the procedure as powerful as the privileges associated with the particular user ID for which it is invoked, and can be restricted at the installation's discretion.
The results of an &INTCMD command are accumulated by issuing &INTREAD statements and placing the resulting messages on the output lines of the panel.
If all panel output lines are used, the data is sent to BCI by issuing an &PANEL statement. The messages are extracted and BCI awaits further output. More than one panel may be required to send the results of some commands. This process is automatically handled by the interface.
The following commands are not passed to the product region but are processed by the distributed procedure $USERBCI:
Is recognized by $USERBCI as a test command. The specified text is echoed nn times (up to 41 maximum) in the output lines of the panel. If nn is omitted or non-numeric, the text is echoed 3 times. If no text is supplied, a sequence of characters is returned.
May be used to emulate the F3 key and will end procedure $USERBCI. This can be useful if $USERBCI is nested from another BCI NCL procedure. It is not used to terminate the BCI session.
Is used by $USERBCI to set &RETCODE to nn. If this is a non-zero value, the batch program will terminate immediately with message N96009 issued.
A request to perform another &INTREAD operation. After an &INTCMD has been issued, the results are read using &INTREAD commands. Since an unknown number of messages may be returned, the procedure makes some assumptions as to when the last message has been read. If you suspect more messages are available, these can be solicited through the MORE command. Any number of MORE commands may be issued.
Signifies that any outstanding messages not yet returned should be purged. This results in the procedure issuing an &INTCLEAR statement to discard any such outstanding responses.
May be used to issue an NCL &CONTROL TRACE or &CONTROL NOTRACE command in the BCI NCL procedure. This may be useful for debugging BCI NCL procedures.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |