Sample: Terminal Configuration Exit Program

The sample files are located in %PUBLIC%\Documents\Micro Focus\Enterprise Developer\samples\Mainframe\CICS\DotNet\MFAIEXIT

The TN3270 listener and the DFHZAI terminal auto-install program have basic support for assigning a unique terminal netname and terminal ID, and for handling the basic IBM 3270 models — model 2, 3, 4, or 5, which have different screen sizes.

Normally, the client will send a terminal type name, which will be recorded in the TCTTE and used to assign the terminal model. (The resulting screen size can be seen in the output of the CINQ transaction.) DFHZAI will assign a terminal netname of the form NETaxxx, where a is a capital letter and xxx are three digits or capital letters. The terminal ID is taken from the last four characters of the netname.

Clients can also request a netname. DFHZAI will honor this request if the name, and the corresponding terminal ID, are not in use; otherwise, the request will be rejected and the conversation terminated.

Customers can override the normal handling of terminal types, netnames, and IDs in auto-install using the auto-install exit. Before finishing the terminal installation process, DFHZAI will try to link to a program named MFAIEXIT. If this program exists, it receives a commarea with the netname, ID, and device type currently assigned to the terminal. It can change any of those fields and set flags telling DFHZAI to set the changes in the TCTTE.

This facility provides a simple way to override the terminal model based on the netname requested by the client, for example.

The sample program recognizes the netname NEWNAME and changes it to FROMEXIT. It also recognizes the netnames MODELx, where x is 2-4, and sets the appropriate device type. You can modify this example program to suit your requirements.

To run this demonstration in Visual Studio :

The project contains: