|
|
SNA IMF Programmer's Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 3 Intrinsics Used with Standard MPE
I/OREADSCREEN |
|
READSCREEN reads all or a specified part of the internal screen image.
The READSCREEN intrinsic returns any portion or all of the internal screen image. Portions of the returned screen that are non-display fields will be filled with nulls. READSCREEN is a position-oriented intrinsic; it reads a section of the screen beginning at a specified character position. READFIELD is a field-oriented intrinsic; it reads a specified field of the screen and selects the field by number rather than by offset into the internal screen image. The image returned by READSCREEN begins at a location determined from the value of the offset parameter and extends across all columns and down each row, terminating at the last position in the last row and column. Therefore, if the last field on the screen wraps around to the top of the screen, and you ask for less than a full internal screen image, READSCREEN will not return all of the last field. By calling SCREENATTR before calling READSCREEN, you can determine whether the screen is formatted, and if so, how many fields there are in the screen. If you call READSCREEN when the screen is formatted, field attributes will be interspersed with data in your inbuf string. Field attribute characters can be located by calling the ATTRLIST intrinsic. The ATTRLIST intrinsic will return all the attribute character locations within all or part of the internal screen image. If the values you choose for the ATTRLIST parameters offset and subscreensize are the same as those used in the READSCREEN parameters offset and maxinbuflen, you will access the same screen subsection. If the offsetlist array in your call to ATTRLIST is too small, the array will be filled, and the actual number of attribute characters within the specified screen subsection will be returned in actlistlen. Field attribute characters can also be located by calling the FIELDATTR intrinsic. FIELDATTR returns the location of a specified field and the information about that field, which is coded in its attribute character. If a field is non-display, the displayattr parameter of the FIELDATTR intrinsic will be 3. During LU.T3 printer emulation, you should routinely call RECV3270 after you have finished reading the current internal screen image. Calling RECV3270 will cause SNA IMF to inform the host that your "printer" is ready to receive more data. The host must wait for a printer to finish before sending more data; so, your program, using a device configured as a printer, can control host transmissions through the RECV3270 intrinsic. If your device is configured on the host as a printer, your internal screen image may contain printer orders embedded in the data. Examples of printer orders are CR (Carriage Return) and NL (New Line). IBM 3287 printer models differ, so consult the IBM Information Display System Data Stream Programmer's Reference Manual (IBM part number GA23-0059) for further information about printer orders.
Call the READSCREEN intrinsic in non-transparent mode. CALL "CREADSCREEN" USING TERMINALID OFFSET MAXINBUFLEN INBUF ACTINBUFLEN RESULT. (on MPE V and in compatibility mode on MPE XL) CALL INTRINSIC "READSCREEN" USING TERMINALID OFFSET MAXINBUFLEN INBUF ACTINBUFLEN RESULT. (in native mode on MPE XL) All parameters are numeric data items except INBUF, which is an alphanumeric data item. CALL READSCREEN (TERMINALID, OFFSET, MAXINBUFLEN, INBUF, ACTINBUFLEN, RESULT) All parameters are integer variables except INBUF, which is a character array. CALL BREADSCREEN (T, O1, L7, I$, L8, R) (on MPE V and in compatibility mode on MPE XL) CALL READSCREEN (T, O1, L7, I$, L8, R) (in native mode on MPE XL) All parameters are integer variables except I$, which is a string variable.
READSCREEN (TERMINALID, OFFSET, MAXINBUFLEN, INBUF, ACTINBUFLEN, RESULT) All parameters are integer data items except INBUF, which is a byte array. READSCREEN (TERMINALID, OFFSET, MAXINBUFLEN, INBUF, ACTINBUFLEN, RESULT); All parameters are short integers except for INBUF, which is a packed array of char. READSCREEN (&TERMINALID, &OFFSET, &MAXINBUFLEN, INBUF, &ACTINBUFLEN, &RESULT); All parameters are of type short, except INBUF, which is a character array (a pointer to a char). Following are excerpts from a Pascal program that calls SNA IMF intrinsics. For examples of complete Pascal programs in non-transparent and transparent modes, see Appendix F “Sample Programs”
|
|