![]() | ![]() | ![]() | ![]() | ![]() |
AddressCmd() |
This is a rexx function provided by PPWIZARD. This routine (like all PPWIZARD extensions) can be used with any operating system supported by PPWIZARD.
This routine will pass the command that you specify (as the first argument) to the operating system's command processor.
This routine allows you to execute any native operating system commands as well as perl, pascal, rexx or in fact code written using any language. If the commands output is required the output can be redirected and you can tell ppwizard to #include it or you can load it yourself to parse out selected information.
The command will by default be logged when debug is on. This is a major reason why you should use this call (rather than using rexx's native methods).
If your command produces some files as output or you create some by redirection you can specify the names of the files as parameter 2 onwards and these will be dumped when debug is on (the only reason for supplying more than the command line as the first parameter).
Under OS/2 if the command to be executed is a rexx batch file you should preceed the command with "CMD.EXE /c" or the command will fail. If you don't know what the command is you should preceed all commands with that string to play safe.
Stupid Example |
This example shows a directory commands output going into one file and any error messages into another. If debug is on the contents of both files as well as the return code will be dumped.
#evaluate "" ^call AddressCmd "dir /od >dirlist.out 2>error.out", "dirlist.out", "error.out"^
![]() | ![]() | ![]() | ![]() | ![]() |