Summary:
See also: Installation and Setup.
The fglrun tool is the runtime system program that executes p-code BDL programs.
fglrun [options] [ program[.42r]
| module[.42m] ] [argument
[...]]
Option | Description |
-V | Display version information for the tool. |
-h | Displays options for the tool. Short help. |
-i { mbcs } | Displays information. -i mbcs displays information about multi-byte character set settings. |
-d | Start in debug mode. See Debugger for more details. |
-e extfile [,...] | Specify a C extension module to be loaded. This option can take a comma-separated list of extensions. |
-l | Link pcode nodules together, see Compiling Programs. |
-o outfile | Specify the output file for the link mode (-l option). |
-b | Displays compiler version information of the module, see Compiling Programs. |
-p | Generate profiling information to stderr (UNIX only). See Profiler for more details. |
-M | Display a memory usage diagnostic when program ends, see Optimization. |
-m | Check for memory leaks. If leaks are found, displays memory usage diagnostic and stops with status 1, see Optimization. |
--java-option=option | Passes Java runtime options when initializing the JNI interface. See Java Interface for more details. |
This tool executes BDL programs.
fglrun myprogram.42r -x 123
For more details, see Executing FGL Programs.
The fglform tool compiles form specification files into XML formatted files used by the programs.
fglform [options] srcfile[.per]
Option | Description |
-V | Display version information for the tool. |
-h | Displays options for the tool. Short help. |
-i { mbcs } | Displays information. -i mbcs displays information about multi-byte character set settings. |
-m | Extract localized strings. |
-M | Write error messages to standard output instead of creating a .err error file. |
-W { all } | Display warning messages. Only -W all option is supported for now. |
-E | Preprocess only. |
-p option | Preprocessing control, where option can be one of: - nopp: Disable preprocessing. - noli: No line number information (only with -E option). - fglpp: Use # syntax instead of & syntax. |
-I path | Provides a path to search for include files. |
-D ident | Defines the macro 'ident' with the value 1. |
This tool compiles a .per form specification file into a .42f compiled version:
fglform custform.per
The .42f compiled version is an XML formatted file used by BDL programs when a form definition is loaded with the OPEN FORM or OPEN WINDOW WITH FORM instructions.
The fglmkmsg tool compiles message files into a binary version used by the BDL programs.
fglmkmsg [options] srcfile [outfile]
Option | Description |
-V | Display version information for the tool. |
-h | Displays options for the tool. Short help. |
-r msgfile | De-compiles a binary message file. |
This tool compiles a .msg message file into a .iem compiled version:
fglmkmsg mess01.msg
For backward compatibility, you can specify the output file as second argument:
fglmkmsg mess01.msg mess01.iem
The .iem compiled version can be used by BDL programs, for example, when the HELP clause is used in a MENU or INPUT instruction.
See message files for more details.
The fglcomp tool compiles BDL program sources files into a p-code version.
fglcomp [options] srcfile[.4gl]
Option | Description |
-V or --version | Display version information for the tool. |
-h or --help | Displays options for the tool. Short help. |
-i { mbcs } | Displays information. -i mbcs displays information about multi-byte character set settings. |
-S | Dump Static SQL statements found in the source to stdout. |
-m | Extract %"string" Localized Strings from source to stdout. |
-M | Write error messages to standard output instead of creating a .err error file. |
-W what | Display warning messages. For a complete description, see below. |
-E | Preprocess only. See Preprocessor for more details. |
--timestamp | Add compilation timestamp to build information in 42m header. |
-p option | Preprocessing control, where option can be one of: - nopp: Disable preprocessing. - noli: No line number information (only with -E option). - fglpp: Use # syntax instead of & syntax. |
-G | Produce .c and .h globals interface files for C Extensions. |
-I path | Provides a path to search for include files. See Preprocessor for more details. |
-D ident | Defines the macro 'ident' with the value 1. See Preprocessor for more details. |
--build-doc | Generate source documentation. |
--build-rdd | Generate the .rdd data definition during compilation. |
--verbose | Print detailed compilation information |
--java-option=option | Passes Java runtime options when initializing the JNI interface. See Java Interface for more details. |
This tool compiles a .4gl into a .42m p-code module that can be linked to other modules to create a program or a library.
fglcomp customers.4gl
If a compilation error occurs, the tool generates a file that has the .err extension, with the error message inserted at the line where the error occurred. You can change this behavior by using the -M option to display the error message to the standard output.
To create a executable program, the fgllink or fgl2p tool must be used to link the .42m compiled file with other modules.
The -W option can be used to check for wrong language usage, that must be supported for backward compatibility. When used, this option helps to write better source code.
The argument following -W option can be one of return, unused, stdsql, print, error and all.
The -W option also supports the negative form of arguments by using the no- prefix as in: no-return, no-unused, no-stdsql. You might need to use these negative form in order to disable some warning when using the -W all option:
fglcomp -Wall -Wno-stdsql customers.4gl
The order of warning arguments is important: switches will be enabled/disabled in the order of appearance in the command line. Using the negative form of warning arguments before -W all makes no sense.
The fgllink tool assembles p-code modules compiled with fglcomp into a .42r program or a .42x library.
To create a library:
fgllink [options] -o outfile.42x module.42m [...]
To create a program:
fgllink [options] -o outfile.42r { module.42m
| library.42x } [...]
Option | Description |
-V | Display version information for the tool. |
-h | Displays options for the tool. Short help. |
-o outfile.ext | Output file specification, where ext can be 42r for a program or 42x for a library. |
otheroption | Other options are passed to fglrun for linking. |
This tool links .42m p-code modules together to create a .42x library or a .42r program file.
fgllink -o myprog.42x module1.42m module2.42m lib1.42x
Note that fgllink is just a wrapper calling fglrun with the -l option.
The fgl2p tool compiles source files and assembles p-code modules into a .42r program or a .42x library.
To create a library:
fgl2p [options] -o outfile.42x { pcodem.42m |
srcfile.4gl } [...]
To create a program:
fgl2p [options] -o outfile.42r { pcodem.42m
| srcfile.4gl | library.42x } [...]
Option | Description |
-V | Display version information for the tool. |
-h | Displays options for the tool. Short help. |
-o outfile.ext | Output file specification, where ext can be 42r for a program or 42x for a library. |
otheroption | Other options are passed to the linker or compiler. |
This tool can compile .4gl source files and link .42m p-code modules together, to create a .42x library or a .42r program file.
fgl2p -o myprog.42x module1.4gl module2.42m lib1.42x
This tool is provided for convenience, in order to create programs or libraries in one command line. It uses the fglcomp and the fgllink tools to compile and link modules together.
The Database schema extractor is the tool provided to generate the Database Schema Files from an existing database.
fgldbsch -db dbname [options]
Option | Description |
-V | Display version information for the tool. |
-h | Displays options for the tool. Short help. |
-H | Display long help. |
-v | Enable verbose mode (display information messages). |
-ct | Display data type conversion tables. |
-db dbname | Specify the database as dbname. This option is required to generate the schema files. |
-dv dbdriver | Specify the database driver to be used. |
-un user | Define the user name for database connection as user. |
-up pswd | Define the user password for database connection as pswd. |
-ow owner | Define the owner of the database tables as owner. |
-cv string | Specify the data type conversion rules by character positions in string. |
-of name | Specify output files prefix, default is database name. |
-tn tabname | Extract the description of a specific table. |
-ie | Ignore tables with columns having data types that cannot be converted. |
-cu | Generate upper case table and column names. |
-cl | Generate lower case table and column names. |
-cc | Generate case-sensitive table and column names. |
-sc | Extract shadow columns. |
-st | Extract system tables. |
-om | Run schema extractor in old fglschema mode (accepts -c and -r options) |
The fgldbsch
tool extracts the schema description for any database
supported by the product.
For more details about database schema extraction, see Database Schema Files.
The fglmkstr tool compiles localized string files.
fglmkstr [options] source-file[.str]
Option | Description |
-V | Display version information for the tool. |
-h | Displays options for the tool. Short help. |
This tool is used to compile .str localized string files into .42s files.
For more details, see Localized Strings.