PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: /UNC[Next]: /WarningsRc

Switch /Validate:[{RcTest}][!]Command

This is a PPWIZARD command line switch. You can set up your own default switches in the "PPWIZARD_OPTIONS" environment variable or in project files.

This switch allows you to specify a command which will be executed if the output file is successfully generated. This will frequently be a validation step but ppwizard does not care what you specify on the command line or it's purpose. Another common use would be to use ppwizard as a preprocessor step and then call the program which will use it's output directly.

The "#OnExit #EXEC" command can be used to do the same thing from within a header file.

The command may contain references to macros or standard definitions. The string "{?}" represents the output file.

Normally the command output is hidden and captured if in debug mode. To see the output preceed the command with the '!' character.

If "RcTest" is not supplied then the return code is ignored otherwise it is a rexx expression where the rexx variable "CmdRc" holds the commands return code. A boolean result is expected with TRUE meaning the validation was successful.

Under Windows 95-ME you probably can't get any decent return codes at all (due to major bugs in it's command processor), but even on Windows NT or 2000 be aware that both within the operating system itself as well as in other 3rd party programs there are a lot of situations where return codes can't be trusted (must be the monkeys fault?).

Examples

    ppwizard  *.it  /output:out\*.htm /validate:Doit.exe{x20}"{?}"
    ppwizard  *.it  /output:out\*.htm /validate:{CmdRc=0}MyValidate.exe{x20}/x{x20}"{?}"
    

The following example shows ppwizard creating a temporary (or intermediate) file which is used by another program. PPWIZARD has been used to preprocess the file so the second program has the advantage of being able to make use of all ppwizard features such as file inclusion, macros and conditional generation:

    %COMSPEC% /c ppwizard.cmd os2setup.db /output:out\os2setup.tmp /validate:{CmdRc=0}wpsobj.exe{x20}MakeObjects{x20}out\os2setup.tmp /debug >out\OS2SETUP.LOG 2>&1
    if not errorlevel 1 goto CreateOk
           echo ***
           echo *** Create of PPWIZARD objects has failed...
           echo *** Will display "out\OS2SETUP.LOG" (contains details).
           echo ***
           pause
           e.exe out\OS2SETUP.LOG
           goto EndBatch
    :CreateOk


[Top][Contents][Search][Prev]: /UNC[Next]: /WarningsRc

PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Friday June 01 2001 at 5:58pm