Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ RUI_WRITE(3) — SNA LUA 1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

RUI_WRITE(3)  —  Subroutines

 
 
 
 

Name

RUI_WRITE − Transmits data to the remote host application program. 
 
 
 

FORMAT

#include <lua_c.h>
 
void RUI(LUA_VERB_RECORD ∗rui_write_vcb);
 
 
 
 

Parameter

 

rui_write_vcb
 
 
A pointer to an LUA_VERB_RECORD structure appropriately initialized for the RUI_WRITE verb. 
 
 
 

Required Verb Control Block Fields

 

common.lua_verb
 
 
An unsigned short value specifying the verb code LUA_VERB_RUI. 
 

common.lua_verb_length
 
 
An unsigned short value specifying the length of the verb control block. Specify the value LUA_COMMON_LENGTH. 
 

common.lua_post_handle
 
 
A pointer to a sem_t structure specifying the DIGITAL UNIX semaphore that the interface should use for asynchronous calls.  See the DIGITAL UNIX sem_init() man page for more information about the data type of this parameter. 
 

common.lua_opcode
 
 
An unsigned short value specifying the verb opcode.  Specify the value LUA_OPCODE_RUI_WRITE. 
 

common.lua_luname
 
 
An 8-element unsigned char array specifying the local LU name (in ASCII). If the name is fewer than 8 characters in length, pad the name with space characters. 
 
 

common.lua_cobol_ptr
 
 
 
This parameter is not currently implemented and should be set to NULL.
 

common.lua_sid
 
 
An unsigned int value specifying the session ID that the interface should use to identify the local LU. If this parameter is 0, the interface uses the common.lua_luname parameter. 
 

common.lua_data_length
 
 
An unsigned short value specifying the length of the data in the buffer referenced by the common.lua_data_ptr parameter. 
 

common.lua_data_ptr
 
 
An unsigned char pointer to the data buffer that the interface should transmit to the remote host application program. 
 

common.lua_th
 
 
An LUA_TH structure specifying the transmission header (TH) which should accompany the transmitted data.  Specify the following TH fields:

 

snf---The sequence number field (if a response RU). 

 
 
 

common.lua_rh
 
 
An LUA_RH structure specifying the request/response header (RH) which should accompany the transmitted data.  Specify the following RH fields:

 

eci---The end chain indicator. 
 

 
 

bci---The begin chain indicator. 
 

 
 

sdi---The sense data included indicator. 
 

 
 

fi---The format indicator. 
 

 
 

ruc---The request unit category. 
 

 
 

rri---The request-response indicator. 
 

 
 

qri---The queued response indicator. 
 

 
 

ri---The exception response indicator (ERI) for requests or the response type indicator (RTI) for responses. 
 

 
 

dr2i---The definite response 2 indicator. 
 

 
 

dr1i---The definite response 1 indicator. 
 

 
 

pdi---The padded data indicator. 
 

 
 

edi---The enciphered data indicator. 
 

 
 

csi---The code selection indicator. 
 

 
 

cdi---The change direction indicator. 
 

 
 

ebi---The end bracket indicator. 
 

 
 

bbi---The begin bracket indicator. 

 
 
 

common.lua_flag1
 
 
An LUA_FLAG1 structure specifying various flags that control how the interface executes the verb.  Specify one (and only one) of the following flags:

 

sscp_exp---If set, specifies that the interface should transmit this message on the SSCP-expedited data flow. 
 

 
 

sscp_norm---If set, specifies that the interface should transmit this message on the SSCP-normal data flow. 
 

 
 

lu_exp---If set, specifies that the interface should transmit this message on the LU-expedited data flow. 
 

 
 

lu_norm---If set, specifies that the interface should transmit this message on the LU-normal data flow. 

 
 
The flow flag set cannot conflict with flow flags set in other outstanding RUI_WRITE verbs.

 
 

common.lua_flag3
 
 
This parameter is not currently implemented. Any fields set are ignored.
 
 
 
 

Optional Verb Control Block Fields

 

common.lua_correlator
 
 
A void ∗ pointer that can contain either a value or an address of a user-supplied data structure. The LUA application can use this parameter to correlate this verb control block with other user-supplied data structures.  The interface does not read from or write to this field. 
 
 
 

Returned Verb Control Block Fields

 

common.lua_prim_rc
 
 
An unsigned short value containing the primary error code. 
 
 

