Informix-4GL is a comprehensive fourth-generation application development and generation environment, it has powerful database management functions, flexible and convenient programming, user-friendly interface, has been widely used in UNIX operating system database management. The following describes a small program that completes query using a screen table. It can enter fuzzy query conditions by entering the corresponding fields on the screen, such as *, = ,? And then click Ctrl-F or Ctrl-B to browse and call a cursor management function que_gz ), use the up/down cursor key and the Esc key to select the desired record, and then use the internal function arr_curr () to transfer the information contained in the record, in actual work, you can write this program as a function, which is concise and clear. You only need to rewrite the corresponding variable when necessary, saving time and effort. This program is compiled on sco unix Open Sever5.05 and online7.3.
Program list:
Screen format:
Database Name
Screen
{
Personnel code [a]
Personnel name [B]
==========================================
Staff code staff name staff
[F000] [f001] [f002]
[F000] [f001] [f002]
[F000] [f001] [f002]
[F000] [f001] [f002]
[F000] [f001] [f002]
[F000] [f001] [f002]
[F000] [f001] [f002]
}
End
Tables
Gz
Attributes
A = gz. xh, autonext;
B = gz. xm, autonext;
F000 = formonly. xh type char;
F001 = formonly. xm type char;
F002487formonly.gz type decimal (6, 2 );
End
Instructions
Screen record s_gz3167((formonly.xh, formonly.xm,formonly.gz)
Gz database table structure:
No.: xh char (6)
Name: xm char (8)
Salary: gz decimal (7,2)