The LMS sample exit

Sample code for the LMS user exit is provided in HFM.SHFMSAM1. There are two sample members: HFMCRAEX and HFMCRACJ.

HFMCRAEX contains the working COBOL code for the sample exit. Although the function performed by HFMCRAEX is not very useful (Z Data Tools can use it to access members of a PDS as if they were in a library management system) it serves as a working model of an exit. To demonstrate the sample exit using HFMCRAEX, the PDS must be defined as FB 80 and must contain a member named $$HFM$$ in order to be validated as a supported library.

HFMCRACJ contains JCL which compiles two COBOL programs (HFMCRAEX and TEST) and then runs TEST. TEST is the main program and it calls the sample COBOL exit, HFMCRAEX. You can use TEST, to demonstrate the exit and to verify your own exit prior to making it available to Z Data Tools. You do not have to have any LMS library available to run the demonstration. Refer to the prolog to HFMCRACJ for information about the changes you need to make.