EasyManuals Logo
Home>IBM>Computer Hardware>TSO/E REXX

IBM TSO/E REXX User Manual

IBM TSO/E REXX
242 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #220 background imageLoading...
Page #220 background image
CLIST REXX
SYSCALL statement
SYSCALL SOMESUB &VAR
CALL instruction
call somsub var
Sending information from a subprocedure Sending information from a subroutine
RETURN statement
.
.
.
SYSCALL SOMESUB &VAR
SET ANSWER = &LASTCC
.
.
.
END
SOMESUB: PROC 1 V1
.
.
.
RETURN CODE(33) /* code goes to &LASTCC */
RETURN instruction
.
.
.
call somesub var
answer = RESULT
exit
somesub:
arg v1
.
.
.
value=4*v1/3
return value /* value goes to RESULT */
Performing File I/O
CLIST REXX
Reading from a file Reading from a file
OPENFILE, GETFILE, CLOSFILE statements
OPENFILE PAYCHEKS
SET COUNTER=1
DO WHILE &COUNTER \> 3
GETFILE PAYCHEKS
SET EMPLOYEE&COUNTER=&PAYCHEKS
SET COUNTER=&COUNTER+1;
END
CLOSFILE PAYCHEKS
EXECIO DISKR, EXECIO DISKRU commands
'EXECIO 3 DISKR indd (stem employee. FINIS'
/* Read 3 records from the data set in indd. */
/* The 3 records go to a list of compound */
/* variables with the stem of employee. They */
/* are employee.1, employee.2 and employee.3 */
Writing to a file Writing to a file
OPENFILE, PUTFILE, CLOSFILE statements
OPENFILE PRICES OUTPUT
SET PRICES = $2590.00
PUTFILE PRICES
CLOSFILE PRICES
EXECIO DISKW
push '$2590.00' /* put amount on data stack */
'EXECIO 1 DISKW outdd (finis'
/*Write from data stack to data set in outdd */
Syntax
CLIST REXX
Continuing a statement over more than one line Continuing an instruction over more
than one line
Use-or+
IF &STR(SYSDATE)=&STR(10/13/87) THEN +
WRITE On &SYSDATE the system was down.
Use ,
say 'This instruction',
'covers two lines.'
Passing Information
202
z/OS V1R1.0 TSO/E REXX User’s Guide

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM TSO/E REXX and is the answer not in the manual?

IBM TSO/E REXX Specifications

General IconGeneral
BrandIBM
ModelTSO/E REXX
CategoryComputer Hardware
LanguageEnglish

Related product manuals