Simple CLIST question: embedded single-quotes in a string

Ask/Clarify the questions on TSO, CLIST & REXX

Moderators: Veera, Moderator Group

Post Reply
Racinghero
Member
Posts: 1
Joined: Fri May 17, 2013 2:48 pm

Simple CLIST question: embedded single-quotes in a string

Post by Racinghero » Fri May 17, 2013 2:50 pm

Suppose variable &MSRCE is equal to the string GGGG.MYDSN . This SET statement works fine:

SET &MSG = &STR(===> DATASET &MSRCE HAS BEEN SAVED.)

When I display &MSG, I correctly get

===> DATASET GGGG.MYDSN HAS BEEN SAVED.

But I want it to say

===> DATASET 'GGGG.MYDSN' HAS BEEN SAVED.

with single-quotes around the DSN. How do I modify the SET statement to do that? There must be a trick, because I get a syntax error when I say this:

SET &MSG = &STR(===> DATASET '&MSRCE' HAS BEEN SAVED.)

Thanks

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Fri May 17, 2013 11:50 pm

Don't use Clist! Otherwise look up the manual - you probably have to use double or triple quotes.
Regards
Nic

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Sun May 19, 2013 6:49 am

As suggested, REXX is a better choice that Clist.

I wouldn't re-write a 1000 line Clist just to use REXX, but if this is somethiing new, i would surely encourage using REXX.
Have a good one

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