Gil is right. I sympathize with IBM. Once upon a time it made sense to
upper-case console typing, and every precedent becomes a prison.
BUT ... okay, they come up with a good scheme to solve this problem: enclose
the text in quotes. Fair enough. foo means FOO and 'foo' means foo. Good so
far. But why then impose the quotes on the poor receiving software. As Gil
implies, it forces a lot of hoop-jumping onto the coder that should not be
necessary.
I've done a fair amount now of software development where the characters
processed were Unicode (sigh, yes, on a newer platform). I have had to learn to
stop thinking in terms of "alpha" and "upper case" and "lists of acceptable
characters." A character string is just a string of little magic cookies --
don't think about it too much. Having to say "is the first character X?" is
contrary to that philosophy.
On a more practical note, the real syntax in question looks like this
F TASKNAME,PARMS(some sort of filename)
When the filename is an MVS dataset obviously there are no issues. The problem
occurs when the filename is zFS -- typically lower or mixed case. EITHER of the
following syntaxes is valid for z/OS and preserves the lower case, and in both
cases my code must remove the quotes:
F TASKNAME,'PARMS(/u/foo/bar)'
F TASKNAME,PARMS('/u/foo/bar')
(In either case, taskname may of course by typed in lower case, and z/OS
upper-cases it. In either case, PARMS may be typed in lower case, and my
software (first example) or z/OS (second example) takes care of it.
I would assume the following would also work, but I don't want to even think
about going there ...
F TASKNAME,'PARMS(''/u/foo/bar'')'
Charles
-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf
Of Paul Gilmartin
Sent: Tuesday, May 27, 2014 5:23 AM
To: [email protected]
Subject: Re: Passing lower case data on MODIFY
On Mon, 26 May 2014 23:15:19 -0400, Robert A. Rosenberg wrote:
>At 11:47 -0700 on 05/26/2014, Charles Mills wrote about Passing lower
>case data on MODIFY:
>
>>I don't see anything in the MODIFY or EXTRACT documentation (other
>>than information specific to System Rexx). (I'm sure someone will be
>>happy to point it out if I missed something <g>.) I'd like to confirm
>>what I am observing to make sure it is not some bug or mis-observation
>>of my own. It appears to me that
>>
>>F taskname,foo results in FOO being passed to the program.
>>
>>F taskname,'foo' results in 'foo' being passed to the program.
>>
>>Is there any way to just pass foo -- lower case, no quotes -- on a
>>MODIFY command? (I don't mind the quotes in the syntax; I can readily
>>live with that; it's the passing of the quotes into the program that
>>is currently fouling me up.)
>>
>>(Taskname is a z/OS started task.)
>
>A couple of questions.
>
>1) Will the passed parm have imbedded blanks or will it be a single
>string of characters?
>
>2) Can there be any imbedded quotes in the parm?
>
>To fix #1, check if the first character is a quote. If so, then pass
>starting from the second character and do not pass the last character
>(the ending quote). So long as you pass a length, any imbedded blank
>should not be an issue.
>
>As to #2, after removing any bracketing quotes, you can either pass the
>doubled single quotes or parse and rebuild the parm by converting the
>doubled quotes to a single occurrence.
>
I'm not sure whom you're addressing when you use the second person there, or if
you're just mising Charle's point entirely. He wants to be able to pass to the
started task the three characters:
foxtrot, oscar, oscar. he does not want to pass to the started task five
characters: apostrophe, foxtrot, oscar, oscar, apostrophe and modify the code
of the started task to deal with the apostrophes.
I think your mind has been damaged by some extraordinarily poor design of HLASM
(perhaps inherited from older translators), to the point where you consider it
rational operation. Consider (I think I have this correct):
&X SETC 'foo'
... sets &X to three characters (as above), but:
MYMACRO &X='foo'
... passes &X as five characters. Wretchedly inconsistent. JWG, for example,
is proud of his ability to write parsers in conditional assembly language to
deal with this mickeymouse. It shouldn't be necessary.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN