RE: INPUT ARRAY questions
Posted in 2001
Topics: High Availability & Replication, Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL
The simplest way is to disable the keys OPTIONS INSERT KEY f33 DELETE KEY f32 INPUT ARRAY ... END INPUT OPTIONS INSERT KEY f1 DELETE KEY f2 You could use something like INPUT data_rec[ arr ].* FROM screen_rec[ scr ].* ... END INPUT or DISPLAY data_rec[ arr ].* TO screen_rec[ scr ].* You have to keep track of the current screen and displayed rows, and you need to know how many rows are visible on screen. Which terminal emulator are you using? Copy the <f3>, and <f4> escape sequences to the <page up> and <page down> keys - this is ok for users (personally, I use CTRL_B and CTRL_F, but then I use vi) -----Original Message----- From: Scott O'Connell [mailto:scotto@sds.com] Sent: 02 February 2001 06:08 To: informix-list@iiug.org Subject: INPUT ARRAY questions Hi Folks, I'm using Informix-4GL 7.20 UD2 connecting to a SE database on SCO OS 5.0.5. I have two questions. When using an INPUT ARRAY, is there a way to keep a user from ADDING, or INSERTING (same thing maybe) new records? I want it to act more like a DISPLAY ARRAY, with the exception of being able to change fields within the rows that were selected and displayed with the INPUT ARRAY. Is there a way to map the Page-Up and Page-Down keys to scroll through the array? Thanks in advance.
Robert Stuart wrote: > > The simplest way is to disable the keys > > OPTIONS INSERT KEY f33 > DELETE KEY f32 > > INPUT ARRAY > ... > END INPUT > > OPTIONS INSERT KEY f1 > DELETE KEY f2 The snag with this is if the array has 20 rows, you only need to use 12 initially, and the user chooses to hit the return key in the last field of the 12th row, it still goes on to do an insert at the end of the array. 7.30 is the real answer, as other people pointed out. > You could use something like > > INPUT data_rec[ arr ].* FROM screen_rec[ scr ].* > ... > END INPUT > or > DISPLAY data_rec[ arr ].* TO screen_rec[ scr ].* > > You have to keep track of the current screen and displayed rows, and you > need to know how many rows are visible on screen. > > Which terminal emulator are you using? Copy the <f3>, and <f4> escape > sequences to the <page up> and <page down> keys - this is ok for users > (personally, I use CTRL_B and CTRL_F, but then I use vi) > > -----Original Message----- > From: Scott O'Connell [mailto:scotto@sds.com] > Sent: 02 February 2001 06:08 > To: informix-list@iiug.org > Subject: INPUT ARRAY questions > > Hi Folks, > > I'm using Informix-4GL 7.20 UD2 connecting to a SE database on SCO OS 5.0.5. > > I have two questions. > > When using an INPUT ARRAY, is there a way to keep a user from ADDING, or > INSERTING (same thing maybe) new records? I want it to act more like a > DISPLAY ARRAY, with the exception of being able to change fields within the > rows that were selected and displayed with the INPUT ARRAY. > > Is there a way to map the Page-Up and Page-Down keys to scroll through the > array? > > Thanks in advance. -- Yours, Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h> Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN "I don't suffer from insanity; I enjoy every minute of it!"