Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

CLIST & REXX :: Translating Quotes

$
0
0
Author: Khadhar Basha
Subject: Translating Quotes
Posted: Tue May 09, 2017 11:52 am (GMT 5.5)

Hi,
I am trying below code
Code:

CALL_STMT = "CALL 'MODULE1' USING "
CALL_STMT1 = "CALL "MODULE2" USING "
SAY CALL_STMT
SAY CALL_STMT1

SPACES = " "
DOUBLE_QUOTE = '"'
SINGLE_QUOTE = "'"

TRANSLATE(CALL_STMT,SPACES,SINGLE_QUOTE)
TRANSLATE(CALL_STMT1,SPACES,DOUBLE_QUOTE)
SAY CALL_STMT
SAY CALL_STMT1
 


Expected output is
Code:

CALL MODULE1 USING
CALL MODULE2 USING


I am trying - To read the COBOL program, when there is a call statement in the line, I should take out the single and double quotes which are using to values of literal for cobol static call programs, then called program name will be separated using PARSE VAR CALLDUMMY PGMNAME.

While running above code I am getting below error

Code:

'CALL"MODULE1"USING"' is not recognized as an internal command
'CALL"MODULE2"USING"' is not recognized as an internal command


also when i try to execute below loops but both the loops are not satisfied

Code:


IF POS(SINGLE_QUOTE,CALL_STM1) THEN
   SAY 'LINE HAS SINGLE QUOTE'

IF POS(DOUBLE_QUOTE,CALL_STM1) THEN
   SAY 'LINE HAS DOUBLE QUOTE'

I need the above check - to make sure it is static call - If i dont have any quotes then i will move the line to dynamic call stem[/code]

help me in achieving above
_________________
Khadhar Basha


Viewing all articles
Browse latest Browse all 8500

Trending Articles