In our portfolio of small utilities is a program that by its name prefix I can tell is over 30 yrs old. It simply opens a file and writes the parm to a record in the file w/LRECL=80.
There is a more modern modern version of that program that does the same, but for an LRECL other than 80. There are other programs that take as the PARM constructs of the form A=B separated by commas, treat &A as a value, B as its value. They read an input file usually from a PARMLIB, do substitution for &A ... and then write the file to an output file.. These are the kinds of programs I show new assembler coders as examples of things that can be done in assembler. But they could just as well be done in almost any programming language, Efforts and courage are not enough without purpose and direction. - John F. Kennedy Fasten your seat belts, it's going to be a bumpy ride. - Bette Davis (as character Margo Channing) _All About Eve_1950 Furious activity is no substitute for understanding. - H. H. Williams Our greatest danger in life is in permitting the urgent things to crowd out the important. - Charles E. Hummel Quidquid latine dictum sit, altum videtur. From: Paul Gilmartin <[email protected]> To: [email protected] Date: 02/02/2016 06:12 PM Subject: Arbitrary string in SYSPARM (or alternative?) Sent by: IBM Mainframe Assembler List <[email protected]> In a current thread on IBM-MAIN, the OP wants to "Convert a Parm into a control card". Various answers have been tendered, Rexx, DFSORT, ..., and mine in Assembler: //STEP EXEC PGM=ASMA90, (HLASM) // PARM='SYSPARM(Isn''t &SYSUID the &&SYSUID?)' //SYSLIN DD SYSOUT=B //SYSIN DD * &P SETC DOUBLE('&SYSPARM') PUNCH '&P' END //* //SYSPRINT DD SYSOUT=(,) //SYSTERM DD SYSOUT=(,) Which works. The OP's constraints seem to include Batch on an OS level that doesn't provide PARMDD or SYSIN SYMBOLS=, so AREAD probably isn't helpful. I suspect my suggestion fails if the needed string contains arbitrary apostrophes, ampersands, and parentheses, possibly unmatched. Are there alternatives? Perhaps HLASM isn't a solution. -- gil ----------------------------------------- The information contained in this communication (including any attachments hereto) is confidential and is intended solely for the personal and confidential use of the individual or entity to whom it is addressed. The information may also constitute a legally privileged confidential communication. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this communication in error and that any review, dissemination, copying, or unauthorized use of this information, or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail, and delete the original message. Thank you
