Re: Moving cursor during input statements in 4GL
Posted in 1993
From Knut Espen Vonheim: * * During INPUT ARRAY statements, I would like to move the cursor to the beginning * of both the screen array and the program array when the user moves the cursor * to the first row beyond the last filled row of the program array. * * I have a program array that has x number of rows in the first column filled * with data, and the user will fill the remaining columns. * * COL1 COL2 COL3 COL4 ROW# * x y y y 1 * x y y y 2 * x y y y 3 * x y y y 4 * x y y y 5 * z z z z 6 * z z z z 7 * z z z z 8 * * The x's are select form a table and inserted into col1 of the program array, * while the user will fill in the y's during the input array statement. The z's * are not supposed to be touched by the user. * * The input statement could look something like this: * * ----- * * INPUT ARRAY program_array * FROM screen_array.* * WITHOUT DEFAULTS * AFTER FIELD col4 * NEXT FIELD col2 * BEFORE ROW * IF (#_of_x's + 1) = arr_curr() THEN * {move cursor to screen line 1, program_array[1]} * END IF * END INPUT * * ----- * * Does anybody know how to do this? Can it be done in 4GL? * Any help, hints, or pointers are highly appreciated!! Try this: DEFINE exit_loop SMALLINT LET exit_loop = TRUE WHILE exit_loop LET exit_loop = TRUE INPUT ARRAY program_array FROM screen_array.* WITHOUT DEFAULTS AFTER FIELD col4 NEXT FIELD col2 BEFORE ROW IF (#_of_x's + 1) = arr_curr() THEN LET exit_loop = FALSE EXIT INPUT END IF END INPUT END WHILE Robert Minter |Data Systems Support| \\\\\\_/// Programmer, Software Development | Orange, CA | ( _ _ ) internet: rob@dssmktg.com | Tel: 714.771.0454 | (| ^ |) bangpath: uunet.uu.net!dssmktg!rob| Fax: 714.771.3028 | \\`-'/ I used to not know, now I know I don't know. \\_/