Migrating screen arrays to tables
With IBM® Informix® 4GL, a list of records can be displayed
on the screen by using a static screen array in the
SCREEN
section
of the form specification file, with a finite number of lines:DATABASE stores
SCREEN
{
Id First name Last name
[f001 |f002 |f003 ]
[f001 |f002 |f003 ]
[f001 |f002 |f003 ]
[f001 |f002 |f003 ]
[f001 |f002 |f003 ]
[f001 |f002 |f003 ]
}
END
TABLES
customer
END
ATTRIBUTES
f001 = customer.customer_num ;
f002 = customer.fname ;
f003 = customer.lname ;
END
INSTRUCTIONS
SCREEN RECORD sr_cust[6]( customer.* );
END
The display of the form specification file in GUI mode:
With Genero Business Development Language, use a static screen
array for applications displayed in dumb terminals, and for
GUI applications you can for example use the TABLE
container:
DATABASE stores
LAYOUT
TABLE
{
Id First name Last name
[f001 |f002 |f003 ]
[f001 |f002 |f003 ]
[f001 |f002 |f003 ]
[f001 |f002 |f003 ]
[f001 |f002 |f003 ]
[f001 |f002 |f003 ]
}
END
END
TABLES
customer
END
ATTRIBUTES
f001 = customer.customer_num ;
f002 = customer.fname ;
f003 = customer.lname ;
END
INSTRUCTIONS
SCREEN RECORD sr_cust( customer.* );
END
The display of the form specification file is a real table widget, which is resizable. The .4gl source is untouched.