32
RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character based system. Supporting the standard vt220, tn5250 or tn3270 emulation protocols, RFGen provides multiple levels of integration capability to speed-up and simplify Screen Mapping development efforts. RFGen Screen Mapping

RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Embed Size (px)

Citation preview

Page 1: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character based system.

Supporting the standard vt220, tn5250 or tn3270 emulation protocols, RFGen provides multiple levels of integration capability to speed-up and simplify Screen Mapping development efforts.

RFGen Screen Mapping

Page 2: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

This is where you specify the host connection information, enter the downtime schedule for this host, and choose settings for the other system defaults…

Making The Connection

In Programmers Assistant, click on ‘Configure’. Select ‘Add New Screen Mapping Connection. The ‘Configure Screen Mapping Connection’ dialog box appears…

Page 3: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

To bring up the emulation window, simply “double-click” on the Host icon in the RFGen status bar, and the selected session window will appear.

Double Click - Screen Mapping Session Window appears

Displaying the Environment

Page 4: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Session – This allows the user to control various elements of the session.

Hot Keys – This allows the user to send IBM specific keys to the host system.

Macros – This allows access to the RFGen Screen Mapping system.

Using the Environment

RFGen uses a standard “point-and-click” interface to allows users to interact with the host session as well as the built-in Screen Mapping features…

Page 5: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

The Pop-Up Window

RFGen also includes pop-up window to simplify the macro recording process. From this window, users can quickly insert timing and other commands into the script they are recording. To access this pop-up, just right-click on the screen.

Page 6: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Three Levels of Integration

Basic Also known as “Traditional Screen Mapping”, the user has complete control over the host session. All interaction is written and maintained by the user.

Simplified This method takes a “System” approach to Screen Mapping by providing built-in capabilities to navigate host menus and update host screens.

Embedded This method builds upon Simplified Screen Mapping by embedding fields directly into RFGen forms.

RFGen provides three levels of integration capability for the user. They are as follows…

Page 7: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

“Basic” Screen Mapping is a low-level approach to interacting with the host system. It consists of a series of HLLAPI like commands that are used to send data to and to get data from the host system. In RFGen, these low-level commands are based entirely on VBA coding.

Basic Screen Mapping

Example:

If Not SMWaitForText("Enter your user id:", 2, 1, -1) Then SMSendKey KeyEnter If Not SMWaitForText("Enter your user id:", 2, 1, -1) Then Exit FunctionEnd If'SMSendText "dsg"SMSendKey KeyEnterSMWaitForCursor(41, 24, 2)SMSendText “dms"SMSendKey KeyEnter'LogOnToMainMenu = SMWaitForScreen("Base", 5)

Page 8: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

VBA Language Extensions

To support the “Basic” Screen Mapping model, RFGen provides a number of VBA Language extensions.

Users Benefit from these extensions in the following ways…

• Optimized for Specific Tasks

• Coding and Operational Efficiency

• Fully Documented with Examples

• Guaranteed Backwards Compatibility

Page 9: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Connection Availability

Before attempting to send a series of commands to a Screen Mapping connection, it might be prudent to determine if the host is available.

RFGen provides the following command to test the state of the connection to a host system…

ConnAvailable This command returns ‘True’ if the host connection is available.

Example:

If Not ConnAvailable(“CICS”) Then vRsp = RFMsgBox(“Host is off-line, proceed with batch?”, vbYesNo) . .End If

Page 10: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Session Startup and Shutdown

RFGen Screen Mapping is designed to simplify the entire process of interacting with Legacy Host systems. Accordingly, RFGen allows users to specify initial startup and shutdown macros to login and logout of the host system properly.

While these macros are called automatically at session startup and shutdown, users can execute these macros whenever they require…

SMLogOn This command executes a macro that will log the session onto the specified main menu.

SMLogOff This command executes a macro that will log the user out so the session can be terminated properly.

Page 11: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Multiple Host Support

RFGen Screen Mapping allows users to connect to multiple host systems. At system startup, RFGen will select the first defined host system to be the default host. All Screen Mapping commands will then be directed to that host.

For multiple-host requirements, users can use the following command to redirect the Screen Mapping commands…

SMSetSession This command specifies which host system the following Screen Mapping commands will be executed against.

Example:

SMSetSession(“CICS”)SMCallMacro “UpdCompl”, True, sPart, sSerial, sShift, sOper, vQtySMSetSession(“AS400”)SMCallMacro “SFMove”, True, sPart, sOper, vQty

