PPWIZARD is a free preprocessor for HTML, REXX, Visual Basic or any text files.
[Bottom][Contents][Search][Prev]: /Template[Next]: /WarningsRc
\ -> PPWIZARD Command Line -> Switches -> /Validate

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

This is a PPWIZARD command line switch.

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 its purpose. Another common use would be to use ppwizard as a preprocessor step and then call the program which will use its 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 its 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?).

The "/syntax" switch should be used where this makes sense as this can handle multiple output files from one PPWIZARD invokation.

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 ***
       echo *** NOTE
       echo *** ~~~~~
       echo *** OS/2 version 3 does not support "WPUrl" objects, these are
       echo *** created last so all other setup has completed for Warp 3.
       echo ***
       pause
       echo.                                                               >>out\OS2SETUP.LOG
       echo.                                                               >>out\OS2SETUP.LOG
       echo ***                                                            >>out\OS2SETUP.LOG
       echo *** OS/2 version 3 does not support "WPUrl" objects, these are >>out\OS2SETUP.LOG
       echo *** created last so all other setup has completed for Warp 3.  >>out\OS2SETUP.LOG
       echo ***                                                            >>out\OS2SETUP.LOG
       e.exe out\OS2SETUP.LOG
       goto EndBatch
:CreateOk


email me  any feedback, additional information or corrections.
See this page online (look for updates)

[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)
Sunday November 05 2017 at 10:00am