Name of component | Sub-components |
---|---|
COM Components |
HostLink
Enumerators
|
FTP |
IND$FILE
FTP
APPC
|
XML | XMLDoc Class |
HostLink class for COM components |
---|
AttachEx (String)
CheckField (String,Int,Int,Int,Int)
Connect (String,String)
ConnectDirect (String,Int,String,String)
CreateXMLObj (String)
CreateFT3270Obj()
Detach()
Disconnect()
EnableDebugging (Int)
GetAccountInfo (String,Object, Object)
GetClientSessions (Ref Object,String, String)
GetCursorColumn()
GetCursorRow()
GetErrorMsg()
GetField (Int,Int,Int)
GetAttribute (Int, Int)
GetFieldEx (Int,Int,Int,Int)
GetFieldLength (Int,Int)
GetFieldStart()
GetHostInfo()
GetLanguageId()
GetObjectModeType()
GetRow()
GetScreen()
GetScreenHeight()
GetScreenWidth()
GetServerInfo (HFPLib.ENUM_SERVER_INFO_QUERY)
GetSessionID()
GetSessionStatus (String,String,Int)
GetVersion()
IsAlphaField()
IsConnected()
IsEditableField (Int,Int)
IsKbdLocked()
IsModeASCII()
IsModeRDE()
IsNonDisplayField (Int,Int)
IsNumericDistinction()
IsNumericField()
IsReverseField()
IsRightToLeft()
PushKey (Int)
PutField (Object,Int,Int)
PutFieldEx (Object,Int,Int,Int)
SetArabicMode (Int,Int)
SetCGIName (String)
SetClusterHTTP (String,String)
SetCursor (Int,Int)
SetDelay (Int)
SetHTTPPort (Int)
SetIPAddress (Object)
SetObjectModeType (HFPLib_ENUM_OBJECT_TYPE_String)
SetServerVersion (Int)
SetReference (Int,Int)
SetSSL (int)
SetTargetEmulation (HFPLib_ENUM_EMULATION)
UseHFEE (Int)
UseSessionLoadBalancing (Int)
|
| TRUE if the user is bound to the host session |
| FALSE if the operation is not successful |
| SetObjectModeType (CCO or SCO, server to connect). For HostFront 403, you must use CCO. |
| SetTargetEmulation (5250 or 3270); |
| SetServerVersion (403 or lower, to know if the object needs to read Intermediate Screen byte). |
| The nRow and nCol1 identify the row and column where the data starts. |
| The nCol2 is optional. By specifying nCol2 as greater than zero, the method checks the host screen string either from Col1 to Col2 or to the end of the field, whichever is shorter. |
| The sData is a string. The CheckField() method compares sData with a string that appears on the current host screen at position nCol1 to nCol2. |
| TRUE: if the operation is successful and the script can continue |
| FALSE: if the operation is not successful and the script terminates |
| If parameter sUserName is null, the target account becomes the default Host Application Integration Toolkit account (usually a "Guest" account). |
| To disconnect the allocated session, you should call Disconnect(). You must call Connect() before using any other method.
This method returns one of the following:
|
| If parameter sUserName is null, the target account becomes the default Host Application Integration Toolkit account (usually a "Guest" account). |
| To disconnect the allocated session, you should call Disconnect(). You must call ConnectDirect() before using any other method.
This method returns one of the following:
|
| TRUE if the operation is successful |
| FALSE if the operation is not successful |
| TRUE if the operation is successful |
| FALSE if the operation is not successful |
| TRUE if the operation is successful |
| FALSE if the operation is not successful |
Dim Connected(0 To 2) As Long Dim MaxSessions(0 To 2) As Long Dim bRet as Public System.Booleanean BRet=HostLink.GetAccountInfo ("guest, Connected, MaxSessions)
Bit # | Description |
---|---|
0 | Auto skip |
1 | Column separator |
2 | Mandatory fill |
3 | Zero fill |
4 | Blank fill |
5 | Mandatory enter |
6 | Field exit |
7 | Auto enter |
8 | Reverse video |
9 | Reserved |
10 | Upper case |
11 | Alphabetic only |
12 | Signed numeric |
13 | Numeric only |
14 | Digits only |
15 | Alpha numeric |
16 | Colour (blue component) |
17 | Color (green component) |
18 | Color (red component) |
19 | Blinking |
20 | Underlined |
21 | High intensity |
22 | Protected |
23 | Read only |
Remaining bits | Reserved |
| This nCol2 and nFlag are option. By specifying nCol2 as greater than zero, the GetField() method returns the information until it reaches the second column or the end of the field, whichever is shorter. The nCol2 element is zero by default, which returns the entire field string. |
| The nFlag can have the values HFP_ARABIC, HFP_REVERSE or both. The nFlag element is zero by default, which means that the data is not translated. |
| get the string at row 6 between columns 20 and 26 |
| translates the string from Latin to Arabic |
| stores the result in the UserName variable |
5250: "[DS5250][Local LU][Host Name][Device Name]" TN5250: "[TN5250][Host Name][Device Name]" 3270: "[DS3270 ][LU Name]" TN3270: "[TN3270 ][HostName][LU Name]"
Language | int | Language | int |
---|---|---|---|
NOT DEFINED | 0 | ITALIAN | 1 |
CANADIAN FRENCH | 2 | MULTINATIONAL | 3 |
ENGLISH UK | 4 | FRENCH AZERTY | 5 |
DANISH | 6 | FINNISH | 7 |
GERMAN | 8 | NORWEGIAN | 9 |
SPANISH | 10 | SPANISH SPEAK | 11 |
PORTUGUESE | 12 | SWEDISH | 13 |
ENGLISH US | 14 | ARABIC | 15 |
1. | User load as a percentage ( is calculated by multiplying the number of users connected by 100 and dividing the product by the total number of users defined) |
2. | Maximum number of concurrent sessions |
3. | Number of sessions currently used |
4. | Total number of users defined in the server profile |
5. | Number of users currently connected |
<FORM METHOD="POST" ACTION="/HFCGI/HFCGI.EXE/<%=Session("SessID")%>"> <INPUT NAME="Reload" TYPE="IMAGE" BORDER=0 SRC="/HFHTML/Reload.GIF"> </FORM>
| TRUE if the keyboard is locked |
| FALSE if the keyboard is not locked |
| 41. TRUE: if the data string is ANSI |
| 42. FALSE: if the data string is ASCII |
| 27. TRUE when the operation is set to RDE mode |
| 28. FALSE when the operation is set to RTE mode |
Text in Normal mode | Text in RTE mode |
---|---|
Welcome to Rio! | !oiR ot emocleW |
Text in Normal mode | Text in RDE mode |
---|---|
Welcome to Rio! | !oiR ot emocleW |
| TRUE if SSL is used with the HTTP connection |
| FALSE if not |
| TRUE if the operation is successful |
| FALSE if the operation is not successful |
Keys common between 3270 and 5250 | ||
ATTN | Attention | 0x8201 |
RESETKY | Reset | 0x820A |
CLRKEY | Clear screen | 0x8007 |
DUP | Duplicate | 0x8242 |
ENTER | Enter | 0x800A |
ERASEIN | Erase in | 0x8204 |
ERASEOF | Erase end of field | 0x8206 |
PF1PF24 | Program function 1 to 24 | 0x8020 0x8037 |
SYSREQ | System request | 0x8008 |
3270 only keys | ||
PA1PA3 | Program attention 1 to 3 | 0x8001 0x8003 |
5250 only keys | ||
TSTREQ | Test request | 0x8009 |
PGUP | Page up | 0x824F |
PHDN | Page down | 0x8250 |
FIELDEXIT | Field exit | 0x825C |
FIELDPLUS | Field plus | 0x825D |
FIELDMINUS | Field minus | 0x825E |
| TRUE if the operation is successful |
| FALSE if the operation is not successful |
| The nFlag can have the values HFP_ARABIC, HFP_REVERSE or both. The nFlag elements is zero by default, which means that the data is not translated. 31. The HFP_ARABIC flag forces a translation of the data from Arabic to Latin. 32. The HFP_REVERSE flag reverses the data |
| This method returns:
|
| When you use the PutFieldEX() method on a host screen, the PushKey(ENTER) method validates your entries and moves on to the next screen. |
| translates the Arabic string from Arabic to Latin |
| reverses it |
| inserts the results at tow 1, column 5 of the current screen. |
Text in Normal mode | Text in RTE mode |
---|---|
Welcome to Rio! | !oiR ot emocleW |
Text in Normal mode | Text in RDE mode |
---|---|
Welcome to Rio! | !oiR ot emocleW |
| TRUE if the operation is successful |
| FALSE if the operation is not successful |
| TRUE if the operation is successful |
| FALSE if the operation is not successful |
| TRUE if the operation is successful |
| FALSE if the operation is not successful |
| 47. TRUE if the operation is successful |
| 48. FALSE if the operation is not successful |
| TRUE if the operation is successful |
| FALSE if the operation is not successful. The operation will fail if you are already connected to the server. |
| TRUE if the operation is successful |
| FALSE if the operation is not successful |
| eEmulUnknown = -1 |
| eEmul5250= 0 |
| eEmul3270= 1 |
| TRUE if the specified emulation is valid |
| FALSE if the operation is not successful |
| TRUE to use HFEE (default value) |
| FALSE otherwise |
| TRUE if the operation is successful |
| FALSE if the operation is not successful |
Associated methods | Associated property |
---|---|
AddAttribute (String,String,Int,Int,Int,Int)
BeginNode (String)
EndNode()
GetXMLError()
LoadXMLFile (String)
LoadXMLString (String)
SaveXMLFile (Object)
SaveXMLString()
XMLDocClass()
XMLGetField (String,Int,Int,Int,Int)
|
ScreenTemplate |
<Purchase Order> <Number>12345</Number> </Purchase Order>
<TagName row="2" col1="5">helloTagName row="2" col1="5">hello</TagName>
<HostLink command="PushKey" key="32778"/> Sends an ENTER command to the host <HostLink command="PutField" data="fieldvalue" row="1" col="2" flags="0"/>
<?xml version="1.0"?> <!-- The PO information is found on the first screen.--> <!-- Notice that we send a HostLink PushKey command --> <!-- to obtain the company info from the second screen. --> <PO> <Number row="19" col1="30" col2="39"/> <AddAttribute name="Att1" value="Number Att 1"/> <AddAttribute name="Att2" row="19" col1="23" col2="28"/> <Date> <AddAttribute name="Att3" row="19" col1="23" col2="28"/> <Year row="19" col1="23" col2="28"/> <AddAttribute name="Att4"/> </Date> <Items> <Item> <Description row="19" col1="23" col2="28"/> </Item> <Item> <Description row="20" col1="23" col2="28"/> </Item> </Items> <Region row="20" col1="23" col2="28"/> <HostLink command="PushKey" key="32778"/> <Company> <Name row="2" col1="1" col2="3"/> </Company> </PO>
Option Explicit Private oHFP As HFPLib.HostLink Private oXML As HFPLib.XMLDoc Private lngStatus As Long Private Sub Form_Load() Set oHFP = New HFPLib.HostLink End Sub Private Sub Form_Unload(Cancel As Integer) oHFP.Disconnect Set oHFP = Nothing End Sub Private Sub Connect_Click() Screen.MousePointer = vbHourglass lngStatus = oHFP.Connect("mcgillvm1") If lngStatus = 0 Then MsgBox "Unable to connect" Else MsgBox "Connect succeeded" End If Screen.MousePointer = vbNormal End Sub Private Sub Read_Click() Set oXML = oHFP.CreateXMLObj("Input") If chkString.Value = vbChecked Then Dim strTemp As String strTemp = "<?xml version=""1.0""?><PO><Number row=""2"" col1=""2"" col2=""39"">11111</Number><Date><Year row=""3"" col1=""2"" col2=""28"">2001</Year></Date><Items><Item><Description row=""4"" col1=""2"" col2=""14"">Hammer</Description></Item><Item><Description row=""5"" col1=""2"" col2=""49"">Wrench</Description></Item></Items> <Region row=""6"" col1=""2"" col2=""56"">Montreal</Region></PO>" lngStatus = oXML.LoadXMLString(strTemp) Else lngStatus = oXML.LoadXMLFile(".\input.xml") End If If lngStatus = 0 Then MsgBox "Error" Else MsgBox "Succeeded" End If Set oXML = Nothing End Sub Private Sub Save_Click() If chkTemplate.Value = vbChecked Then Set oXML = oHFP.CreateXMLObj("PO") oXML.ScreenTemplate = ".\template.xml" If chkString.Value = vbChecked Then MsgBox oXML.SaveXMLString Else lngStatus = oXML.SaveXMLFile(".\output_from_template.xml") End If Else Set oXML = oHFP.CreateXMLObj("PO") With oXML .XMLGetField "Number", 19, 30, 39 .addAttribute "Att1", "Number at Att 1" .addAttribute "Att2", , 19, 23, 28 .BeginNode "Date" .addAttribute "Att3", , 19, 23, 28 .XMLGetField "Year", 19, 23, 28 .addAttribute "Att4" .EndNode .BeginNode "Items" .BeginNode "Item" .XMLGetField "Description", 19, 23, 28 .EndNode .BeginNode "Item" .XMLGetField "Description", 20, 23, 28 .EndNode .EndNode .XMLGetField "Region", 20, 23, 28 oHFP.PushKey 32778 .BeginNode "Company" .XMLGetField "Name", 2, 1, 3 .EndNode End With If chkString.Value = vbChecked Then MsgBox oXML.SaveXMLString Else lngStatus = oXML.SaveXMLFile(".\output.xml") End If End If If chkString.Value = vbUnchecked Then If lngStatus = 0 Then MsgBox "Unable to create doc" Else MsgBox "Doc created successfully" End If End If Set oXML = Nothing End Sub Here are the input and output XML files needed (or created) with the application template.xml <?xml version="1.0"?> <!-- The PO information is found on the first screen. --> <!-- Notice that we send a HostLink PushKey command --> <!-- to obtain the company info from the second screen. --> <PO> <Number row="19" col1="30" col2="39"/> <AddAttribute name="Att1" value="Number Att 1"/> <AddAttribute name="Att2" row="19" col1="23" col2="28"/> <Date> <AddAttribute name="Att3" row="19" col1="23" col2="28"/> <AddAttribute name="Att4"/> </Date> <Items> <Item> <Description row="19" col1="23" col2="28"/> </Item> <Item> <Description row="20" col1="23" col2="28"/> </Item> </Items> <Region row="20" col1="23" col2="28"/> <HostLink command="PushKey" key="32778"/> <Company> <Name row="2" col1="1" col2="3"/> </Company> </PO> output_from_template.xml <?xml version="1.0" ?> <PO> <Number Att1="Number Att 1" Att2="tools">11111</Number> <Date Att3="tools"> <Year Att4="">>2001</Year> </Date> <Items> <Item> <Description>Hammer</Description> </Item> <Item> <Description>Wrench</Description> </Item> </Items> <Region>Montreal</Region> <Company> <Name>SEAGULL</Name> </Company> </PO> output.xml <?xml version="1.0" ?> <PO> <Number Att1="Number Att 1" Att2="tools">11111</Number> <Date Att3="tools"> <Year Att4="">2001</Year> </Date> <Items> </Item> <Description>Hammer</Description> </Item> <Item> <Description>Wrench</Description> </Item> </Items> <Region>Montreal</Region> <Company> <Name>SEAGULL</Name> </Company> </PO> input.xml <?xml version="1.0"?> <PO> <Number row="2" col1="2" col2="39">11111</Number> <Date> <Year row="3" col1="2" col2="28">2001</Year> </Date> <Items> <Item> <Description row="4" col1="2" col2="14">Hammer</Description> </Item> <Item> <Description row="5" col1="2" col2="49">Wrench</Description> </Item> </Items> <Region row="6" col1="2" col2="56">Montreal</Region> </PO>
Methods associated with multilanguages |
---|
CheckFieldEx
GetFieldEx
IsFlippedMode
IsModeASCII
IsModeRDE
IsNumericDistinction
IsRightToLeft
PutFieldEx
SetArabicMode
SetModeASCII
|
| The CheckFieldEx() method will compare sData with a specific string on the host screen. |
| The nRow and nCol1 identify the row and the column where the data starts. |
| The nCol2 and nFlag are optional. |
| The nFlag can have the values HFP_ARABIC, HFP_REVERSE or both. The nFlag element is zero by default, which means that the data is not translated. |
| The HFP_ARABIC flag forces a translation of sData from Latin to Arabic. |
| The HFP_REVERSE flag reverses the returned data. |
| TRUE if the operation is successful and the script can continue |
| FALSE if the operation is not successful and the script terminates |
| gets the field data at row 1 between column 35 and 38 |
| translates the string from Latin to Arabic |
| reverses the string |
| compares the result with the ArabicReversedString |
| The nCol2 and nFlag are optional. By specifying nCol2 as greater than zero, the GetField() method returns the information until it reaches the second column or the end of the field, whichever is shorter. |
| The nCol2 element is zero by default, which returns the entire field string. |
| The nFlag can have the values HFP_ARABIC, HFP_REVERSE or both. The nFlag element is zero by default, which means that the data is not translated. |
| The HFP_ARABIC flag forces a translation of the returned data from Latin to Arabic. |
| The HFP_REVERSE flag reverses the returned data. |
| gets the string at row 6 between columns 20 and 26 |
| translates the string from Latin to Arabic |
| reverses the string |
| stores the result in the UserName variable |
| TRUE if the data string is ANSI |
| FALSE if the data string is ASCII |
| TRUE when the operation is set to RDE mode |
| FALSE when the operation is set to RTE mode |
| The nFlag can have the values HFP_ARABIC, HFP_REVERSE or both. The nFlag element is zero by default, which means that the data is not translated. |
| The HFP_ARABIC flag forces a translation of the data from Arabic to Latin. |
| The HFP_REVERSE flag reverses the data. |
| TRUE if the operation is successful |
| FALSE if the operation is not successful |
| When you use PutFieldEx() methods on a host screen, the PushKey(ENTER) method validates your entries and moves on to the next screen. |
| translates the Arabic string from Arabic to Latin |
| reverses it |
| inserts the result at row 1, column 5 of the current screen. |
| TRUE if the operation was successful |
| FALSE if the operation was a failure |