ENF listener code examples
A program can use one of the following methods to determine whether the z/OSMF server is up or
down in the sysplex:
- An APF-authorized program can use the ENFREQ LISTEN service to specify a listen exit for ENF event code 83 that tells the program the z/OSMF server is up and running. For an example of this technique, see the coded samples in Examples for an authorized program.
- An unauthorized program cannot use the ENFREQ LISTEN service. However, it can periodically check the global storage pointer, which is mapped by macro IZUGSP. For an example of this technique, see the coded sample in Example for an unauthorized program.
Examples for an authorized program
Example program IZULSTEN shows how an APF-authorized program can listen for z/OSMF server status. IZULISTEN invokes the sample exit routine, IZULST00, which must reside in the link pack area (LPA). Both sample programs are written in assembler language.
Example for an unauthorized program
Figure 4 shows a sample program in REXX that can be used to query the z/OSMF global storage area, which is mapped by the macro IZUGSP.