ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

strqsh.....to quote or not to quote that is the question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • strqsh.....to quote or not to quote that is the question

    Hi All:

    This runs from a command line:
    Code:
    strqsh cmd('rm //qntc/fred/common/ftphome/travelers/travbill/myfile')
    This does not:
    Code:
     strqsh cmd(rm '//qntc/fred/common/ftphome/travelers/travbill/myfile')
    This does not run from CL:
    Code:
       pgm                                                                  
      DCL        VAR(&qshrm)    TYPE(*CHAR) LEN(150)                      
       dcl        var(&qt)       type(*char) len(1) value('''')           
       chgvar &qshrm value(&qt +                                              
          *cat 'rm //qntc/fred/common/ftphome/travelers/travbill/myfile' +
           *tcat &qt)                                                     
       STRQSH     CMD(&qshrm)                                             
       endpgm
    but this does:
    Code:
       pgm                                                                  
      DCL        VAR(&qshrm)    TYPE(*CHAR) LEN(150)                      
       dcl        var(&qt)       type(*char) len(1) value('''')           
       chgvar &qshrm value(+                                              
          'rm' *bcat &qt *tcat '//qntc/fred/common/ftphome/travelers/travbill/myfile'  +
           *tcat &qt)                                                     
       STRQSH     CMD(&qshrm)                                             
       endpgm
    What's up with that? I need to move the quote after the "RM" when running in CL but before the "RM" when running interactively?
    Again I ask.....WHAT'S UP WITH THAT?

    Thanks for any input
    GLS
    The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

  • #2
    Re: strqsh.....to quote or not to quote that is the question

    That's the CONNECTICUT clause ... it's nice to see it's actually working!

    Comment


    • #3
      Re: strqsh.....to quote or not to quote that is the question

      Hey FastOne...

      Thanks for the update. I wasn't aware of the CT clause.


      note to self.....send a few truck loads of Snow to FastOne's Driveway

      GLS
      The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

      Comment

      Working...
      X