common.lua_sec_rc
 
 
An unsigned int value containing the secondary error code. 
 
 

common.lua_sid
 
 
An unsigned int value containing the session ID that subsequent verbs can use to specify the session to the interface. 
 

common.lua_th
 
 
An LUA_TH structure containing the transmission header (TH) which accompanied the transmitted data.  The following TH fields are returned:

 

flags_efi---The single-bit expedited flow indicator. 
 

 
 

flags_odai---The single-bit originating address field (OAF) destination address field (DAF) assignor indicator. 
 

 
 

flags_mpf---The 2-bit segmenting mapping field. 
 

 
 

flags_fid---The 4-bit format identification type field. 
 

 
 

daf---The destination address field. 
 

 
 

oaf---The originating address field. 
 

 
 

snf---The sequence number field. 

 
 
 

common.lua_rh
 
 
An LUA_RH structure containing the request/response header (RH) which accompanied the transmitted data.  The following RH fields are returned:

 

eci---The end chain indicator. 
 

 
 

bci---The begin chain indicator. 
 

 
 

sdi---The sense data included indicator. 
 

 
 

fi---The format indicator. 
 

 
 

ruc---The request unit category. 
 

 
 

rri---The request-response indicator. 
 

 
 

qri---The queued response indicator. 
 

 
 

ri---The exception response indicator (ERI) for requests or the response type indicator (RTI) for responses. 
 

 
 

dr2i---The definite response 2 indicator. 
 

 
 

dr1i---The definite response 1 indicator. 
 

 
 

pi---The pacing indicator. 
 

 
 

pdi---The padded data indicator. 
 

 
 

edi---The enciphered data indicator. 
 

 
 

csi---The code selection indicator. 
 

 
 

cdi---The change direction indicator. 
 

 
 

ebi---The end bracket indicator. 
 

 
 

bbi---The begin bracket indicator. 

 
 
 

common.lua_flag2
 
 
An LUA_FLAG2 structure containing various flags that indicate how the interface executed the verb.  The following flags are returned:

 

async---If set, indicates that the interface is completing the verb asynchronously. 
 

 
 

sscp_exp---If set, indicates that the message was sent on the SSCP-expedited data flow. 
 

 
 

sscp_norm---If set, indicates that the message was sent on the SSCP-normal data flow. 
 

 
 

lu_exp---If set, indicates that the message was sent on the LU-expedited data flow. 
 

 
 

lu_norm---If set, indicates that the message was sent on the LU-normal data flow. 

 
 
 
 
 

Description

 
For a request, the RUI_WRITE verb transmits the data referenced by the lua_data_ptr and lua_data_length parameters.  The interface precedes this data with the RH information given in the lua_rh parameter.  The interface sends the data over the data flow indicated in the lua_flag1 parameter. The LUA application is responsible for any data chaining. 

 
An LUA application can have up to two RUI_WRITE verbs outstanding. Each must be on a separate data flow.

 
If sending a response, the LUA application must set the lua_rh.rri parameter to 1 (indicating a response) and set the sequence number in the lua_th.snf parameter. Use the sequence number from the last element in the chain or the CANCEL command that ended the chain. 

 
For positive responses, the LUA application must set the lua_rh.ri flag to 0 (indicating a positive response). If the response includes data, the application must set the lua_data_length and lua_data_ptr parameters.  If no data is present, the application must set lua_data_length to 0. 

 
For negative responses, the LUA application must set the lua_rh.ri flag to 1 (indicating a negative response), the lua_data_ptr to the location of the sense data for the response, and the lua_data_length to the length of the sense data (usually 4 bytes). 

 
A return code of LUA_OK indicates that the interface sent the data to the transport protocol of the local node. It has not necessarily reached the DIGITAL SNA gateway or the remote application.
 

Primary Return Codes

 

LUA_OK
 

 

LUA_CANCELLED
 

LUA_COMM_SUBSYSTEM_ABENDED
 

LUA_COMM_SUBSYSTEM_NOT_LOADED
 

LUA_IN_PROGRESS
 

LUA_INVALID_VERB
 

LUA_INVALID_VERB_SEGMENT
 

LUA_PARAMETER_CHECK
 

LUA_SESSION_FAILURE
 
 

LUA_STATE_CHECK
 

LUA_UNEXPECTED_DOS_ERROR
 

LUA_UNSUCCESSFUL
 
 
 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026