Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

compiling 4gl programs

Status
Not open for further replies.

MichelleButler

IS-IT--Management
Apr 5, 2002
73
GB
I would like to find some good examples on how to compile 4gl programs from the command prompt, I think such command is fglpc <filename>, does anybody have any good suggestions. I currently use r4gl to compile my programs.

Many thanks

Michelle
 
Hi Michelle,

Yes I believe you can use fglpc. I do not have any examples but here is the format of the fglpc command:

fglpc { [-ansi]
[-a]
[-anyerr]
[-p <pathname>] } <.4gl source code module> ...

The options in this command are defined as follows:

-ansi makes the compiler check all SQL statements for ANSI compliance.

-a makes the compiler check array bounds at runtime. (Use only for debugging, because of its overhead.)

-anyerr makes the runner set the status variable after evaluating expressions (overriding the WHENEVER ERROR statement in the code).

-p stores objects in the directory specified in <pathname>.

You can compile multiple .4go source code module files by including them in the list, or you can use standard UNIX wildcards to specify the .4gl files to compile. If the compilation is successful, the corresponding .4go files appear in the directory. Otherwise, the appropriate .err files are placed in the current directory (or in the directory indicated by the -p argument) and the developer receives a warning on the terminal screen.

To collect all the object modules and concatenate them into a p-code executable file (.4gi), use the UNIX command cat as follows:

cat <file name>.4go> ... <program name>.4gi

HTH mikey2nicey
&quot;Dream, but don't quit your day job.&quot;
 
Hi,

You can try this at prompt

c4gl -o name_of_exec name_of_source.4gl

RP
 
Hi Michelle,

r4gl is menu-driven whereas fglpc is command driven. Of course there are pros and cons of using either approach. From my experience, r4gl is more user friendly but limited, and fglpc is more powerful and I feel that it is much more faster when it comes to developing large application.

When building an application, you might want to link your main program with other objects (shared program). When running on UNIX system, I may suggest you to create a script file which contains:

fglpc mainprog.4gl
cat mainprog.4go object1.4go object2.4go object3.4go object4.4go > execprog.4gi

Hope the above will help.

KTT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top