1. How to route Easytrieve for Windows program error message to an output file?
This attempt is not working:
CD E:\EASYTRIEVE\BIN
EZTERP TEST1.PCO >> %JOBDIR%\TEST1.LOG
The "ECHO" error messages below (when ERRORLEVEL is not 0) are shown in the command prompt instead of being written to the file %JOBDIR%\TEST1.LOG
+++
IF %ERRORLEVEL% EQU 0 GOTO :EMPTYCHK1
ECHO *** ALERT CONTROL-M ***
ECHO 'RUN-NOT-OK'
ECHO %ERRORLEVEL%
EXIT
CD %JOBDIR%
+++
2. How does Easytrieve identify the PCO library/DLL files during run time?
Have added the PCO Library location under Windows System Environment Variable PATH but received PCO file not found. At present need to change the directory to BIN, keep all PCO files in BIN & then the job runs successfully.
Would like to have a library location for PCO library/DLL files which is separate from the Easytrieve system library in the BIN directory.
Easytrieve for Windows, release 11.1
1. For the command provided it will only redirect (append) Standard Out/STDOUT (1) to the log file but not Standard Error/STDERR (2).
EZTERP pgmname.PCO >> %JOBDIR%\pgmname.LOG
See: Microsoft > Docs > Troubleshoot > C++ in Visual Studio > Language or Compilers > Redirecting error from Command Prompt
This command will redirect STDERR to STDOUT and they should both then go to the same log file:
EZTERP pgmname.PCO >> %JOBDIR%\pgmname.LOG 2>&1
2. For locating the PCO library/DLL files, use the EZTDLLS environment variable.