Steve wrote:
>So the question of where LISTDSI is found is moot, in that my
>environment is correct once using "CC = 'LISTDSI' ('SYSUT1 FILE')".

The quotes around LISTDSI serve no function, unless you are inside a
routine with the same name and you don't want recursion.  Since the
interpreter only tokenizes the program once, you will rarely save anything
by skipping the check for an internal routine.

It looks like you still have a blank between your function name and the
left parentheses of the argument list.  In that case you will get CC set to
the string "LISTDSI SYSUT1 FILE", and not a return code.

I prefer CALL LISTDSI "SYSUT1 FILE", which is almost the same as RESULT =
LISTDSI("SYSUT1 FILE").  IMHO, these examples in IBM documentation are
misleading and potentially can result in broken code.  A CALLed routine is
NOT required to return a value and whereas a function invocation MUST have
a value on it's return statement.  If you change a routine from returning a
value, to not returning one, you will get a run time syntax error.
Further, you are adding another variable to the B-tree, while you could
just reuse RESULT.  If garbage collections are an issue, they might be
slightly more frequent.

Keep learning REXX.  At some point you may realize that it is a truly
amazing language.

OREXXMan
Q: What do you call the residence of the ungulate with the largest antlers?
A: A moose pad.
:-D
Would you rather pass data in move mode (*nix piping) or locate mode
(Pipes) or via disk (JCL)?  Why do you think you rarely see *nix commands
with more than a dozen filters, while Pipelines specifications are commonly
over 100s of stages, and 1000s of stages are not uncommon.
REXX is the new C.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to