The map classes generated using CICSBMSC can be compiled and built into a Client application. Note that when building Windows applications using pre-compiled headers, add #include stdafx.h to the .cpp file generated by CICSBMSC.
try {
// Initialize CICS Transaction Gateway EPI
CclEPI epi;
// Connect to CICS server
CclTerminal terminal( "CICS1234" );
// Start transaction on CICS server
CclSession session( Ccl::sync );
terminal.send( &session, "EPIC" );
MAPINQ1Map map( terminal.screen() );
CclField* field;
// Output text from "PRODNAM" field
field = map.field(MAPINQ1Map::PRODNAM);
cout << "Product Name: " << field->text() << endl;
// Output text from "APPLID" field
field = map.field(MAPINQ1Map::APPLID);
cout << "Product Name: " << field->text() << endl;
} catch (CclException &exception) {
cout << exception.diagnose()<<endl;
}
BMS Map objects can also be used within the handleReply method for asynchronous and deferred synchronous calls.
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 overlayed by another map or by individual 3270 fields.