Please enable JavaScript to view this site.

SNDAPI can be utilised to send faxes from your application programs.  For example, you might decide to fax urgent purchase orders to a supplier.  Your reordering application would write purchase order details to the Cobwebb Fax SNDAPI data queue QCOBWEBB#1, together with the relevant destination details.

Because Cobwebb Fax utilises CPYSPLF/*PRTCTL format, you can easily incorporate printed output as the text of the fax using the QTXT Text Member Record.

The User (pos. 514 of QRCD) is used to check against the Cobwebb User Profile, if a User Profile record is found the following fields will be used if not previously completed:

Mandatory Authority

Maximum Priority

Mandatory Department

Default Logo

As the fax is queued under the User name specified in the QRCD record, the user can be used to identify specific types of queue entry e.g. PURCHASING.  

The procedure for writing to SNDAPI is as follows:

1.Allocate data queue QCOBWEBB#1 with an *EXCLRD lock state.  This ensures integrity of data queue entries should another application attempt to write to the data queue at the same time. A CL primitive ALCDTAQ is provided for this purpose.

2.Send the appropriate data structures to the data queue.  For each fax there is a queue entry (QRCD), destination entries (QDST), a variable number of text entries, and a terminator (ENDQ).

3.Deallocate the SNDAPI data queue QCOBWEBB#1. CL primitive DLCDTAQ is provided for this purpose.

The formats for each type of data queue entry are:

Queue record entry 'QRCD' - This is the first entry in the API set.

Destination entries 'QDST' - Specifies destinations. Any number of QDST entries are allowed.

Form Entry 'QFRM' - Specifies the member containing Form characters.

Text line entries 'PRTCTL' - Text for Fax. First four characters of entry are *PRTCTL.

Text member record 'QTXT' - Specifies location of file and member if you have written the text to a file member.

Terminator 'ENDQ' - Denotes the end of the API message.

#1 - This data queue name is held in the APIDTAQ data area in library CPPD and could have been renamed.