PPWIZARD Manual
[Bottom][Contents][Search][Prev]: /Template[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 typically be a validation step but ppwizard does not care what you specifiy on the command line.

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.

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]: /Template[Next]: /WarningsRc

PPWIZARD Manual
My whole website and this manual itself was developed using PPWIZARD (free preprocessor written by Dennis Bareis)
Tuesday January 02 2001 at 7:37am