You can ensure that the job for which the procedure is to be used, does not end with OK status, if the batch script has failed by performing conditional processing in batch programs.
In Windows NT Technology, you can use the built-in IF with ERRORLEVEL, EXIST, or string comparison, followed by a specified command to make your batch script end with an error code and exit, making the software delivery functions aware of the error.
For example, the following item procedure command file copies the file, myfile.txt, to the root of the hard disk, if the file exists in the source directory. If it does not, the procedure file ends with an error code.
@echo off copy myfile.txt C:\*.* IF ERRORLEVEL 1 EXIT
If the file, myfile.txt, is not found, the job ends with error code SDM228001.
For information about performing conditional processing in batch programs, see the platform-specific documentation. In Windows NT Technology, you can open a command prompt, type help if, or help exit to find more information.
|
Copyright © 2013 CA.
All rights reserved.
|
|