MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

File tailoring with single and double quotes

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
misi01
Advanced


Joined: 02 Dec 2002
Posts: 614
Topics: 171
Location: Stockholm, Sweden

PostPosted: Fri Aug 13, 2021 3:03 am    Post subject: File tailoring with single and double quotes Reply with quote

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
Code:

 PARM('/TEST(ALL,§*§,PROMPT,§MFI%ICA300??:INSPPREF§)')   

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
Code:

 PARM('/TEST(ALL,""*"",PROMPT,""MFI%ICA300??:INSPPREF"")')   

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
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12354
Topics: 75
Location: San Jose

PostPosted: Fri Aug 13, 2021 12:17 pm    Post subject: Reply with quote

Did you try this approach of concatenation ?

Code:

/* rexx */                       
SAY "PARM('/TEST(ALL,"       ||, 
    '"'                      ||, 
    '*'                      ||, 
    '"'                      ||, 
    ',PROMPT,'               ||, 
    '"'                      ||, 
    'MFI%ICA300??:INSPPREF'  ||, 
    '"'                      ||, 
    ")')"                         


results in

Code:

 PARM('/TEST(ALL,"*",PROMPT,"MFI%ICA300??:INSPPREF")')

_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
misi01
Advanced


Joined: 02 Dec 2002
Posts: 614
Topics: 171
Location: Stockholm, Sweden

PostPosted: Mon Aug 16, 2021 1:33 am    Post subject: Reply with quote

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 **********


The results from ISPFTTRC
Quote:
19 1 1 )CM run a simple edit CHA
20 1 1 &DEBPARM
24 1 1 0 PARM('/TEST(ALL,"*",PROMP
21 1 1 )ENDSEL
21 1 0 )ENDSEL
22 1 )SEL &CONTIN NE Y
24 1 0 )ENDSEL
25 1 END
25 1 0 END
26 1 //*
26 1 0 //*
27 1 &STPLIB1
27 1 0 //STEPLIB DD DISP=SHR,DS
28 1 &STPLIB2
28 1 0 // DD DISP=SHR,DS
29 1 &STPLIB3
29 1 0 // DD DISP=SHR,DS
30 1 &STPLIB4
30 1 0 // DD DISP=SHR,DS
31 1 &STPLIB5
31 1 0 // DD DISP=SHR,DS

0 FTCLOSE
-------------------------- Total Records=59 <------- Note the 59 records that weren't generated


Now, using a § placeholder for the double quotes

Here's the debparm variable content in the rexx script (note the § character instead of dq)
Quote:
Line 153 debparm *PARM('/TEST(ALL,§*§,PROMPT,§MFI%ICA300??:INSPPREF§)')'*


Here is the resulting generated JCL (after including a simple ISREDIT 'change § to " all' in the rexx script)
Quote:
//IRI507 EXEC PGM=IKJEFT1B,DYNAMNBR=100
//*
//SYSTSIN DD *
DSN SYSTEM(DB2C)
RUN PROGRAM(IRI507) PLAN(BATCHCD) -
PARM('/TEST(ALL,"*",PROMPT,"MFI%ICA300??:INSPPREF")')'
END
//*

_________________
Michael
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group