Reinput with MARK option

Hi Everybody,

I have something to know here about the MARK option with REINPUT statement.
I have a table (on the map). I am trying to add a record at tbe bottom.
For validation purpose, I am checking if all the fileds are containing good data or not. If any field is left blank, I am throwing an error message with the reinput statement and trying to put the cursor on the blank field of the last line with following statement

REINPUT FULL MARK *FIELD(#I)
I is the row number where I am inputting the values.
But the dursor is not positioning on the field rather positions at the first field of the first row. But if I write

REINPUT FULL MARK *FIELD-NAME(5), it positions the cursor at 5th row and desired field.

Can someone please help me out with with the reason?

What is FIELD, as opposed to FIELD-NAME?

I presume you have a screen something like:

INPUT 5/5 #A (1) 5X #B (1) 5X #C (1) /
5T #A (2) 5X #B (2) 5X #C (2) /
5T #A (3) 5X #B (3) 5X #C (3) /
5T #A (4) 5X #B (4) 5X #C (4) /
5T #A (5) 5X #B (5) 5X #C (5) /
5T #X
*
IF #X = ‘X’
REINPUT FULL ‘ERROR’ MARK FIELD *#A (3)
END-IF

And, of course this works and puts the cursor at #A(3).

What is FIELD (3) (as an example).

How is FIELD defined in the LDA? Is it on the Map?

steve

Also;

IF #X = ‘X’
REINPUT FULL ‘ERROR’ MARK FIELD *#A (#num)
END-IF

works where #num has a value between 1 and 5

steve

Hi Steve,

I am sorry to respond you late. I was on a short break from work.

The FIELD is defined in a GDA with array size of 15.

My subscript to the reinput field with in the range of 1 thru 15.

e.g REINPUT FULL ‘ERROR’ MARK #FIELD(#I).

still the cursor sits on my first field.

I will post the screenshot for more clarity on my query.

Is the field, where you want to put the cursor, modifiable?
That means:
Has it a attribute definition like (AD=O) ?
Has it a control variable assigned, that makes the field protected?

In the following example the cursor will be placed correctly, if #I = 1 thru 3 and #I = 5, but not if #I = 4. In this case, the cursor will be placed in the first occurence of the table.

DEFINE DATA LOCAL
1 #A (A1/5)
1 #I (N1)
1 #CV ©
END-DEFINE
*
MOVE (AD=P) TO #CV
*
INPUT 5/5 #A (1) /
5T #A (2) /
5T #A (3) /
5T #A (4) (CV=#CV) / /* or (AD=O)
5T #A (5) ///
5T #I (AD=M SG=OFF) ‘mark #I with 0 to escape’
*
IF #I > 0
REINPUT FULL ‘ERROR’ MARK FIELD *#A (#I)
END-IF
END