Skip to main content

This article discusses how to specify a user exit program for use with a custom request handler, and how to specify a user exit program and the exit points to be invoked by the request handler at run time.

Problem:

How can I enable a user exit program that can perform additional processing of input and output parameters using the Micro Focus MFRHSOAP request handler?

Resolution:

The Micro Focus MFRHSOAP request handler provides a number of user exit points, enabling you to supply a user exit program that can perform additional processing of input and output parameters. You can also provide a user exit program for use with a custom request handler, if you find this approach offers advantages over including all the code you need in the request handler itself. Specify a user exit program and the exit points to be invoked by the request handler at run time as part of the interface mapping process.

Once the user exit program is built to .int or .gnt code, copy it into a directory that is on $COBPATH. To deploy a user exit program compiled to callable shared object format, copy it into a directory that is on $LD_LIBRARY_PATH ($LIBPATH on AIX systems, $SHLIB_PATH on HP PA-RISC systems). Then,  to get the Request Handler to call your User Exit for a particular service, you need to enable the user exits that you want to use first. This is done in a per Operation basis, so you need to select Operation / Properties within IMTK and enable each one of the user exits. Finally you need to specify the name of the user exits program or in the settings of the service within imtk if you are going to use the deploy tool, or if you are using imtkmake command to deploy it, using the exithandler option, for example:

imtkmake -generate service=MyService type=webservice url=url exithandler=UserExitProgramName

Note that DISPLAY ... UPON CONSOLE only works for COBOL programs running inside the application container. Unfortunately, user exits run outside the container and have no access to the runtime facility that re-directs these kind of displays to the Enterprise Server console log, meaning that any display you do will be lost. Try instead writing a log to a file on disk.

Old KB# 14023

#Enterprise
#ServerExpress
#EnterpriseServer
#COBOL
#Server