SCREENATTR [ SNA IMF Programmer's Reference Manual ] MPE/iX 5.0 Documentation
SNA IMF Programmer's Reference Manual
SCREENATTR
SCREENATTR returns information about the attributes of the internal
screen image.
Syntax
_______________________________________________________________________
| |
| I I I I |
| SCREENATTR (terminalid, printformat, startprint, soundalarm, |
| |
| I I I I |
| keyboardlock, numfields, screenstatus, cursorrow,|
| |
| I I |
| cursorcolumn, result) |
_______________________________________________________________________
Parameters
terminalid (input)
Integer identifying the terminal. The terminalid is returned in a call
to the OPEN3270 intrinsic.
printformat (output)
Integer specifying the line length for the printer. Possible values are
as follows:
0 = the new line (NL), end of message (EM), and carriage
return (CR) printer orders in the data fields
determine line length. The default is a 132-character
print line if you do not specify any printer format.
1 = specifies a 40-character print line.
2 = specifies a 64-character print line.
3 = specifies an 80-character
print line.
startprint (output)
Integer indicating whether the printer is to print the contents of its
buffer. This parameter is ignored if the host orders printing to start
on a device that is not declared as a printer.
1 = The device is to print the contents of its buffer.
0 = The host program has not ordered the device to start printing.
soundalarm (output)
Integer indicating whether the device is to send an audible beep after it
receives data.
1 = The device will send an audible beep.
0 = The host has not requested that the device send a beep.
keyboardlock (output)
Integer indicating whether input is disabled.
1 = Input is disabled (keyboard is locked). You cannot call
TRAN3270 or any intrinsics that write to the
internal screen image, unless the RESET3270
intrinsic has been called since the last receipt of
data from the host.
0 = Input is not disabled (keyboard is unlocked).
numfields (output)
Integer indicating the number of protected and unprotected fields in the
internal screen image. If numfields = 0, the internal screen image is
unformatted, and you should specify field number 0 in your calls to the
READFIELD and WRITEFIELD intrinsics.
screenstatus (output)
Integer indicating whether the internal screen image has changed since
the last call to SCREENATTR.
0 = No change to either data or attribute characters. 1 = Data,
attribute characters, or both have been changed.
The screenstatus parameter keeps you informed about changes in the
internal screen image from one RECV3270 call to the next. You should
call SCREENATTR and check the screenstatus parameter immediately after
calling RECV3270. If screenstatus = 1, the internal screen image has
been changed.
If the host sends a write command and a Write Control Character (WCC)
without any data (for example, if the host transmission is just to enable
the keyboard), the internal screen image will be unchanged, and
screenstatus will return 1.
The only time the host can change the screen without sending data is when
the WCC instructs the control unit to reset the Modified Data Tags
(MDTs).Resetting the MDTs changes the field attributes, which in turn
changes the screen. In this case, screenstatus will return 1.
The screenstatus parameter is initialized to 0 with each call to
SCREENATTR.
If any SNA IMF/V intrinsic call fails with result = 9, this means that
the host has sent a new screen image since the last RECV3270 request.
The screenstatus parameter will be set to zero, which is meaningless in
this case. You must call RECV3270 to make the new internal screen image
accessible to SNA IMF intrinsics. Then call SCREENATTR and check the
screenstatus parameter for changes to the internal screen image.
cursorrow (output)
Integer indicating the row where the cursor is located:
0 through 11 (480-character screen)
0 through 23 (1920-character screen)
0 through 42 (3440-character screen)
cursorcolumn (output)
Integer indicating the column where the cursor is located:
0 through 39 (480-character screen)
0 through 79 (1920-character screen)
0 through 79 (3440-character screen)
result (output)
The following values can be generated by the SCREENATTR intrinsic:
0 = Successful completion.
1 = Device not open.
9 = Host modified screen since last receive
request. (MPE V only)
22 = BASIC calling sequence error has occurred.
25 = Intrinsic call made while in split stack
mode.
26 = Intrinsic call made with the parameter value
out of bounds.
29 = Called intrinsic with a request already
outstanding. (No-wait I/O only)
30 = Internal error occurred in IMF intrinsic.
53 = Invalid intrinsic called for data stream mode
device.
Description
The SCREENATTR intrinsic returns information about the current contents
of the internal screen image. SCREENATTR returns the following
information:
* The last Write Control Character (WCC)received from the host.
Each write command includes a WCC byte, which specifies 4 things:
1. The number of lines per printed page (the printformat
parameter).
2. Whether the host has requested that a device start printing
the contents of its buffer. (the startprint parameter).
3. Whether the device is to send a beep after it receives
data. (the soundalarm parameter).
4. Whether input is to be enabled after the device receives
data. (the keyboardlock parameter).
* The number of fields defined in the internal screen image (the
numfields parameter). This parameter returns 0 for an unformatted
screen.
* The screenstatus parameter, which indicates host changes to the
internal screen image.
* The current screen address of the cursor, which is returned in the
cursorrow and cursorcolumn parameters.
You should call the SCREENATTR intrinsic after every call to the RECV3270
intrinsic. Call the SCREENATTR intrinsic in non-transparent mode.
COBOL Calling Sequence
CALL "CSCREENATTR" USING TERMINALID PRINTFORMAT STARTPRINT SOUNDALARM
KEYBOARDLOCK NUMFIELDS SCREENSTATUS CURSORROW CURSORCOLUMN RESULT. (on
MPE V and in compatibility mode on MPE XL)
CALL INTRINSIC "SCREENATTR" USING TERMINALID PRINTFORMAT STARTPRINT
SOUNDALARM KEYBOARDLOCK NUMFIELDS SCREENSTATUS CURSORROW CURSORCOLUMN
RESULT. (in native mode on MPE XL)
All parameters are numeric data items.
FORTRAN Calling Sequence
CALL SCREENATTR (TERMINALID, PRINTFORMAT, STARTPRINT, SOUNDALARM,
KEYBOARDLOCK, NUMFIELDS, SCREENSTATUS, CURSORROW, CURSORCOLUMN, RESULT)
All parameters are integer variables.
BASIC Calling Sequence
CALL BSCREENATTR (T, P, P1, A, K, N9, S9, R9, C9, R) (on MPE V and in
compatibility mode on MPE XL)
CALL SCREENATTR (T, P, P1, A, K, N9, S9, R9, C9, R) (in native mode on
MPE XL)
All parameters are integer variables.
SPL Calling Sequence
SCREENATTR (TERMINALID, PRINTFORMAT, STARTPRINT, SOUNDALARM,
KEYBOARDLOCK, NUMFIELDS, SCREENSTATUS, CURSORROW, CURSORCOLUMN, RESULT)
All parameters are integer variables.
Pascal Calling Sequence
SCREENATTR (TERMINALID, PRINTFORMAT, STARTPRINT, SOUNDALARM,
KEYBOARDLOCK, NUMFIELDS, SCREENSTATUS, CURSORROW, CURSORCOLUMN, RESULT);
All parameters are short integer variables.
C/XL Calling Sequence
SCREENATTR (&TERMINALID, &PRINTFORMAT, &STARTPRINT, &SOUNDALARM,
&KEYBOARDLOCK, &NUMFIELDS, &SCREENSTATUS, &CURSORROW, &CURSORCOLUMN,
&RESULT);
All parameters are of type short.
Pascal Program Excerpts
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."
{************************** Global Declarations **************************}
type
shortint = -32768..32767; { global type, two bytes (half word) }
.
.
.
var
terminalid : shortint; { value returned by OPEN3270 intrinsic }
result : shortint;
cursorrow : shortint;
cursorcolumn : shortint;
.
.
.
procedure SCREENATTR; intrinsic;
.
.
.
{************************** Local Declarations **************************}
var
printformat : shortint; { All SCREENATTR variables }
startprint : shortint; { except terminalid, result, }
soundalarm : shortint; { cursorrow, and cursorcolumn }
keyboardlock : shortint; { are local. }
numfields : shortint;
screenstatus : shortint;
.
.
.
{************************** Intrinsic Call **************************}
SCREENATTR (terminalid, printformat, startprint, soundalarm,
keyboardlock, numfields, screenstatus, cursorrow,
cursorcolumn, result);
MPE/iX 5.0 Documentation