Page 12: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Transaction Bracketing is used with Pooled Screen Mapping Connections. It allows users to do the following…

Transaction Bracketing

1. Retrieve a specific connection to the host system.

2. Execute a series of commands against a specific session.

3. Return the connection to the pool when they’re finished.

Note: Transaction Bracketing is performed automatically when you use the RFGen Macro commands.

Page 13: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Transaction Bracketing

Example:

If SMBeginTrans(“InvReceipts”) Then SMSendText “100620” SMSendKey KeyEnter . . SMCommitTrans()End If

SMBeginTrans Retrieves a handle to a host session from the Server pool. Optionally, users can request a specific screen to improve application performance.

SMCommitTrans Returns a handle to the Server pool.

Transaction Bracketing consists of two commands…

Page 14: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

RFGen Host Screen Navigation is used to simplify the process of moving between different host applications.

RFGen Host Screen Navigation allows users to do the following…

Host Screen Navigation

1. Easily move from screen to screen in the host system.

2. Recover from failed navigation or system input errors.

3. Significantly reduce the complexity of Screen Mapping.

Page 15: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Host Screen Navigation consists of the following commands…

Host Screen Navigation

SMCurScreen Matches the current application screen on the host against the screens defined inside RFGen and returns the name of the screen.

SMIsScreen Determines if the current application screen on the host session is the requested screen.

SMGoToScreen Executes the required commands to move from the current host screen to the requested host screen.

Example:

If SMGoToScreen(“InvReceipts”) Then SMSendText “100620” SMSendKey KeyEnter . .End If

Page 16: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Host Screen Navigation

RFGen introduces the concept of a base screen or “main menu”. The base screen is used as a point-of-reference when moving between different host applications. The methodology is as follows…

1. A “main menu” is linked to a specific RFGen host session.

2. Application Screens are then linked to this “main menu”.

3. Screen requests that are linked to this “main menu” will be automatically routed to this session.

Page 17: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Host Screen Navigation

While the “main menu” or base screen is usually defined during system configuration, RFGen allows users to change the base screen for any session using the following command…

SMSetBase Specifies the “main menu” to use as the base screen for a specific host session. When this command is executed, RFGen will log out of the prior session (SMLogOut) and log into the new “main menu” (SMLogIn).

Example:

SMSetBase(“MenuInquiries”)..

Page 18: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Transaction Macros

RFGen uses a concept called Transaction Mapping to interact with Legacy Host systems. Transaction Mapping works as follows…

1. The user identifies all important data fields and screen regions.

2. The user enters a sample transaction which is recorded and converted into a series of VBA commands.

3. The user can then call the macro, passing it the variable data fields and have the transaction update on the host system.

4. Optionally, the user can “paint” a RFGen form and have it execute directly against the macro once all input fields have been accessed. Any returning data will then be displayed in the appropriate linked fields.

Note: Unlike “Screen Scraping” solutions, RFGen transactions can be used while the host is off-line. These transactions can also comprise multiple host systems or even access ODBC databases.

Page 19: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Transaction Macros

Transaction Macros are accessed via the following commands…

SMCallMacro This executes a transaction macro and reports its success or failure. Data can be both input to the host session and data coming back from the host session. Optionally, the transaction can be queued for later processing if the host is unavailable.

SMQueueMacro This command works exactly like SMCallMacro except that the transaction is immediately queued and returning data is discarded.

Example:

Dim bSuccess As Boolean‘bSuccess = SMCallMacro(“UpdCompl”, True, sPart, sSerial, sShift, sOper, vQty)

Page 20: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Getting Data from the Host

RFGen provides users with a number of command to retrieve data from the host screen. The commands are as follows…

SMGetCursor This command is used to determine where the cursor is currently located in the host session.

SMGetText This command is used to retrieve text from the host session.

SMFindText This function is used to “find” text on the host session.

Example:

If SMFindText(“Enter User Id:”, 1, -1) Then SMSendText “DataMAX” SMSendKey KeyEnterEnd If

SMGetText(1, 1, 10, sScreenName)

Page 21: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Sending Data to the Host

RFGen provides users with a number of command to retrieve data from the host screen. The commands are as follows…

SMSetCursor This command is used to set the cursor to a specific location in the host session.

SMSendText/Alt This command is used to send text to the host session. The “Alt” version allows you to specify the coordinates where the text will be written.

SMSendKey/Alt This command is used to send a keystroke to the host session. The “Alt” version allows you to specify the coordinates where the keystroke will be entered.

Example:

SMSendTextAlt “DataMAX”, 5, 10SMSendKey KeyEnter

