Setting Current Row from within INPUT ARRAY.
Posted in 1992
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
I did it, I wrote a function to allow me to set the current row from within an Input Array statement. This is very useful... I now have a key that I use to skip to the end of the array, or to skip to the top of the array. Without seeing the whole array scroll in front of me (which takes a while). It now jumps! INFORMIX: Why don't you have this kind of thing build in??? This is the comments from my source file. /* Written By William Suetholz for Centurion Computer Systems, Inc. (1992) Copyright Centurion Computer Systems, Inc. and William Suetholz. This function is to allow me to set the current screen and program array element number from with in the input array call. This program could be dangerous since I modify some fields that are NOT documented in any way. To prove this, the person I spoke with @ informix said this is something that a lot of people have wished for, but he couldn't help me with my questions. About how to make sure that the Informix screen engine doesn't get confused by what I'm doing. For the most part (As far as I've tested) this function works as expected. Any changed data in the current field gets lost, and it seems to do the after field stuff. NOTES: INFORMIX CASE # ?????? -- NO HELP THERE. CASES: WORRIES: 1) Make sure that the after row stuff is being done to the proper row... after all I'm modifying an informix variable that tells the state machine what row it's on, this could confuse things.. it does do the correct things as far as displaying the old field in normal video. 2) Make sure that the function is called from within an input array, and not a display array. */ Other INFORMIX 4GL limitations that I'd like to see fixed are: o Ability to have after field, et all clauses within Construct, and Display statements... (Mainly to be able to display the current field properly) o Ability to have an ON KEY UP, Easy way to get the editted data from within an ON KEY clause. You change some data, then hit a trapped key, and your changes are gone. o I would like to be able to define the cursor display attributes for entering data, ie current field will be reverse, blue - but when you leave that field it goes back to it's original attribute. This would eliminate the need for a lot of before and after field clauses for me. With regards to the c_setarr function, I don't think that I can give it away. But at least you now know that something like this can be done. Bill Suetholz