AS/400 Adapter 6.0.1 | webMethods AS/400 Adapter Documentation | webMethods AS/400 Adapter Installation and User’s Documentation | Built-in Services | Access Services | wm.as400.access:readDataQ
 
wm.as400.access:readDataQ
Reads an entry from the data queue and removes it from the queue. This service allows a user to read from both Sequential and Keyed data queues. If the input parameter byteKey is null, then the queue is assumed to be Sequential else it is assumed to be Keyed.
Input Parameters
$AS400Alias
String The connection alias of the AS/400 server.
$AS400
com.ibm.as400.access.AS400 Optional. A connected AS/400 object.
Note:
Either $AS400 or $AS400Aliasshould be provided as an input.
QName
String The name of the data queue. The queue name must be 1 to 10 characters.
Example:
MYQUEUE
Note:
Use the libraryName field to specify the QUEUE Library else the Qname should contain the fully qualified integrated file system path name of the data queue.
Example:
/QSYS.LIB/myLibrary.LIB/MYQUEUE.DTAQ
libraryName
String Optional. The library in which the data queue exists. It must be 1 to 10 characters.
Note:
Use this field only if the QName does not contain the fully qualified integrated file system path name for the program.
If you specify libraryName as %ALIAS_CURLIB% then the Library name specified as the current library while configuring the connection alias is used.
Note:
You cannot specify %ALIAS_CURLIB% if the field $AS400Alias is empty.
wait
String The number of seconds to wait if the queue contains no entries. Default: do not wait. If the default is Negative one (-1), wait until an entry is available.
recordMetaData
Record Definition of the record to be read from the queue as follows:
*DataName. The name of the record field.
*DataType. The AS/400 data type of the record field.
*DataLength. The length of the record field. For decimal types, type xx.yy, for example, 5.2.
recordKey
Record Definition of the key that is used to search the Keyed data queue for an entry. Leave this field blank if you want to read from a Sequential data queue. The values are as follows:
*KeyType. The AS/400 data type of the key.
*keyLength. The length of the key.
*KeyValue. The key value used to search the data queue for an entry.
searchType
String The type of comparison to use to determine if a key is a match. Valid values are EQ (equal), NE (not equal), LT (less than), LE (less than or equal), GT (greater than), and GE (greater than or equal). Leave this field blank if you want to read from a simple data queue.
Output Parameters
success
String The status of the operation. Contains true if the data queue read was successfully created else contains false.
keyValue
String Key for this data queue entry read from the Keyed Data Queue.
senderInfo
String Sender information for the data queue entry.
RecordData
Record The values (Name/Value Pair) corresponding to the record read from the queue. If no entry was read this record does not exist in the pipeline. The values are as follows:
*Name. The name of the record field.
*Value. The value of the record field.
Examples
wm.as400.sample.simpleDQ:readDataQ
wm.as400.sample.keyedDQ:readKeyedData