4GL
4GL is a Computer programming language.
History: Informix
In the years 1980, the standardization in the world of data processing did not exist. Each manufacturer had his clean Operating system, his own computer programming language, his clean basic management system of data (DBMS)… In fact, to be able to have programs able to turn on the majority of the machines, it was necessary to rebuild each program for each version. The language associated with the DBMS Informix (competitor of Oracle), was the 4GL .
Current versions
In 2001, IBM repurchased the Informix company, but stopped the development of the 4GL, it remains however available near Vmark, Informix distributer in France.Currently, There exist several companies which propose clones compatible with the original 4GL. They are:
-
Aubit4GL . Open Source project of 4GL.
- Furnace I S Development Tools (4js). Syntax and the instructions were preserved, but the compiler was famous BDS. The preceding compiler was in characters mode (with rectangles drawn as a window), on the other hand the compiler 4JS, emulated graphics Windows. From now on, the last version of 4JS, named Genero, is really graphic with all the components of the Windows type. To the graphic customers Windows, Linux and Mac OSX, Four I S also add a version Web in the form of cgi or filter ISAPI, allowing to generate HTML dynamically, starting from the original 4GL. The majority of the databases of the markets are now supported. Extensions Web-services make it possible to open the 4GL with the outside world. Furnace I S propose moreover a Computer aided software engineering dedicated to the 4GL (Genero Studio), and a compatible database Informix (Genero dB).
- Querix Hydra4GL . Querix proposes an environment of complete development around the 4GL with graphic solutions based on Windows and Java. Moreover Querix products make it possible to tackle several databases and either only Informix.
Characteristics of this language
The 4GL is a language conceived for the development of applications. It is a language of fourth generation (from where its name, 4GL: 4 HT Generation Language), which means that, contrary to the C, the Pascal and the other languages of third generation which are not specialized, it is conceived to communicate with several types of databases with same sources (O.D.I). It is based on the RDSQL, an extension of SQL. For example, it is possible to define the type of a variable according to a field of a table (see example in bottom).It is insensitive with the breakage.
It uses purely procedural instructions (IF, FOR, WHILE, etc) but also of the nonprocedural instructions. For example FINELY allows to create menus (see example in bottom). In the case of FINELY, the program remains between the instructions SMALL and SMALL END. As soon as the user carries out an action, the program checks if it must react. So not it does not do anything, so yes it does what it has to do then returns in the menu and remains there again. That will last until the user asks to leave the program or to close the menu.
This kind of instructions makes the development faster compared to the usual procedural languages (according to the support of course published by Iscariote at the end of the Eighties, the report/ratio is from approximately 1 to 10). The 4GL makes it possible the programs to be divided on several source files (named modules), each one containing part of the functions. This makes it possible to return common the modules containing of the functions used by several programs and thus to avoid rewriting them. A non-standard file indicates to the compiler which modules to compile to constitute a functional program. The screen display is managed by a non-standard file. As much the modules is with the format *.4gl, as much the files of posting (named forms) are files in *.per. The forms contain the provision of the texts and the fields of seizure (and for the forms compatible with the recent versions of the compiler: checkbox, combobox, etc) as well as associated variables. The programs 4gl communicate with the forms via special instructions which associate groups of variables of the program with a group of variables of the form. Finally the exit (towards a printer, an electronic file, etc) is managed by a special type of functions, the functions carryforwards. The image on the left watch the standard architecture of a program 4GL, with the instructions used for the communication enters the various elements.
IIUG (International Informix Users Group) has many forums and tools complementary to the 4GL.
Examples
The first watch how to define a value compared to a table of one database on which the program is dependant. Thus these variables will have the same type as the field to which they were associées.The second shows an example of the order MENU
The last example shows the specialization of the 4GL in the business applications. In some lines of code, it is possible to post a form, to question him, and to add the values seized in the base of données.
Example 1
DEFINE ma_variable LIKE ma_table.ma_valeur DEFINE mon_record LIKE ma_table.*
Example 2
SMALL Choice COMMAND " Interro." code, generally a call of function COMMAND " Fin" code, generally a call of function SMALL END
Example 3
DEFINE client_record LIKE client.* OPEN FORM customer FROM " client" DISPLAY FORM customer INPUT BY NAME client_record.* AFTER INPUT IF NOT INT_FLAG THEN BEEN WORTH INSERT INTO customer client_record.* END IF END INPUT
External references
- 4JS, Querix and Supra, clone commercial of the 4GL of IBM
- Aubit 4GL, a clone of 4GL under license LPG.
- Any Room for has Language 4GL-style? , English study on the positioning of the 4GLs.