On 11/19/2010 3:41 PM, Mark Zelden wrote:
Based on a quick test of SLEEP from TSO without rc=syscalls('ON'), it looks
like it isn't required. Maybe since z/OS 1.8.
Sadly, it appears that SYSCALLS initializes some important REXX variables. If
you don't call it, they never get initialized. :-(
For example (first one works, second one fails):
3 *-* message = 'Hello World!'
>L> "Hello World!"
4 *-* rc = syscalls('ON')
>L> "ON"
>F> "0"
5 *-* address SYSCALL 'open /dev/console' O_WRONLY 666
>L> "open /dev/console"
>V> "1"
>O> "open /dev/console 1"
>L> "666"
>O> "open /dev/console 1 666"
6 *-* consolefd = RETVAL
>V> "1"
7 *-* address SYSCALL 'write' consolefd 'message'
>L> "write"
>V> "1"
>O> "write 1"
>L> "message"
>O> "write 1 message"
***
3 *-* message = 'Hello World!'
>L> "Hello World!"
4 *-* /* rc = syscalls('ON') */
5 *-* address SYSCALL 'open /dev/console' O_WRONLY 666
>L> "open /dev/console"
>L> "O_WRONLY"
>O> "open /dev/console O_WRONLY"
>L> "666"
>O> "open /dev/console O_WRONLY 666"
+++ RC(-22) +++
6 *-* consolefd = RETVAL
>L> "RETVAL"
7 *-* address SYSCALL 'write' consolefd 'message'
>L> "write"
>V> "RETVAL"
>O> "write RETVAL"
>L> "message"
>O> "write RETVAL message"
+++ RC(-21) +++
***
--
Edward E Jaffe
Phoenix Software International, Inc
831 Parkview Drive North
El Segundo, CA 90245
310-338-0400 x318
[email protected]
http://www.phoenixsoftware.com/
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html