Well, maybe. If foo = 'DISKR' then foo is right and 'foo' is wrong. I think that is the point that others are making: there is no way to "explain how to code EXECIO" without explaining how Rexx works.
Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of Tony Thigpen Sent: Friday, June 5, 2020 11:35 AM To: [email protected] Subject: Re: Gratuitous EXECIO Documentation To say it another way. Normally the use of quotes around a variable will *break* the code. With EXECIO, use of quotes will *fix* the code. Tony Thigpen Tony Thigpen wrote on 6/5/20 2:29 PM: > No, the problem is not an understanding of how REXX evaluates expressions. > > The problem is that EXECIO is one of the few places that a variable NAME > is an operand, not the variable CONTENTS. > > Tony Thigpen > > Seymour J Metz wrote on 6/5/20 2:11 PM: >>> Your statement implies that "sometimes" it is legitimate to not use >>> quotes. >> >> In fact, sometimes it is mandatory to not use them. >> >> Your suggested wording has the same issue as what is in the manual; it >> prescribes rules that aren't always appropriate. The REXX Reference >> manual has a perfectly adequate description of how REXX evaluates >> expressions: refer the reader to that. Don't invent rules that >> sometimes don't apply. >> >> The root problem is that someone is writing code without understanding >> the language. >> >> >> -- >> Shmuel (Seymour J.) Metz >> http://mason.gmu.edu/~smetz3 >> >> ________________________________________ >> From: IBM Mainframe Discussion List [[email protected]] on >> behalf of Tony Thigpen [[email protected]] >> Sent: Friday, June 5, 2020 2:03 PM >> To: [email protected] >> Subject: Re: Gratuitous EXECIO Documentation >> >> Sorry, but I disagree. >> >> Your statement implies that "sometimes" it is legitimate to not use >> quotes. I would say that "sometimes you can get lucky and get away with >> not using quotes". :-) >> >> A very basic documentation statement would be: >> Some formats of the EXECIO command may reference a variable >> by the name of the variable. Such references should be >> within quoted text. Such an example is the variable name >> of a stem variable: >> Correct: >> 'EXECIO 5 DISKW' ddname '(STEM MYSTEM.' >> Incorrect: >> 'EXECIO 5 DISKW' ddname '(STEM' mystem. >> Use without quotes can result in unpredictable results. >> >> >> I really think this is the root problem, not the fact that someone >> defined a variable with the same name as a common keyword, such as your >> example with "STEM". Such an example is just part of the language >> restriction and not directly related to EXECIO. >> >> >> Tony Thigpen >> >> Seymour J Metz wrote on 6/5/20 12:56 PM: >>> My problem with gratuitous documentation is that they invariably get >>> it wrong. Describe the actual requirements and direct the reader to >>> the appropriate places for details. In this case, something like: >>> >>> As with any command issued to an external environment, ensure >>> that the >>> expression you use evaluates to the intended EXECIO command. In >>> particular, it may be prudent to always quote keywords to avoid >>> confusion with variables with the same name. For example, if >>> you assign >>> the variable "stem" to a value other than 'STEM' and then use >>> >>> EXECIO 5 DISKW ddname '(' STEM >>> >>> instead of >>> >>> EXECIO 5 DISKW ddname '( STEM' >>> >>> in your code, you will not invoke the correct command. >>> >>> Would be reasonable if they have to spell it out. >>> >>> >>> >>> -- >>> Shmuel (Seymour J.) Metz >>> http://mason.gmu.edu/~smetz3 >>> >>> ________________________________________ >>> From: IBM Mainframe Discussion List [[email protected]] on >>> behalf of Paul Gilmartin >>> [[email protected]] >>> Sent: Friday, June 5, 2020 11:29 AM >>> To: [email protected] >>> Subject: Gratuitous EXECIO Documentation >>> >>> In: >>> https://www.ibm.com/support/knowledgecenter/SSLTBW_2.3.0/com.ibm.zos.v2r3.ik ja300/dup0037.htm >>> >>> >>> I see the verbiage: >>> When you use EXECIO, you must ensure that you use quotation marks >>> around any operands, such as DISKW, STEM, FINIS, or LIFO. Using >>> quotation marks prevents the possibility of the operands being >>> substituted >>> as variables. For example, if you assign the variable stem to a >>> value in >>> the exec and then issue EXECIO with the STEM option, if STEM is >>> not >>> enclosed in quotation marks, it is substituted with its >>> assigned value. >>> >>> Sheesh! A similar caution might be included for any command in the >>> Ref., >>> but it doesn't belong. >>> >>> "must ensure"? Well, not always. >>> >>> I infer the etiology: A troublesome user once coded: >>> STEM=SKIP /* perhaps */ >>> EXECIO ... >>> ... got astonishing results; went to SR; got fully proper "REJ; RTFM"; >>> vindictively submitted RCF. A feckless tech writer acceded and added >>> the paragraph. >>> >>> I strongly suspect the matter is covered properly earlier (citation >>> needed) >>> in the Ref., which shouldn't be cluttered with such errant rubbish. >>> >>> (I was reading that Ref. to see whether EXECIO assembles segments >>> of V[B]S records. Didn't find it.) >>> >>> -- gil >>> >>> ---------------------------------------------------------------------- >>> For IBM-MAIN subscribe / signoff / archive access instructions, >>> send email to [email protected] with the message: INFO IBM-MAIN >>> >>> ---------------------------------------------------------------------- >>> For IBM-MAIN subscribe / signoff / archive access instructions, >>> send email to [email protected] with the message: INFO IBM-MAIN >>> >> >> ---------------------------------------------------------------------- >> For IBM-MAIN subscribe / signoff / archive access instructions, >> send email to [email protected] with the message: INFO IBM-MAIN >> >> ---------------------------------------------------------------------- >> For IBM-MAIN subscribe / signoff / archive access instructions, >> send email to [email protected] with the message: INFO IBM-MAIN >> > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
