Example: custlist.4gl (header)
The custlist.4gl header declares the schema to be used, the types and module variables.
The custlist.4gl module header:
1 SCHEMA custdemo
2
3 PRIVATE TYPE t_cust RECORD
4 cust_num LIKE customer.cust_num,
5 cust_name LIKE customer.cust_name,
6 city LIKE customer.city
7 END RECORD
8
9 PRIVATE DEFINE custarr DYNAMIC ARRAY OF t_custNote:
- Lines
1declares the database schema forLIKEinstructions. - Lines
3thru7define thet_custtype with the customer number, name and city fields, using the same data type than thecust_num,cust_nameandcitycolumns of thestocktable. - Line
9defines the dynamic array in the scope of the module, that holds the list of customers fetched from the database table.