This is a discussion on 4GL arr_count problem within the Informix forums, part of the Database Server Software category; --> Hi all, Been awhile since I've been here... hope y'all are still as helpful as always! Running I4GL 7.31.UC1 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi all, Been awhile since I've been here... hope y'all are still as helpful as always! Running I4GL 7.31.UC1 on Informix 9.31C1 on AIX 5.1 Overview: I am using INPUT ARRAY to update rows in a program array (max 180 rows, 3 fields) using a screen form with 10 rows (2 fields enterable). The actual rows loaded into the program array is 13. Problem: In INPUT ARRAY, arr_count does not equal set_count. Displaying the values in BEFORE ROW shows set_count variable = 13, arr_count = 10. This means ** no scrolling features ** are useable and the array never proceeds past the first 10 rows :-( (If I change the INPUT ARRAY to a DISPLAY ARRAY, all scrolling works fine...) Thanks for any and all assistance!!! Michael Hoffman Here is a brief code snippet: ----------------------------------------------------------------- LET idx1 = 1 FOREACH [select cursor] INTO rec_array[idx1].fld1 [do lookup for rec_array[idx1].fld2 (The fld3 is always blank for update) ] LET idx1 = idx1 + 1 IF idx1 > array_max #array_max is max rows for program array ERROR "too many records" RETURN END IF END FOREACH LET idx1 = idx1 -1 CALL set_count(idx1) INPUT ARRAY rec_array WITHOUT DEFAULTS FROM scr_array.* ATTRIBUTE (INSERT ROW = FALSE, DELETE ROW = FALSE ) BEFORE ROW LET arr_row=arr_curr() LET scr_row=scr_line() LET total_ln=arr_count() display "idx1=",idx1,";" at 9,50 ### displays 13 display "total_ln=", total_ln,";" at 10,50 ### displays 10 ----------------------------------------------------------------- |
| ||||
| Further clarification of problem: Well, it seems to be directly related to the ARR_COUNT function! I changed the screen to 8 rows, and the Input Array stament scrolls through 10 of the 13 rows, then says "no more rows". Calling SET_COUNT(13) and ARR_COUNT and displaying the values shows 13 & 10, respectively. Has anyone else ever experienced Input Array resetting ARR_COUNT to an arbitrary number (in this case, 10)? Thanks, Mike Hoffman In <d04p0h$48v$1@reader2.panix.com> article, Michael Hoffman mentioned that: : Hi all, : Been awhile since I've been here... hope y'all are still as helpful as : always! : Running I4GL 7.31.UC1 on Informix 9.31C1 on AIX 5.1 : Overview: I am using INPUT ARRAY to update rows in a program array (max 180 : rows, 3 fields) using a screen form with 10 rows (2 fields enterable). The : actual rows loaded into the program array is 13. : Problem: In INPUT ARRAY, arr_count does not equal set_count. Displaying : the values in BEFORE ROW shows set_count variable = 13, arr_count = 10. : This means ** no scrolling features ** are useable and the array never : proceeds past the first 10 rows :-( : (If I change the INPUT ARRAY to a DISPLAY ARRAY, all scrolling works fine..) : Thanks for any and all assistance!!! : Michael Hoffman : Here is a brief code snippet: : ----------------------------------------------------------------- : LET idx1 = 1 : FOREACH [select cursor] INTO rec_array[idx1].fld1 : [do lookup for rec_array[idx1].fld2 (fld3 is always blank for update) ] : LET idx1 = idx1 + 1 : IF idx1 > array_max #array_max is max rows for program array : ERROR "too many records" : RETURN : END IF : END FOREACH : LET idx1 = idx1 -1 : CALL set_count(idx1) : INPUT ARRAY rec_array WITHOUT DEFAULTS : FROM scr_array.* : ATTRIBUTE (INSERT ROW = FALSE, DELETE ROW = FALSE ) : BEFORE ROW : LET arr_row=arr_curr() : LET scr_row=scr_line() : LET total_ln=arr_count() : display "idx1=",idx1,";" at 9,50 ### displays 13 : display "total_ln=", total_ln,";" at 10,50 ### displays 10 : ----------------------------------------------------------------- |