Using Map classes

The features of the classes generated by using the BMS Conversion Utility, and using the generated Map class.

To use the generated Map class, create a Terminal and start a transaction as usual:
         try {
            EPIGateway epi = new EPIGateway("jgate", 2006 );
            // Connect to CICS server
            Terminal terminal = new Terminal( epi, "CICS1234", null, null );
            // Start transaction on CICS server
            terminal.send( null, "EPIC", null );
             MAPINQ1Map map = new MAPINQ1Map( terminal.getScreen() );
             Field field;
             // Output text from "PRODNAM" field
             field = map.field(MAPINQ1Map.PRODNAM);
             System.out.println( "Product Name: " + field.getText() );
             // Output text from "APPLID" field
             field = map.field(MAPINQ1Map.APPLID);
             System.out.println( "Applid : " + field.getText() );
         } catch (Exception exception) {
             exception.printStackTrace();
         }

In this example the server program uses a BMS map for its first panel, for which a map class "MAPINQ1Map" has been generated. When the map object is created, the constructor validates the screen contents with the fields defined in the map. If validation is successful, fields can then be accessed using their BMS field names instead of by index or position from the Screen object:

BMS Map objects can also be used within the Session handleReply method.

For validation to succeed, the entire BMS map must be available on the current screen. A map class cannot therefore be used when some or all of the BMS map has been overlaid by another map or by individual 3270 fields.


Information Information

Feedback


Timestamp icon Last updated: Tuesday, 19 November 2013


https://ut-ilnx-r4.hursley.ibm.com/tg_latest/help/topic/com.ibm.cics.tg.doc//progde/cclaojep.html