User`s guide

3: BSC 3270 DLI Functions
DC 900-1340I 69
An unsuccessful Create Virtual 3270 Devices command can return one of the following
error codes in the
dlRead pOptArgs.iICPStatus field (see Appendix D for error handling):
DLI_ICP_ERR_BAD_MODE
The function request is not available for the requested
access mode.
DLI_ICP_ERR_BAD_PARMS
The parameter value(s) used for the function call are
illegal.
3.4.1.12 Change Virtual 3270 Device Status Command
Use the dlWrite function with the pOptArgs.usProtCommand field set to
DLI_PROT_CHANGE_STATUS to change the status of a virtual 3270 device. Set the MSB of the
pOptArgs.usProtCircuitID field to the control unit number, and set the LSB to the device
number of the affected device. Set the
pOptArgs.iProtModifier field to one of the new
device status values shown in Ta bl e 35 . For the client application to change virtual
device status, the link must be configured as a tributary (slave) station (Section 4.10 on
page 93), and the 3270 Text Addressing option (Section 4.22 on page 102) must be set
to device emulation.
You can also use the Change Virtual 3270 Device Status command to create a single new
virtual device. If the device specified by the control unit number and device number in
the
pOptArgs.usProtCircuitID field is not currently in service, it is placed into service. See
Table 3–5: Device Status Values
Status Value Specified in the
pOptArgs.iProtModifier Field
Description
DLI_ICP_ERR_NO_ERR
The device is available and ready to accept 3270 com-
mands from the control station.
DLI_ICP_ERR_DEVICE_BUSY
The device is available but is currently performing some
operation (such as printing).
DLI_ICP_ERR_DEVICE_UNAVAIL
The device is unavailable or has become mechanically dis-
abled (such as printer out of paper).