#193 REXX Extensions HOSTEMU sample in documentation will not work

Roger Metcalf

The sample code given in the REXX Extensions document will not work/execute as given. The sample uses mixed quotes. All the quotes used must be be the same for the code to execute properly. The sample should read:

address hostemu "execio * diskr "./inputfile.txt" (finis stem in."

note the use of double quotes at the beginning and end of the execio statement.


  • David Ashley
    David Ashley

    You are incorrect here. Remember that this string is being passed wholly to the Rexx subcommand environment. The beginning and ending quotes (single or double) are stripped off the string before it arrives at the subcommand processor so those quotes do not matter in the least.

    The quotes around the file name are necessary in case the file name has an embedded blank. If you do not quote the file name string then the lexical analyser will become confused and an error will be generated (if there was an embedded blank in the file name). If the file name has no embedded blank it is not really necessary to quote it.

    And you probably tested this on Windows. Remember that the NTSF file system is caseless so Windows would find the path even if the case was incorrect. But the way you want to code it the Rexx interpreter would uppercase the filename and that might mean that the path would be invalid on a *nix platform. Look carefully at your code and you will see the filename is really outside of all quotes as far as the Rexx interpreter is concerned.



Cancel   Add attachments