On Tue, 2 Feb 2016 16:06:37 -0700
Paul Gilmartin <[email protected]> wrote:

> 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

Just read the parm in to a real program in assembler, cobol, pl/i etc. and
punch it out rather than trying to do it dynamically. But the problem
doesn't seem well defined since a PARM can exceed 80 characters but card
images cannot.

-- 
RSA 4096 fingerprint 7940 3F02 16D3 AFEE F2F8  ACAA 557C 4B36 98E4 4D49

Reply via email to