HPlogo SNA IMF Programmer's Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 3 Intrinsics Used with Standard MPE I/O

FIELDATTR

» 

Technical documentation

» Feedback

 » Table of Contents

 » Glossary

 » Index

FIELDATTR returns information about the attributes of a specified field.

Syntax

                       I          I         I          I
FIELDATTR        (terminalid, fieldnum, fieldrow, fieldcolumn,
                         I           I            I        I
                 protectedattr, numericattr, displayattr, mdt,
                          I             I        I
                 currentfieldlen, maxfieldlen, result)

Parameters

terminalid (input)

Integer identifying the terminal. The terminalid is returned in a call to the OPEN3270 intrinsic.

fieldnum (input)

Integer specifying the number of the field whose attributes you are requesting. Put a zero in fieldnum if the screen is unformatted (there are no attribute characters).

fieldrow (output)

Integer indicating the row that is the location of the first data character in the field. Possible values are as follows:

0 through 11 (480-character screen)

0 through 23 (1920-character screen)

0 through 42 (3440-character screen)

fieldcolumn (output)

Integer indicating the column that is the location of the first data character in the field. Possible values are as follows:

0 through 39 (480-character screen)

0 through 79 (1920-character screen)

0 through 79 (3440-character screen)

protectedattr (output)

Integer indicating whether the field specified by fieldnum is protected or unprotected. The protectedattr parameter returns 0 if the screen is unformatted.

0 = Unprotected

1 = Protected

numericattr (output)

Integer indicating whether the field specified by fieldnum is alphanumeric or numeric. The numericattr parameter returns 0 if the screen is unformatted.

0 = Alphanumeric

1 = Numeric

displayattr (output)

Integer indicating how the field specified by fieldnum is displayed on the terminal screen. The displayattr parameter returns 0 if the screen is unformatted.

0 = Normal display, light pen not detectable

1 = Normal display, light pen detectable

2 = Intensified display

3 = No display and no print

HP terminals do not support light pens.

mdt (output)

Integer indicating whether the Modified Data Tag is set for the field specified by fieldnum. The mdt parameter returns 0 if the screen is unformatted.

0 = Modified data tag not set

1 = Modified data tag set

currentfieldlen (output)

Integer indicating the current length of the field in the internal buffer. Length includes all characters plus embedded and leading nulls; trailing nulls are not included.

maxfieldlen (output)

Integer indicating the maximum number of characters the field can contain. This is the number of character positions between the current field attribute character and the next field attribute character.

result (output)

The following values can be generated by the FIELDATTR intrinsic:

0 = Successful completion.

1 = Device not open.

9 = Host modified screen since the last receive request. (MPE V only)

11 = Non-existent field number specified.

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 FIELDATTR intrinsic returns information about a specified field of the internal screen image. Your program passes the terminal ID and the field number. The intrinsic returns the row and column address of the field in the buffer, the attributes of the field, the maximum number of characters in the field, the current number of characters in the field, and a result parameter indicating success or the reason for failure.

Use the FIELDATTR intrinsic in non-transparent mode.

COBOL Calling Sequence

CALL "CFIELDATTR" USING TERMINALID FIELDNUM FIELDROW FIELDCOLUMN PROTECTEDATTR NUMERICATTR DISPLAYATTR MDT CURRENTFIELDLEN MAXFIELDLEN RESULT. (on MPE V and in compatibility mode on MPE XL)

CALL INTRINSIC "FIELDATTR" USING TERMINALID FIELDNUM FIELDROW FIELDCOLUMN PROTECTEDATTR NUMERICATTR DISPLAYATTR MDT CURRENTFIELDLEN MAXFIELDLEN RESULT. (in native mode on MPE XL)

All parameters are numeric data items.

FORTRAN Calling Sequence

CALL FIELDATTR (TERMINALID, FIELDNUM, FIELDROW, FIELDCOLUMN, PROTECTEDATTR, NUMERICATTR, DISLAYATTR, MDT, CURRENTFIELDLEN, MAXFIELDLEN, RESULT)

All parameters are integer variables.

BASIC Calling Sequence

CALL BFIELDATTR (T, N, R0, C0, A1, A2, A3, A4, L5, L6, R) (on MPE V and in compatibility mode on MPE XL)

CALL FIELDATTR (T, N, R0, C0, A1, A2, A3, A4, L5, L6, R) (in native mode on MPE XL)

All parameters are integer variables.

SPL Calling Sequence

FIELDATTR (TERMINALID, FIELDNUM, FIELDROW, FIELDCOLUMN, PROTECTEDATTR, NUMERICATTR, DISPLAYATTR, MDT, CURRENTFIELDLEN, MAXFIELDLEN, RESULT)

All parameters are integer variables.

Pascal Calling Sequence

FIELDATTR (TERMINALID, FIELDNUM, FIELDROW, FIELDCOLUMN, PROTECTEDATTR, NUMERICATTR, DISPLAYATTR, MDT, CURRENTFIELDLEN, MAXFIELDLEN, RESULT);

All parameters are short integer variables.

C/XL Calling Sequence

FIELDATTR (&TERMINALID, &FIELDNUM, &FIELDROW, &FIELDCOLUMN, &PROTECTEDATTR, &NUMERICATTR, &DISPLAYATTR, &MDT, &CURRENTFIELDLEN, &MAXFIELDLEN, &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;...procedure FIELDATTR;  intrinsic;...{************************** Local Declarations **************************}var   fieldnum          : shortint;         { All FIELDATTR variables }   fieldrow          : shortint;         { except terminalid and result }   fieldcolumn       : shortint;         { are local. }   protectedattr     : shortint;   numericattr       : shortint;   displayattr       : shortint;   mdt               : shortint;   currentfieldlen   : shortint;   maxfieldlen       : shortint;...{************** Variable Initialization and Intrinsic Call **************}fieldnum := 2;
FIELDATTR (terminalid, fieldnum, fieldrow, fieldcolumn, protectedattr, numericattr, displayattr, mdt, currentfieldlen, maxfieldlen, result);
Feedback to webmaster