z/OS 2.5 Using REXX and z/OS UNIX System Services, SA23-2283-50, p. 21, in
Returned from the SYSCALL environment at
<https://www.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R5sa232283/$file/bpxb600_v2r5.pdf#page=45>,
shows -3 as "The command environment has not been called. Probably the
syscalls('ON') function did not end successfully, or the current address
environment is not SYSCALL."
Functions do not return return codes, they return string values. The string
value need not be numeric, e.g., left('ABC',1) has the value 'A', which is not
numeric. In a statement containing only a function call, the returned value is
treated as a command in the current environment.
The limit to the number of parameters that can be passed to an address
environment is 1. It's calls and function invocations that have a larger limit.
I would encourage you to continue participating after retirement.
--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3
________________________________________
From: IBM Mainframe Discussion List [[email protected]] on behalf of
Bill Schoen [[email protected]]
Sent: Wednesday, June 29, 2022 8:48 AM
To: [email protected]
Subject: Re: Some questions on SYSCALL
There are quite a few topics in this thread, some well addressed, some maybe
not, but I'll pitch in...
re: syscalls environment should be integrated into rexx
this is included in the default environments for rexx running in mvs (irxjcl),
tso, and ispf
calling syscalls('ON') is not required to use address syscall
all that does is define the syscall variables
The only reason I can imagine if you get errors if not using syscalls() is you
probably have replacements for the default environments that were probably made
a long time ago and do not include syscall.
re: syscalls('ON') and return code
used as above is a function call which does return a return code.
if you don't assign that to a variable or use it in an expression or use call,
the rexx processor will execute the return code in the current address
environment as a command
re: syscalls('OFF')
this causes your process to undub which is typically unnecessary and often
results in confusion
re: write buffer is a variable name
This was done for a variety of reasons, but primarily, rexx has a limit to
number of parameters that can be passed to an address environment.
I think TSO rexx limits it to 20. If it took a string you would be limited to
very few blank delimited words.
a number of syscall commands take variable/stem names to avoid issues with
input or output rexx restrictions.
.
Probably my last post before retirement tomorrow.
Bill Schoen
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN