To explain dynamic statements, dynexpln creates a static application for the statements and then invokes db2expln. To create the static statements, dynexpln generates a trivial C program with the statements and then calls the DB2 precompiler to create the package. (The generated C program is not complete and cannot be compiled; it only contains enough information that the precompiler can build the package.)
The following are common messages displayed by dynexpln:
Since dynexpln invokes db2expln, it is possible to see most of db2expln's error messages.
This message will appear in the output if an error occurred connecting to the database. A CLI error message will also be displayed indicating why the connection could not be completed. Correct the cause of the error and run dynexpln again.
This message will appear if the given file exists at the time dynexpln is run. Remove the file or change the value of the DYNEXPLN_PACKAGE environment variable to change the name of the file which will be created and run dynexpln again.
This message will appear if the given package exists at the time dynexpln is run. Drop the package and run or change the value of the DYNEXPLN_PACKAGE environment variable to change the name of the package which will be created and run dynexpln again.
This message will appear if the given file cannot be written to. Ensure that dynexpln can write files in the current directory and run it again.
This message will appear if the file given with the -f option cannot be read from. Ensure that the file exists and that dynexpln can read it. Then run dynexpln again.
Environment Variables: There are two different environment variables that can be used in conjunction with dynexpln:
For example: DYNEXPLN_OPTIONS="OPTLEVEL 5 BLOCKING ALL"
The name is also used to create the names for the intermediate files that dynexpln uses.
[ DB2 List of Books | Search the DB2 Books ]