Was this helpful?
Define a 3GL Procedure
You can include in your Vision applications procedures written in a 3GL. A 3GL is a programming language such as C, which can contain embedded database and forms statements. You must use a language for which you have purchased a Ingres preprocessor.
If you use a language for which you do not have an Ingres preprocessor, do not include any database access or forms display statements. You can use such "unpreprocessed" procedures to perform calculations on data and return a value.
The 3GL procedure can exist in a source file or as a library routine. If the procedure is a library procedure, you must specify the name of the link options file, as described below.
To define a 3GL procedure
1. Follow Steps 1 through 8 in Create a New Frame. Specify "3GL Proc" as the type.
2. Specify the language in either of these ways:
Choose a language from the selection list.
Vision lists those languages for which you have purchased a preprocessor.
Select OtherLanguages from the menu and select the name of another programming language.
Vision redisplays the Application Flow Diagram with the new procedure inserted.
3. Select MoreInfo to display the MoreInfo About a 3GL Procedure Window as shown in the following figure. The window displays the procedure name and description you just entered, as well as when and by whom the procedure was created.
When the window is displayed, the cursor is on the Library field. The default value of "no" indicates that the code for the procedure is contained in a source code file.
4. Press Tab to accept the default value or type yes to indicate that the procedure exists as a library routine.
If you specified "yes," proceed to Step 5.
If you specified "no," the cursor moves to the Source File field. The field contains a default file name based on the procedure name and the appropriate file extension for the language you specified.
You cannot specify a source code file for a library procedure.
5. Press Tab to accept the default filename, or enter a different filename and press Tab.
6. Use one of the following methods to specify the return type of the value that this procedure returns:
Press Tab to accept the default of "integer."
Enter a standard Ingres data type or a record type that you have created for this application and press Tab.
Enter none to indicate no return value and Press Tab.
The cursor skips the Nullable field; you cannot change the default value of "no."
The cursor moves to the Symbol field. This value specifies the name that the host operating system linker uses to call the procedure. Vision assumes that the symbol name is the same as the procedure name.
7. Press Tab to accept this default symbol name, or enter a new name.
8. Select End to return to the Application Flow Diagram.
Specify the Link Options File
If your 3GL procedure is in a library, you must specify the link options file through which Vision is to call the procedure. You do this on the Application Defaults Window.
To specify the link options file
1. On the Vision Applications Catalog window, position the cursor on the name of the application that contains the 3GL library procedure.
2. Select MoreInfo from the menu.
Vision displays the MoreInfo About an Application window.
3. Select Defaults from the menu.
Vision displays the Application Defaults window.
4. Move the cursor to the Link-options Filename field.
5. Specify the name of the link options file and select OK.
6. Select Save on the MoreInfo About an Application window.
7. Select End to return to the Applications Catalog window.
Last modified date: 04/03/2024