This section describes what needs to be configured before your application program can use the user-defined communications APIs. You can either use the system-supplied menus or the Control Language (CL) commands to do this configuration. For more information on using queue APIs, see the Object APIs in the Information Center.
Links allow your application program to use a token-ring, Ethernet, FDDI, wireless, or X.25 communications line. A link is made up of the following communications objects:
You need to configure the line description; user-defined communications support automatically configures a network controller and a network device description of type *USRDFN when the link is enabled. If you are using X.25 over ISDN, the network interface description must also be configured. The network interface, line, controller, and device descriptions are automatically varied on, if necessary.
Use the following commands to create or change line descriptions:
Use the following commands to create or change controller descriptions:
Use the following commands to create or change device descriptions:
Use the following commands to create or change network interface descriptions:
See the Communications Configuration book on the V5R1 Supplemental Manuals Web site for more information on configuring communications.
User-defined communications support uses a queue to inform your application program of some action to take or of an activity that is complete. You must create the queue before the link is enabled.
The size of each queue entry must be large enough to accommodate the user-defined communications support entries. See the following Queue Entries for more information on the entries that user-defined communications support can send to the queue.
Use the Create Data Queue (CRTDTAQ) command to create your data queues. Use the QUSCRTUQ and QUSDLTUQ APIs to create and delete your user queues.
This section describes the entries user-defined communications support can send to the queue.
The length of each entry is always at least 80 bytes. When using a keyed queue, however, each entry can be as large as 336 bytes, depending on the size of the key value supplied to the user-defined communications support.
Table 1 shows the general format of each user-defined communications support entry.
Table 1. Queue Entry General Format
Entry type Char(10) | Entry ID Char(2) | Entry data Char(68) | Key CHAR(256) |
---|---|---|---|
Bytes 1-10 | 11-12 | 13-80 | 81-336 |
Entry type
This indicates the type of entry on the queue and will be *USRDFN for all user-defined communications support entries.
Entry ID
This uniquely identifies each entry within an entry type. User-defined communications support has five entries defined:
Note: The entry type of *USRDFN and all associated entry IDs, either defined or undefined, are reserved for user-defined communications support. Therefore, your application program should not define entries using this entry type.
Entry data
This data is useful to your application program and varies according to the entry ID.
Key
When using a keyed queue, this is the key value supplied to the user-defined communications support.
The enable-complete entry is sent to the queue when the enable link operation is complete. This entry is only sent after the Enable Link (QOLELINK) API returns to your application program with a successful return and reason code.
Note: The QOLELINK API only initiates the enabling of the link. Your application program must wait for the enable-complete entry before attempting to perform input or output on the link.
Table 2 shows the format of the enable-complete entry.
Table 2. Enable-Complete Entry
*USRDFN | '00' | Communications handle | Status | Reserved | Key |
---|---|---|---|---|---|
Bytes 1-10 | 11-12 | 13-22 | 23 | 24-80 | 81-336 |
Communications handle
The name of the link that is being enabled. Your application program supplies this name when the QOLELINK API is called.
Status
This indicates the outcome of the enable link operation. A character value of zero indicates the enable link operation was successful and I/O is now possible on this link. A character value of one indicates the enable link operation was not successful (the job log contains messages indicating the reason). The user-defined communications support disables the link when the enable link operation does not complete successfully and the disable-complete entry is not sent to the queue.
Key
The key value associated with the enable-complete entry when using a keyed queue. Your application program supplies this key value when the QOLELINK API is called. When using a non-keyed queue (indicated by supplying a key length of zero to the QOLELINK API) this field is not present.
The disable-complete entry is sent to the queue when a link is successfully disabled. This entry is always the last entry sent by the user-defined communications support on this link and, therefore, provides a way for your application program to remove any enable-complete, incoming-data, or permanent-link-failure entries previously sent to the queue.
Note: User-defined communications support does not associate timers with links. Therefore, it is possible for a timer-expired entry to be sent to the queue after the link is disabled. Your user-defined communications application program is responsible for handling this.
Table 3 shows the format of the disable-complete entry.
Table 3. Disable-Complete Entry
*USRDFN | '01' | Communications handle | Reserved | Key |
---|---|---|---|---|
Bytes 1-10 | 11-12 | 13-22 | 23-80 | 81-336 |
Communications handle
The name of the link that has been disabled. Your application program supplies this name when the QOLELINK API is called to enable the link.
Key
The key value associated with the disable-complete entry, when using a keyed queue. Your application program supplies this key value when the QOLELINK API is called to enable the link. When using a non-keyed queue (indicated by supplying a key length of zero to the QOLELINK API) this field is not present.
The permanent-link-failure entry is sent to the queue when error recovery is canceled on a link. You must disable and then enable the link to recover.
Table 4 shows the format of the permanent-link-failure entry.
Table 4. Permanent-Link-Failure Entry
*USRDFN | '02' | Communications handle | Reserved | Key |
---|---|---|---|---|
Bytes 1-10 | 11-12 | 13-22 | 23-80 | 81-336 |
Communications handle
The name of the link on which the failure has occurred. Your application program supplies this name when the QOLELINK API is called to enable the link.
Key
The key value associated with the permanent-link-failure entry, when using a keyed queue. Your application program supplies this key value when the QOLELINK API is called to enable the link. When using a non-keyed queue (indicated by supplying a key length of zero to the QOLELINK API) this field is not present.
The incoming-data entry is sent to the queue when the user-defined communications support has data for your application program to receive. Your application program should call the Receive Data (QOLRECV) API to pick up the data when this entry is received.
Note: Another incoming-data entry is not sent to the queue until your application program picks up all the data from the user-defined communications support. The data available parameter on the call to the QOLRECV API indicates that the receipt of data is not complete.
Table 5 shows the format of the incoming-data entry.
*USRDFN | '03' | Communications handle | Reserved | Key |
---|---|---|---|---|
Bytes 1-10 | 11-12 | 13-22 | 23-80 | 81-336 |
Communications handle
The name of the link on which the data has come in. Your application program supplies this name when the QOLELINK API is called to enable the link.
Key
The key value associated with the incoming-data entry, when using a keyed queue. Your application program supplies this key value when the QOLELINK API is called to enable the link. When using a non-keyed queue (indicated by supplying a key length of zero to the QOLELINK API) this field is not present.
The timer-expired entry is sent to the queue when a timer, previously set by your application program, ends.
Table 6 shows the format of the timer-expired entry.
*USRDFN | '04' | Timer handle | User data | Key |
---|---|---|---|---|
Bytes 1-10 | 11-12 | 13-20 | 21-80 | 81-336 |
The name of the expired (ended) timer. Your application program returns this name when the Set or Cancel Timer (QOLTIMER) API is called to set the timer.
User data
The data associated with the expired timer. Your application program supplies this data when the QOLTIMER API is called to set the timer.
Key
The key value associated with the timer-expired entry, when using a keyed queue. Your application program supplies this key value when the QOLTIMER API is called to set the timer. When using a non-keyed queue (indicated by supplying a key length of zero to the QOLTIMER API) this field is not present.
Top | Communications APIs | APIs by category |