On Fri, 27 Mar 2020 12:16:50 -0500, Dale R. Smith wrote:
>On Fri, 27 Mar 2020 16:28:30 +0000, Seymour J Metz wrote:
>
>>> Read the much improved doc in the z/OS V2.4 TSO/E REXX Reference for
>>> MVSVAR(SYMDEF,xxx).
>>
>>That's what I was quoting.
>>
>>> I think everything will be clearer.
>>
>>Clear, but it matches neither my expectations nor the output that Bruce
>>Hewson described.
>
>That's because he was using it incorrectly. A single word for each System
>Symbol name, not a string with multiple words in it.
>
You and Shmuel appear to be in bitter agreement.
>SYMDEF,symbolic-name
>returns the value associated with the symbolic-name defined in an IEASYSxx
>member of
>SYS1.PARMLIB on a SYSDEF ... SYMDEF statement.
>Or, symbolic-name can also be one of the system static or dynamic symbols as
>defined in z/OS MVS
>Initialization and Tuning Reference.
>...
>Any other values including REXX delimiters might cause unpredictable results.
>
>Seems pretty clear to me. GIGO
>
The syntax rules are scattered. It would be clearer if they were collected.
"GIGO" should not be a defense, although I've known Peter Relson to resort to
it.
With an unscientific sample, I see that most TSO/E External Functions return a
status indicating an error. MVSVAR does not. Bad design. It should report:
o Success.
o Ill-formed argument.
o Well-formed argument, but no such entry.
If necessary for compatibility by returning reserved string-values.
On Fri, 27 Mar 2020 11:12:24 -0500, Dale R. Smith wrote:
>
Your example appears to agree with Shmuel's and my understanding
of the doc.
> utctime = 'YYMMDD HHMMSS YR4 YR2 MON DAY HR MIN SEC ',
> 'WDAY JDAY'
> ...
> Say 'MVS Dynamic System Symbols...(UTC Timezone)'
> Do n = 1 to Words(utctime)
> symbol = Word(utctime,n)
> Say Left(symbol,8) '=' MVSVar('SYMDEF',symbol)
> End /* Do n = 1 to Words(utctime) */
>
But I wonder if a 23:59:59 error is possible if the date changes between
iterations of the loop?
I raised this question a while ago concerning use of symbols in JCL.
Peter Relson replied, simply, "Yes". No circumvention suggested.
Rexx avoids this problem by deriving TIME() and DATE() within any
single clause from a single reading of the clock. The TIME macro
can do similarly.
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN