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

COBOL Programming :: Replace function

$
0
0
Author: abdulrafi
Subject: Replace function
Posted: Mon Sep 12, 2016 10:12 am (GMT 5.5)

Hi,

I have a variable as below,

Code:
01  WS-VAR      PIC X(21) VALUE '"PAIN PROTECT""ONLY""'.


I am using the below function,
Code:
INSPECT WS-VAR REPLACING ALL '"'   BY SPACES



But I need the output as, PAIN PROTECT "ONLY" but it comes as
PAIN PROTECT ONLY

I tried giving,
Code:
INSPECT WS-VAR REPLACING ALL '"'   BY SPACES 
INSPECT WS-VAR REPLACING ALL '""'  BY '" ' 



but even then I received the same output.

Can you help me out on this ?.[/code]
_________________
Thanks,
Abdul Rafi


Viewing all articles
Browse latest Browse all 8500

Latest Images

Trending Articles



Latest Images