Find Field Position (31)

Top  Previous  Next

The Find Field Position function returns the beginning position of a target field in the host-connected presentation space. This function can be used to find either protected or unprotected fields but only in a field-formatted host presentation space.

 

3270

5250

Yes

Yes

 

 

Prerequisite Calls

 

Connect Presentation Space (1)

 

 

Call Parameters

 

 

Standard Interface

Enhanced Interface

Function Number

Must be 31

 

Data String

See the following table

 

Length

NA

NA

PS Position

See note

 

 

Note:

PS Position: Identifies the field within the host presentation space at which to start the Find. It can be the PS position of any byte within the field in which you want the Find to start.

 

The calling 2-character data string can contain:

 

Code

Explanation

[RB][RB] or T [RB]

This field

P [RB]

The previous field, either protected or unprotected

N [RB]

The next field, either protected or unprotected

NP

The next protected field

NU

The next unprotected field

PP

The previous protected field

PU

The previous unprotected field

 

Note:

[RB] represents a required blank.

 

 

Return Parameters

 

This function returns a length and a return code.

 

Length

 

The following lengths are valid:

 

Length

Explanation

= 0

When return code = 28, field length is 0. When return code = 24, host presentation space is not field-formatted.

> 0

Relative position of the requested field from the origin of the host presentation space. This position is defined to be the first position after the attribute byte.

 

Return Code

 

The following codes are defined:

 

Return Code

Explanation

0

The Find Field Position function was successful.

1

Your program is not connected to a host session.

2

A parameter error was encountered.

7

The host presentation space position is not valid.

9

A system error was encountered.

24

No such field was found.

28

Field length of 0 bytes.

 

 

Remarks

 

Except when [RB][RB] or T [RB] is used as the calling data string, if the field found is the same as the field from which the Find started, a return code of 24 is returned.