Page 22: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Sending Data to the Host

When updating a host session, data collection errors can occur if the data is either too long for the field, or too short to overwrite the previous value. To eliminate this problem, RFGen provides users with the following command…

SMPadInput This command is used to assure that data being sent to a host session is the same length as the input field. This is accomplished by appending spaces to the end of the data and truncating it at the specified length.

Example:

Dim sUser As String

sUser = “DataMAX”SMPadInput sUser, 8SMSendTextAlt sUser, 5, 10SMSendKey KeyEnter

Page 23: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Timing Commands

With many hosts, it is important to use timing commands to assure that the host session has processed the last command prior to RFGen issuing the next one. The following commands are used to control the application flow…

SMWaitForCursor This command waits until the cursor has reached the desired location or a timeout period has elapsed.

SMWaitForText This command waits until the specified text has appeared or a timeout period has elapsed.

SMWaitForScreen This command waits until the specified screen is loaded or a timeout period has elapsed.

SMWaitForHost This command waits until the host session has sent a packet that unlocks the keyboard or a timeout period has elapsed.

Example:

If Not SMWaitForText(“Enter User Id:, 5, 1, -1) Then …

Page 24: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Timing Commands

While it is not recommended, RFGen also supports the following command to delay program execution…

SMSetDelay This command causes a specified time delay in program execution after each update command is sent to the host.

Example:

SMSetDelay 1000

Page 25: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Simplified Screen Mapping

Simplified Screen Mapping uses a “Systems” approach to interacting with the host system. It relies upon the concept of a “main menu”, “application screens” and “transactions”.

Using these concepts, the effort required to move from one host screen to another and process a transaction can be reduced to a single VBA command.

Page 26: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

The Main Menu

The “main menu” is designed to be a base screen from which all host navigation is derived from.

When the system first connects to the host, RFGen will process a login script to move the session to the targeted “main menu”.

All “main menus” contain three basic functions…

1. Session Login Script

2. Session Logout Script

3. Session Abort Script

Page 27: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Main Menu Steps Defined

To create a “main menu”, simply follow these 5 easy steps…

1. Logon to Main Menu – This records all the keystrokes necessary to log onto the main menu.

2. Identify the Main Menu – Select the areas of the screen that will uniquely identify this as the main menu.

3. Return from Navigation Error – This records the keystrokes necessary to recover from an unexpected scripting error.

4. Logoff from the Main Menu – This records the keystrokes necessary to log off from the system.

5. Test Macros – This allows users to quickly test their macros.

Page 28: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

The Application Screen

“Application Screens” are where the actual user input will normally take place. These screens are usually linked to macros to send and receive data from the host system.

All “Application Screens” contain two basic functions…

1. Link to Main Menu

2. Go to Application Screen Script

3. Return to Main Menu Script

Page 29: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Application Screen Steps Defined

To create an “Application Screen”, simply follow these 5 easy steps…

1. Go to the Application Screen – This records all the keystrokes necessary to move from the main menu to the application screen.

2. Identify the Application Screen – Select the areas of the screen that will uniquely identify this as the application screen (page 1).

3. Identify Multiple Screen Pages – Select the areas of the screen that will uniquely identify this as an additional page of the application screen.

4. Return to the Main Menu– This records the keystrokes necessary to move from the application screen back to the main menu.

5. Test Macros – This allows users to quickly test their macros.

Page 30: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

The Data Entry Transaction

“Transaction Macros” are where the actual data entry into the host system will take place.

All “Transaction Macros” contain the following elements…

1. Link to Application Screen

2. Screen Input Fields

3. Screen Output Fields

4. Transaction Script

Page 31: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Data Entry Transaction Steps Defined

To create an “Transaction Macro”, simply follow these 4 easy steps…

1. Go to the Linked Application Screen – This step tests the code required to navigate to the linked Application Screen.

2. Mark All Significant Data Fields – Select the input fields/areas of the screen that you are interested in sending data to/receiving data from.

3. Enter a Sample Transaction – This starts recording the keystrokes required to input this type of transaction. A fully editable VBA script will then be created based upon the input captured.

4. Test Transaction – This allows users to quickly test their transaction macros.

Page 32: RFGen Screen Mapping enables applications to interact with host applications running on Unix, AS400, IBM mainframe, DOS or any other legacy, character

Embedded Screen Mapping

Embedded Screen Mapping builds on the ‘Simplified’ approach to create the user interface for the wireless device. Using these methods, Screen Mapping applications can be created based entirely on “point-and-click” techniques.