In reverse order: > //MYSTEP EXEC BAR,PARM.STEP1='The value is ''3.14'''
That's a good idea. That's about the best I had come up with so far. It will be a single-step proc, so all I actually need is PARM=. It's a little odd -- it does not show up in a Substitution JCL message so it looks like it went into the bit bucket -- but it's a workable idea. > //MYSTEP EXEC BAR,STRING='The value is \3.14\' That's a possibility. I might use " as the pseudo-quote character. I've got two cases: - parm is going to go through my parser. For that case I don't even need a translate; I can just accept a " as equivalent to a '. For that case the " works great: STRING='DSN("BLAH.BLAH(MEM)")' - parm is an arbitrary string. That case is a little weird: STRING='Life isn''''t fair' STRING='Life isn\t fair' STRING='Life isn"t fair' I'm not sure which is the least weird. I think I like the PARM= solution the best. The least weird of all. Charles -----Original Message----- From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of Schwarz, Barry A Sent: Monday, September 13, 2010 3:08 PM To: IBM-MAIN@bama.ua.edu Subject: Re: Another brain-dead quoted PROC parm question Modify FOO to translate the parm by replacing a designated character (such as \) with a quote. You can then code the proc invocation as //MYSTEP EXEC BAR,STRING='The value is \3.14\' and code the jobstep as //STEP1 EXEC PGM=FOO,PARM='&STRING' Your translate table is simply TBL DC 256AL1(*-TBL) ORG TBL+C'\' DC CL1' ' ORG and the translation is performed with a single TR. Alternately, instead of coding the parameter in the proc invocation using STRING, use //MYSTEP EXEC BAR,PARM.STEP1='The value is ''3.14''' and only use the "normal" double quotes instead of quadruple ones. -----Original Message----- From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of Charles Mills Sent: Monday, September 13, 2010 12:58 PM To: IBM-MAIN@bama.ua.edu Subject: Another brain-dead quoted PROC parm question I've got a program FOO that requires a string with embedded blanks as a parm, e.g. //STEP1 EXEC PGM=FOO,PARM='Hello World' I'd like to be able to set up a proc BAR that would take a parm STRING= and pass it to FOO as the PARM=, e.g. //BAR PROC STRING='the string' //STEP1 EXEC PGM=FOO,PARM=&STRING If I do it that way, then it fails for lack of quotes around &STRING. If I code it as PARM='&STRING', then if the user wants to pass in a string with quotes in it, he needs quadruple quotes, e.g. //MYSTEP EXEC BAR,STRING='The value is ''''3.14''''' which I find fairly ridiculous and non-intuitive and error-prone. Is there some trick to being able to have a PROC parm that is quoted but does not need quadruple quotes? I tried the trick setting &Q to '''' and using that instead of a literal quote and also a null parameter &X to fool JCL but couldn't get those to work either. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html