EXECIO

EXECIO performs file input or output to a CICS® temporary storage queue.

Syntax

Read syntax diagramSkip visual syntax diagram EXECIO lines*READtsqnameWRITEtsqnamestem.varname recno reclen

Description

The maximum record length allowed is 256 bytes.

If a stem is specified for a READ operation (and a stem should be specified if more than one record is read), the actual number of records read is placed into stem.0.

Use the CICS-supplied CEBR transaction to browse temporary storage queues. CEBR provides PUT and GET functions that you can use to copy between CICS transient data queues and CICS temporary storage queues.

Operands

lines
specifies the number of lines to read or write. An asterisk (*) is a special case that is specified for READ operations only, and indicates that the file is read from the target line (or line 1 if no target line is specified) to the end of the file.
READ
reads one or more records from a CICS temporary storage queue (TSQ).
WRITE
writes (or re-writes ) one or more records to a CICS temporary storage queue.
tsqname
specifies a 1 to 8 character temporary storage queue name.
stem.
specifies the name of a stem. A stem must end in a period; see Stems.
varname
specifies a REXX variable name that is the source or target for this EXECIO operation.
recno
specifies a record number in the temporary storage queue that READ or WRITE begins with.
reclen
specifies the length of the record written to CICS temporary storage. If reclen is omitted, the length defaults to 80 bytes.

Return codes

n
The return code that is passed back by CICS if an error is detected
0
Normal return
-202
Invalid operand
-221
Too many operands specified
-222
Recno operand out of range
-224
Lines operand invalid

Example

x.1 = 'line 1'
x.2 = 'Line Two'
'EXECIO 2 WRITE QUEUE1 X.'

This example writes data to a CICS temporary storage queue.

'EXECIO 2 READ QUEUE1 Y.'
say y.0  /* ==>  2           */
say y.1  /* ==>  'line 1'    */
say y.2  /* ==>  'Line Two'  */

This example reads data from a temporary storage queue.

You can browse the queue created in the example by using CEBR. Enter CEBR QUEUE1.