REXX - spaces removed when passed as argument

Help
2003-05-08
2003-05-23
  • robert godwin

    robert godwin - 2003-05-08

    HELP Please! I am running a command within a REXX command file to run another REXX command, passing a parameter e.g.

    COMMAND1.CMD AAABBB[space][space]CCC

    With Command1.cmd starting:

    ARG MSG

    The problem is that the variable MSG then seems to have lost one of the spaces e.g.:
    AAABBB[space]CCC

    Can anyone offer explanation and resolution?

    Thanks
    Rob

     
    • Mark V

      Mark V - 2003-05-09

      I see it too with 3.2 on Win32.  Even with
      msg = ARG(1)
      which as I understand it should represent the entire argument w/o collapsing spaces ('20'x).

       
      • robert godwin

        robert godwin - 2003-05-09

        OK, thanks. Luckily in my current project the string will always be the same format so I can just add a  a space between the first half of the string and the second half but its a bit of a pain. Thanks for you help on this one. (Again!)

         
    • robert godwin

      robert godwin - 2003-05-22

      In case anyone is interested - resolution to this explained in Bug #623599

       
    • robert godwin

      robert godwin - 2003-05-23

      its no good...I still cant get this to work. My work around isnt feasible after all. The explaination in bug #623599 works if the parameters are hard coded but as I am passing both command and parameter as a variable, it fails. e.g.

      'rexx' '"mycomand.cmd"' '"123   456   789"'
      will work.

      CMDNAME = mycomand.cmd
      PARAM = "123   456   789"   
      'rexx' '"CMDNAME"' '"PARAM"'

      wont work. (I wont go into details but we cant change this logic). I have tried using "CALL" but that throws an error.   Any suggestions? Thanks

       
    • robert godwin

      robert godwin - 2003-05-23

      OK, i've cracked it now by adding [single quote][double quote][single quote] at either side of the parameter variable PARAM i.e.:
      PARAM = '"'PARAM'"'
      Thanks anyway

       

Log in to post a comment.