Re: Problem: concerning informix 4gl; input array command
Posted in 1991
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
<Sigh> Okay, the synopsis: you can move *down* rows using programming, but you cannot move *up*. If you want to move up, you must leave the input, start over, and move down to the desired line. If your screen is 5 rows long, and you r program array is 100 rows long, and you want to go to row 99, the user must wait while all the text scrolls up to position. Yes, this is stupid; it's also the only decent way to do it (more on this later). There is a.. er.. "feature" of Informix that if you send the user to a NOENTRY field, *and* it is the last field in a screen record, *then* it will bump the user to the next line of the record. The basic logic is: BEFORE ROW If we're not yet on the desired row: next field to the last (display only) field in the record) This can be combined with dynamic program record allocation to get around 99% of Informix's INPUT ARRAY problems (which are *many). The upshot of dynamic program record allocation is that you only use as many program records are you have screen records, and use FETCH and a lot of shuffle-array functions to emulate a bigger program array. In this way, you can also keep the size of your record arrays down (no more defining arrays to be the maximum size of your one-to-many relations and worrying about running out of room or wasting RAM) and still use the method of positioning cursors above to cruise around "input array" statements; since there is no scrolling, you can also emulate going up well, too. Lee Brintle Advantage Information Mgmnt