IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New ZOC good so far but one gotcha is biting hard

Seems unbelievably simple but I just can't seem to get a ZOC xxx.zrx
script to call another zoc or rexx script as a function. ZOC has
Enterprise REXX built in but requires ZOC scripts to be named
xxx.zrx.

The implication is that ZOC won't allow chaining of ZOC Rexx scripts to other
scripts as functions.

The command ret=ZocExec("cmd...",3) & ret=ZocShell("cmd...",3) pass a command string to execute or for ZocShell, to the current command processor but this doesn't allow returing values from the called script, these Zoc commands only return a 0 for ok, 1 for failed.

(I have WinRexx, ReginalRexx, ObjectRexx, EnterpriseRexx & result is consistent across these various rexx for windows versions).

Any clues would be welcomed - Doug Marker


Test1: <<Enterprise Rexx>> **************************************************
If I just use Enterprise Rexx to run script1.rex below it succesfully
calls script2.rex which runs & returns the return value to script1.
This is the heart of how we want to use ZOC. This test works in all rexx versions


(Enterprise Rexx was installed & associated with .rex suffix for these tests - The Ent Rexx manual states that Rexx scripts should have /* in 1st line, col 1)

Script1.rex
/* REXX */
Say "Hello World from Script1.rex, I am about to call Script2.rex"
ret=Script2.rex()
Say "Returned from script2.rex = " ret
RETURN 0

Script2.rex
/* REXX */
Say "Hello World. I was called by Script1.rex. "
RETURN "Script2.rex Done"


Test2: <<ZOC>> *************************************************************
This fails - says it can't find the Script2.zrx() function. I have tried all manner of combinations of *.rex *.zrx & ZocExec & ZocShell.

Script1.zrx
/* REXX */
Say "Hello World from Script1.zrx I am about to call Script2.zrx"
ret=Script2.zrx()
Say "Returned from script2.zrx = " ret
RETURN 0

Script2.rex /* have tried .rex & .zrx as suffix !!! */
/* REXX */
Say "Hello World. I was called by Script1.zrx "
RETURN "Script2.zrx Done"

**************************************************************

New Markus is very good about answering questions.
[link|http://www.emtec.com/common/support.html|http://www.emtec.com/common/support.html]

I'm sorry I can't offer any specific help. Good luck!

Cheers,
Scott.
New Re: Yup I have sent him a query but also found a way round

I guessed that the ZOC Rexx (as distinct from the Enterprise Rexx) wasn't looking in the current directory (from which the original script had been loaded) & so I placed that dir in the PATH env variable & sure enough it solved the problem.

I can use *x.zrx to invoke a *y.zrx (or a *y.rex) script as a function & can return the values passed back.

This means we have a goer with ZOC. This is a big relief !!!!

Rgds

Doug

New Re: Markus is very good -- MARKUS mentioned yesterday,that

ZOC 5.0 was about to be released.

Doug
     ZOC good so far but one gotcha is biting hard - (dmarker) - (3)
         Markus is very good about answering questions. - (Another Scott) - (2)
             Re: Yup I have sent him a query but also found a way round - (dmarker)
             Re: Markus is very good -- MARKUS mentioned yesterday,that - (dmarker)

Battling him is like wiping off puppy slobber.
76 ms