Please enable JavaScript to view this site.
Make sure that you have the CPPD library in your library list before you edit the CLP source.
Add the CRTPPD command where you want to run it in the CLP program e.g.
CPPD\CRTPPD#1
If you press F4 on the line of source where you have entered the above command you will be prompted for the remaining CRTPPD parameters so that you can complete them as required.
If you wish to pick a spool file that has just been produced by the program that you are adding the CRTPPD command to then you may wish to change the Select spooled file parameter to be *ENTSPL see the topic Using Enter spooled file *ENTSPL for details.
Using * for the Job name will pick up the information for the current job and specifying *LAST as the Spooled number should pick up the last spool file generated by the current job – hopefully the one you are after. All you should need to enter will be the Member name i.e. the name of the PPD file.
Immediately after the line of code where you have the CPPD\CRTPPD you should really have the following line:
MONMSG MSGID(PPD0000)
What this will do is to check for ALL error messages [prefixed with PPD] that are sent by the CRTPPD command (see CRTPPD Error Messages for details). All this will do is to prevent the CLP program from throwing up an error it won’t fix the problem if your CRTPPD command did not work so you need to decide if this is what you want to do.
If you wish the program to stop if there is an error then you should add the following line instead:
MONMSG MSGID(PPD0025 PPD0149)
This will just monitor for the “Completed Successfully” message PPD0025 and the “No output generated” message PPD0149 which you can get if you are using the Advanced Reformatting Utility as the actual PPD process does not produce the output the Advanced Reformatting Utility does.
PGM
Existing CLP ------------
/* Run CRTPPD command */
CPPD/CRTPPD SFILE(*ENTSPL) PPDNAM(PPDNAME/CPPD/APRTPDM)
MONMSG MSGID(PPD0025 PPD0149)
/* End of CRTPPD processing */
ENDPGM
You will also need to have the CPPD library in the library list when you compile the CLP program.
Notes
Note #1: If you specify the library name before the CRTPPD command as above then you will not need to add the library CPPD to the library list of the job that will be running the CLP program. Adding the library list before the command makes sure that the command is run from the CPPD library.
The CRTPPD command itself should have the Product Library set to CPPD which will make sure that everything that the command calls will be picked up from the CPPD library e.g.
If you run DSPCMD CPPD/CRTPPD from a command line and then press Page Down you should see the Product Library set.