Monday, May 11, 2009

Using as400 QSNDDTAQ api to put a message / entry on a dataqueue

Heres an example of using the as400 QSNDDTAQ api to put an entry on a data queue

C                     CALL 'QSNDDTAQ' 
C                     PARM 'MYQUEUE' DTQ     10 
C                     PARM '*LIBL'   DTLIB   10 
C                     PARM 10        LENGTH  50 
C                     PARM 'START'   DATA 
C                     PARM 4         KEYLEN  30 
C                     PARM '*CMD'    KEY

API Parameters

DTQ         as400 Data queue name 
DTLIB       as400 library name (or *LIBL to search library list) 
LENGTH      Entry length 
DATA:       Entry.  Maximum length indicated by LENGTH. 
KEYLEN:     (optional, only required if if dataqueue *KEYED) Key length 
KEY:        (optional, only required if if dataqueue *KEYED)  Key value 
maximum length indicated by KEYLEN. 

as400 jobs

More info on using Using as400 QSNDDTAQ api to put a message / entry on a dataqueue to follow...

No comments:

Post a Comment