Using HostFields |
Top Previous Next |
The mainframe screen arrives in a buffer with a block of data: the data-stream. This data-stream is made up of a succession of orders, attributes and data.
The screen buffer is made up of fields. Each field is delimited by an attribute and the next one.
TN BRIDGE read these fields and collect them into the HostFields collection. Fields in HostFields collection can be accessed by index or name. The name is built up with its screen coordinates as follows: R[row number]C[column number] For example, the field at row 4 column 30 in the screen is identified as R4C30.
VB.NET: Private Sub tn3270_OnScreenChange(eventSender As object, eventArgs As System.EventArgs) ' this code gets the Data in the Field located at Row 10 Column 2 Dim s As String = tn3270.HostFields["R10C2"].Data ... ' this code gets the Data in the Field 10 Dim s As String = tn3270.HostFields[10].Data End Sub
C#: private void tn3270_OnScreenChange(object eventSender, System.EventArgs eventArgs) { // this code gets the Data in the Field located at Row 10 Column 2 string s = tn3270.HostFields["R10C2"].Data; ... // this code gets the Data in the Field 10 string s = tn3270.HostFields[10].Data; ... }
|