EXECIO

Read syntax diagramSkip visual syntax diagram>>-EXECIO--+-lines-+--+-READ--tsqname--+--+-stem.---+----------->
           '-*-----'  '-WRITE--tsqname-'  '-varname-'
 
>--+-------+---------------------------------------------------><
   '-recno-'
 

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

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.) Refer to section Stems for more information.
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.

Return Codes

n
specifies the return code 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

Examples

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.

Notes

  1. The maximum record length allowed is 256 bytes.
  2. 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.
  3. Use the CICS-supplied CEBR transaction to browse temporary storage queues. For example, enter: CEBR QUEUE1 to look at the queue created above.
  4. CEBR provides PUT and GET functions that you can use to copy between external files and CICS temporary storage queues.