How to use 5250 Integrator
From Support
After the software is installed, you will start the 5250 Integrator from the "RJS 5250 Integrator" program group.
A toolbar button will appear on your screen. This button is clicked whenever you want to recognize text from the iSeries and call an appropriate VB scripting action.
You can right-click on the toolbar button to "Edit Settings" or "Launch Script Editor" Edit Settings The only setting that is relevent at this time is the SessionID. This must match your CA/400 session ID that shows in the CA/400 session caption: A, B, C, D, etc....
Only 1 session can be hooked by the Integrator currently.
Launch Script Editor This setting will launch the VB Script editor. All 5250 Integrator script code must be added or changed in the following file:
C:\Program Files\RJS5250\RJS5250Macro.bas
Note: Most standard VB script syntax is supported as well as instantiating OLE enabled applications or ADO/ODBC database calls. More info on VBScript syntax can be obtained via the Microsoft scripting web site: http://www.microsoft.com/scripting
The main routine that always gets called is: "Run5250Macro". This routine gets invoked each time you click the 5250 Integrator toolbar button.
Public Function Run5250Macro(arr5250Fields() As String,l5250CursorRow As Long,l5250CursorCol As Long,sWordAtCursorLoc As String) As Long
It gets passed the following info:
1. arr5250Fields - Each entire 5250 screen line gets passed in an array. Each array element contains one line from the 5250 screen. Your program can access info from any line and any position within each line by using the Mid$ VB script function.
If your screen resolution is set to 24x80, each line will be 80 characters long. If your screen resolution is set to 27x132, each line will be 132 characters long.
2. l5250CursorRow- Contains current row where cursor is positioned. This can be useful when you want to create cursor location sensitive operations.
3. l5250CursorCol- Contains current column where cursor is positioned. This can be useful when you want to create cursor location sensitive operations.
4. sWordAtCursorLoc- Contains the entire word that is highlighted by the cursor. This can be useful when you want your scripts to simply act on a highlighted word on the screen.
