Working with IBM i Exit Programs
What is an Exit Program?
An Exit program is a named unit of programming code that is executed when a particular condition occurs, such as one that requires some screening for authorization.This may be part of an operating system or part of an application program.
In IBM i OS, an exit program is a supplemental security measure that controls user access to applications, and prevents access outside of authorized applications.
An AS/400 exit program (so called because the system exits to the program in the middle of a request from the user) is not used - as might be expected - to exit from a program, but to process user requests: it monitors user activity, checks to see if user requests comply with installation rules, and rejects those requests that contravene those rules.
How to Register Exit Programs?
To register an exit program with the registration facility, use the Work with Registration Information (WRKREGINF) command.In addition to registering an exit program, it is necessary to restart the prestart jobs for a particular server.
+-------------------------------------------------------------------------------+
| Work with Registration Info (WRKREGINF) |
| |
| Type choices, press Enter. |
| |
| Exit point . . . . . . . . . . . *REGISTERED |
| Exit point format . . . . . . . *ALL Name, generic*, *ALL |
| Output . . . . . . . . . . . . . * *, *PRINT |
| |
+-------------------------------------------------------------------------------+
Press Enter to view the registered exit points.
+-------------------------------------------------------------------------------+
| Work with Registration Information |
| |
| Type options, press Enter. |
| 5=Display exit point 8=Work with exit programs |
| |
| Exit |
| Exit Point
| Opt Point Format Registered Text |
| _ QIBM_QCA_CHG_COMMAND CHGC0100 *YES Change command exit programs |
| _ QIBM_QCA_RTV_COMMAND RTVC0100 *YES Retrieve command exit progra |
| _ QIBM_QHQ_DTAQ DTAQ0100 *YES Original data queue server |
| _ QIBM_QIMG_TRANSFORMS XFRM0100 *YES |
| _ QIBM_QJO_DLT_JRNRCV DRCV0100 *YES Delete Journal Receiver |
| _ QIBM_QLZP_LICENSE LICM0100 *YES Original License Mgmt Server |
| _ QIBM_QMF_MESSAGE MESS0100 *YES Original Message Server |
| _ QIBM_QMH_REPLY_INQ RPYI0100 *YES Handle reply to inquiry mess |
| 8 QIBM_QNPS_ENTRY ENTR0100 *YES Network Print Server - entry |
| _ QIBM_QNPS_SPLF SPLF0100 *YES Network Print Server - spool |
| _ QIBM_QOE_OV_USR_ADM UADM0100 *YES OfficeVision/400 Administrat |
| |
| Command |
| ===> |
| |
+-------------------------------------------------------------------------------+
Choose option 8 to work with the exit programs for the exit point defined for the server you would like to work with.
+-------------------------------------------------------------------------------+
| Work with Exit Programs |
| |
| Exit point: QIBM_QNPS_ENTRY Format: ENTR0100 |
| |
| Type options, press Enter. |
| 1=Add 4=Remove 5=Display 10=Replace |
| |
| Exit |
| Program Exit |
| Opt Number Program Library |
| 1_ __________ __________ |
| |
| (No exit programs found) |
| |
+-------------------------------------------------------------------------------+
Use option 1 to add an exit program to an exit point.
Notes:
If an exit program is already defined, you must remove it before you can change the name of the program.Even though the registration facility can support multiple user exits for a specific exit point and format name, the servers always retrieve exit program 1.
You must end and restart the prestart jobs for the change to go into affect.
+-------------------------------------------------------------------------------+
| Add exit program (ADDEXITPGM) |
| |
| Type choices, press Enter. |
| |
|Exit point . . . . . . . . . . . > QIBM_QNPS_ENTRY |
|Exit point format . . . . . . . > ENTR0100 Name |
|Program number . . . . . . . . . > 1 1-2147483647, *LOW, *HIGH |
| Program . . . . . . . . . . . . MYPGM Name |
| Library . . . . . . . . . . . MYLIB Name, *CURLIB |
|THREADSAFE . . . . . . . . . . . *UNKNOWN *UNKNOWN, *NO, *YES |
|Multithreaded job action . . . . *SYSVAL *SYSVAL, *RUN, *MSG, |
|Text 'description' . . . . . . . *BLANK |
| |
+-------------------------------------------------------------------------------+
Enter your program name and library for the program at this exit point.
Comments
Post a Comment