Please enable JavaScript to view this site.

If you wish to receive a response message for any fax you have sent using the API, put 'NFYAPI' in the Userid field (pos. 87 - 94) of the QRCD. Note : If you put any other data in this field the API will try to send a SNDDST back assuming pos. 87 - 94 and 95 - 102 are a IBM i Userid and Address.

The response fax is placed in data queue NFYMSGQ (maxlen 29) in the following format:

From

To

Attribute

Description

1

6

A (6)

The Cobwebb Fax Reference number

7

13

A (7)

The Cobwebb Fax response message

FAX0059 = Fax SENT

FAX0024 - Fax FAILED

14

21

A (8)

'NFYAPI'

22

29

A (8)

User information returned from QRCD

The Cobwebb message reference number TQREF can be used to access the Cobwebb Queue (AFAXQ) and complete details of the fax extracted.

If for any reason you do not wish to use the response message you can create logical views of the Cobwebb Queue.

For example, to select and sequence all Sent faxes in the active queue you could use the following DDS:

 A          R FAXQ                 FORMAT(AFAXQ)

 A                                 PFILE(AFAXQ)

 A          K TQREF

 A          S TQID                 COMP(EQ 'Q')    /* Active queue

 A            TQSRV                COMP(EQ '2')       Fax

 A            TQSTS                COMP(EQ 'S')       Sent */

If you require not Sent (failed) faxes, then:

 A          R FAXQ                 FORMAT(AFAXQ)

 A                                 PFILE(AFAXQ)

 A          K TQREF

 A          S TQID                 COMP(EQ 'Q')    /* Active queue

 A            TQSRV                COMP(EQ '2')       Fax

 A            TQSTS                COMP(EQ 'W')       Wait

 A            TQPTY                COMP(EQ '0')       Held */

Note that once Cobwebb Fax has exhausted the retry cycle, fax status becomes Wait/Held.

You can determine the content and layout of the Cobwebb Queue by using the DSPFD and DSPFFD commands.

See Also

Notify API - NFYAPI