9.197 SND_TO_DATA_QUEUE

Note: Built-In Function Rules     Usage Options

Places one or more entries from a working list onto an IBM i or Windows emulated data queue. Refer to IBM supplied manuals for more details of data queues.

Note: Only use this Built-In Function in applications that are to fully execute under the control of the IBM i or a Windows operating system.

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

A literal or variable that specifies or contains the name of the data queue.

This name must conform to IBM i object naming conventions.  This is not checked by the Built-In Function.

1

10

 

 

2

N

Req

A literal or variable that specifies or contains the byte length of one complete entry of the working list specified in argument 3.

1

5

0

0

3

L

Req

The name of the working list whose entries are to be sent to the specified data queue.

1

10

 

 

 

Return Values

No Return Values.

Technical Notes - General

Technical Notes - IBM i Operating System

Technical Notes - Windows Operating Systems

Examples

Receive a customer number and a part number from a screen panel and then place them onto a data queue called PICKLIST:

DEF_LIST   NAME(#PICK) FIELDS(#CUSTNO #PARTNO) TYPE(*WORKING)

           ENTRYS(1)

           (where #CUSTNO is defined in the dictionary as a signed 5,0 number and #PARTNO is defined in the dictionary as a packed 7,0 number)

REQUEST    FIELDS(#CUSTNO #PARTNO)

INZ_LIST   NAMED(#PICK) NUM_ENTRYS(1)

USE        BUILTIN(SND_TO_DATA_QUEUE) WITH_ARGS('PICKLIST' 9 #PICK)

Receive 5 customer numbers and part numbers from a screen panel and then place them onto a data queue called PICKLIST as 5 separate data queue entries:

DEF_LIST   NAME(#PICK) FIELDS(#CUSTNO #PARTNO) TYPE(*WORKING) ENTRYS(1)

BEGIN_LOOP FROM(1) TO(5)

  REQUEST    FIELDS(#CUSTNO #PARTNO)

  INZ_LIST   NAMED(#PICK) NUM_ENTRYS(1)

  USE        BUILTIN(SND_TO_DATA_QUEUE) WITH_ARGS ('PICKLIST' 9 #PICK)

END_LOOP

Receive 5 customer numbers and part numbers from a screen panel and then place them onto a data queue called PICKLIST as a single data queue entry:

DEF_LIST   NAME(#PICK) FIELDS(#CUSTNO #PARTNO) TYPE(*WORKING) ENTRYS(5)

CLR_LIST   NAMED(#PICK)

BEGIN_LOOP FROM(1) TO(5)

  REQUEST    FIELDS(#CUSTNO #PARTNO)

  ADD_ENTRY  TO_LIST(#PICK)

END_LOOP

USE      BUILTIN(SND_TO_DATA_QUEUE) WITH_ARGS('PICKLIST' 9 #PICK)