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

ATTRLIST

» 

Technical documentation

» Feedback

 » Table of Contents

 » Glossary

 » Index

ATTRLIST returns the locations of attribute characters in the internal screen image.

Syntax

                     I         I           I          I
ATTRLIST       (terminalid, offset, subscreensize, maxlistlen,
                     I         IA          I          I
                 fieldnum, offsetlist, actlistlen, result)

Parameters

terminalid (input)

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

offset (input)

Integer specifying the offset, in characters, into the internal screen image. The first character position on the screen has an offset of zero. The search for attribute characters starts at the location you specify with offset. The offset parameter must be zero when the DBCS option to the OPEN3270 intrinsic is enabled.

subscreensize (input)

Integer specifying the size of screen, in characters, to be searched for attributes starting at offset. The subscreensize parameter must be a positive integer and is limited to the length of the screen.

maxlistlen (input)

Integer specifying the maximum number of attribute character locations to return in the array offsetlist. The maxlistlen parameter must be a positive integer.

fieldnum (output)

Integer identifying the number of the field associated with the first attribute character within the screen area specified by offset and subscreensize. The value of fieldnum is relative to the full internal screen image.

offsetlist (output)

Integer array containing the offset locations of the attribute characters within the screen area defined by offset and subscreensize. The array must be large enough to accept maxlistlen number of locations where each offset location occupies one word of the array. If the array is too small, it will be filled, and the actual number of attribute characters within the specified screen subsection will be returned in actlistlen.

actlistlen (output)

Integer indicating the actual number of attributes in the screen subsection defined by offset and subscreensize. If the actual number of attributes is less than or equal to maxlistlen, the count returned in actlistlen is equal to the number of attributes written to offsetlist. If the number of attributes is greater than maxlistlen, the count returned in actlistlen is greater than the number of elements in offsetlist. The parameter actlistlen tells you the number of attribute characters in a subsection.

result (output)

The following values can be generated by the ATTRLIST intrinsic:

0 = Successful completion

1 = Device not open.

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

21 = Field offset specified is out of range.

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.

42 = Specified MAXINBUFLEN parameter is too large.

53 = Invalid intrinsic called for data stream mode device.

100 = A bad (non-zero) offset was specified in the intrinsic call

Description

The ATTRLIST intrinsic returns an array containing the locations of the attribute characters within any subsection or all of the internal screen image. The ATTRLIST intrinsic is intended to complement the READSCREEN intrinsic. After receiving a subsection of the internal screen image from READSCREEN, you can call ATTRLIST to find out where attribute characters are located, and thus where fields are located, within the subsection.

The offset and subscreensize parameters define the screen subsection in the same manner for ATTRLIST as the parameters offset and maxinbuflen do for READSCREEN. The array offsetlist is filled with all of the locations of attribute characters within the subsection, up to maxlistlen. These locations are expressed as offsets into the full screen image (not the screen subsection).

The fieldnum parameter returns the number of the field associated with the first attribute character within the screen subsection.

The actlistlen parameter contains the actual number of attribute characters in the screen subsection. This number will reflect the number of elements in offsetlist only if the offsetlist array is large enough to hold all the locations. If you specified a maxlistlen value smaller than the actual number of attribute characters in the screen subsection, the actlistlen value will be larger than the number of elements in the offsetlist parameter.

If you have called the SCREENATTR intrinsic and determined the number of fields in an internal screen image (from the numfields parameter), you can locate the attribute characters within any area or within all of the internal screen image. You do not need to use the ATTRLIST intrinsic if you call the READFIELD intrinsic and work with field numbers instead of locations. However, you must use the ATTRLIST intrinsic if you have used the READSCREEN intrinsic, because you must be able to distinguish attribute characters from data characters.

Use the ATTRLIST intrinsic in non-transparent mode.

COBOL Calling Sequence

CALL "CATTRLIST" USING TERMINALID OFFSET SUBSCREENSIZE MAXLISTLEN FIELDNUM OFFSETLIST ACTLISTLEN RESULT. (on MPE V and in compatibility mode on MPE XL)

CALL INTRINSIC "ATTRLIST" USING TERMINALID OFFSET SUBSCREENSIZE MAXLISTLEN FIELDNUM OFFSETLIST ACTLISTLEN RESULT. (in native mode on MPE XL)

All parameters are numeric data items except OFFSETLIST, which is an integer table.

FORTRAN Calling Sequence

CALL ATTRLIST (TERMINALID, OFFSET, SUBSCREENSIZE, MAXLISTLEN, FIELDNUM, OFFSETLIST, ACTLISTLEN, RESULT)

All parameters are numeric data items except OFFSETLIST, which is an integer array.

BASIC Calling Sequence

CALL BATTRLIST (T, O1, L1, L2, N, O2(*), L3, R) (on MPE V and in compatibility mode on MPE XL)

CALL ATTRLIST (T, O1, L1, L2, N, O2(*), L3, R) (in native mode on MPE XL)

All parameters are integer variables except O2(*), which is an integer array.

SPL Calling Sequence

ATTRLIST (TERMINALID, OFFSET, SUBSCREENSIZE, MAXLISTLEN, FIELDNUM, OFFSETLIST, ACTLISTLEN, RESULT)

All parameters are integer variables except OFFSETLIST, which is an integer array.

Pascal Calling Sequence

ATTRLIST (TERMINALID, OFFSET, SUBSCREENSIZE, MAXLISTLEN, FIELDNUM, OFFSETLIST, ACTLISTLEN, RESULT);

All parameters are short integer variables except OFFSETLIST, which is an array of short integer variables.

C/XL Calling Sequence

ATTRLIST (&TERMINALID, &OFFSET, &SUBSCREENSIZE, &MAXLISTLEN, &FIELDNUM, OFFSETLIST, &ACTLISTLEN, &RESULT);

All parameters are of type short, except OFFSETLIST, which is an array of 2 short integer variables (a pointer to a 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 ATTRLIST;  intrinsic;...************************** Local Declarations **************************}var   offset        : shortint;        { All ATTRLIST variables except }   subscreensize : shortint;        { terminalid and result are local. }   maxlistlen    : shortint;   fieldnum      : shortint;   offsetlist    : packed array[1..128] of shortint;   actlistlen    : shortint;{************** Variable Initialization and Intrinsic Call **************}offset := 0;subscreensize := 1920;maxlistlen := 128;ATTRLIST (terminalid, offset, subscreensize, maxlistlen, fieldnum,          offsetlist, actlistlen, result);
Feedback to webmaster