Using INSPECT - How to remove quotes in a string

This is a Mainframe COBOL forum - you can post your queries on Mainframe COBOL, VS COBOL II, COBOL/370 , Enterprise COBOL

Moderators: dbzTHEdinosauer, Moderator Group

Post Reply
User avatar
Vamsi99
Active Member
Posts: 183
Joined: Wed Nov 05, 2008 11:20 am

Using INSPECT - How to remove quotes in a string

Post by Vamsi99 » Mon Jul 13, 2009 11:39 am

Hi,

Please let me know, how to write INPSECT to remove quotes in a string.
when i am writing it is giving compilation error.

Code: Select all

INSPECT WS-STRING REPLACING  ''' BY SPACE.

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Tue Jul 14, 2009 4:12 pm

you can always define 1 char pic x field with a single-quote or a double quote.
you can also use the figurative constant QUOTE/QUOTES depending on the QUOTE/APOST compiler option used. If you have further questions, refer to the Programming Guide and Reference for the version of COBOL that you are using.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others