Joined: 02 Dec 2002 Posts: 618 Topics: 172 Location: Stockholm, Sweden
Posted: Fri Aug 13, 2021 3:03 am Post subject: File tailoring with single and double quotes
I have a workaround for this, but I'm wondering if they solution I have is the only way to go.
I'm generating program JCL using Rexx and File Tailoring. One tricky line I need to include looks like this in the skeleton
Code:
)SEL &CONTIN = Y
RUN PROGRAM(&PROGRAM) PLAN(&DB2PLAN) -
)CM It seems to be impossible to file tailor with a combination of
)CM single and double quotes on the same line (maybe it IS possible,
)CM but it's easier to include special characters for the " and then
)CM run a simple edit CHA command to get the results I want)
PARM('/TEST(ALL,"*",PROMPT,"MFI%ICA300??:INSPPREF")')
)ENDSEL
)SEL &CONTIN NE Y
RUN PROGRAM(&PROGRAM) PLAN(&DB2PLAN)
)ENDSEL
In the example above, the line starting with PARM is the one causing the problem and the problem seems to be the double quotes.
When I run my script, the line containining
Code:
RUN PROGRAM(&PROGRAM) PLAN(&DB2PLAN) -
is changed nicely to
Quote:
RUN PROGRAM(IRI507) PLAN(BATCHCD) -
but all lines (20 or so starting with the PARM line) after that are not generated in the resulting JCL file. If I define the line as
instead, then all the lines are generated (I let my script then do a change '§' '"' all after the JCL has been generated).
I have tried running ISPFTTRC, but that, strangely seems to resolve everything okay. (In the example below, I tried defining a variable in my script called Q that contained a double quote, but still all lines starting with PARM were never generated/shown)
Quote:
)SEL &CONTIN = Y
)SEL Y = Y
RUN PROGRAM(&PROGRAM) PLAN(&DB2PLAN) -
RUN PROGRAM(IRI507) PLAN(BATCHCD) -
)CM It seems to be impossible to file tailor with a combination of
)CM single and double quotes on the same line (maybe it IS possible,
)CM but it's easier to include special characters for the " and then
)CM run a simple edit CHA command to get the results I want)
PARM('/TEST(ALL,&Q*&Q,PROMPT,&QMFI%ICA300??:INSPPREF&Q)')
PARM('/TEST(ALL,"*",PROMPT,%ICA300??:INSPPREF")')
)ENDSEL
)ENDSEL
I've tried defining the double quotes as "double" double quotes so the line would look like this
with the same results and now I've run out of ideas.
Do I have to use something like a § and then change it using the ISREDIT change command (not a big deal at all), or is there some "cleaner" way round the problem? _________________ Michael
Joined: 02 Dec 2002 Posts: 618 Topics: 172 Location: Stockholm, Sweden
Posted: Mon Aug 16, 2021 1:33 am Post subject:
Slight misunderstanding here. It's not a problem of me defining the combination of single/double quotes in a Rexx variable that is the problem.
It's getting the FTINCL to recognize this combination.
I'll include 2 variations again. First, with the combination of s/d quotes in the variable. Note I changed the string in the skeleton to use the variable DEBPARM instead of the original s/d quote combination.
Here's the debparm variable content in the rexx script (with surounding *)
Quote:
Line 153 debparm *PARM('/TEST(ALL,"*",PROMPT,"MFI%ICA300??:INSPPREF")')'*
Here is the (partial) generated JCL. Note how it "gives up" with the PARM line and all JCL lines after it.
Quote:
//IRI507 EXEC PGM=IKJEFT1B,DYNAMNBR=100
//*
//SYSTSIN DD *
DSN SYSTEM(DB2C)
RUN PROGRAM(IRI507) PLAN(BATCHCD) -
**************************** Bottom of Data **********
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum