Please enable JavaScript to view this site.
Custom Options can be added to the WRKSPLF command using an IBM i Exit Program and Exit Point QIBM_QNPS_SPLF. This Exit Point is used by exit programs that process spooled files.
•Step 1 - Check for existing WRKSPLF Exit Programs
•Step 2 - Create your bespoke Exit Program for WRKSPLF
•Step 3 - Add a new Exit Program for WRKSPLF
If you no longer need an entry then you can Remove an existing Exit Program from WRKSPLF.
Step 1 - Check for existing WRKSPLF Exit Programs
First you need to find out what has already been configured by using the following command.
WRKREGINF EXITPNT(QIBM_QSP_SPLF_LSTACT)
Now use Option 8=Work with Exit Programs to look at the existing entries.
Here at Cobwebb we have four entries all calling the same program COBSPLFEP but passing a different entry (‘C’, ‘D’, ‘E’ or ‘F’) e.g here is a screen shot from selecting Option 5 against number 1.
Step 2 - Create your bespoke Exit Program for WRKSPLF
From Version 6.2.81 of the Cobwebb Server software, we have provided the source for our internal program COBSPLFEP that we use here at Cobwebb and you will find this in QUSRTOOLLE in library CPPD. If you have a look at the program you will see that we have coded for the above four options to call four different commands e.g.
Option |
Command |
Description |
C |
Create PPD Output |
|
D |
Duplicate a Spooled File |
|
E |
EDTSPLF |
Edit a Spooled File (currently only an internal tool here at Cobwebb). |
F |
Send the Spooled File as a Fax |
Decide which Options / Commands you wish to use - you can use any that can be called using the following spooled file information:
D Spool_ID DS
D Job_Name 1 10
D User_Name 11 20
D Job_Number 21 26
D Splf_Name 27 36
D Splf_Num 37 40B 0
Compile your program into a bespoke library on your IBM i (not the CPPD library otherwise it will not exist after an upgrade of the Cobwebb Server software).
Step 3 - Add a new Exit Program for WRKSPLF
To add a new Exit Program for WRKSPLF you need to do the following for each option you wish to use, one for each option:
Note: *ALLOBJ and *SECADM authorities required for this command.
ADDEXITPGM EXITPNT(QIBM_QSP_SPLF_LSTACT) FORMAT(LASP0100) PGMNBR(*LOW) PGM(COBEXIT/COBSPLFEP) PGMDTA(*JOB 1 C)
The entries in red will need to match the Library/Program COBEXIT/COBSPLFEP and Option C that you wish to use.
Remove an existing Exit Program from WRKSPLF
There is a RMVEXITPGM command to remove an option if it is no longer required e.g.
RMVEXITPGM EXITPNT(QIBM_QSP_SPLF_LSTACT) FORMAT(LASP0100) PGMNBR(1)
The entry in red will need changing to be the number of the entry you wish to remove. Note: *ALLOBJ and *SECADM authorities also required for this command.