Unix Technical Forum

4GL arr_count problem

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 ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 08:49 AM
Michael Hoffman
 
Posts: n/a
Default 4GL arr_count problem

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
-----------------------------------------------------------------

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 08:50 AM
Michael Hoffman
 
Posts: n/a
Default Re: 4GL arr_count problem

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
: -----------------------------------------------------------------

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:14 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com