I have a problem:
1. Compiled character-based application (netexpress 3.1) to .GNT 's
2. Running from windows 98 : (using run.exe as a trigger): No problem
3. Running from windows 2000 (using run.exe as a trigger) : No Problem
4. Running from Windows XP: run.exe gives the error:
Load error : file 'mfrun.gnt'
Error code : 179, pc = 0, call =1 , seg=0
179 error during chain (Program not found)
Who can help me?
Thanks,
Cor
"Cor Bruntink" <cor.br...@tsubaki.nl> wrote in message
news:3de78cdc$0$231$4d4e...@news.nl.uu.net...
You will get that error if RUN.EXE cannot find RUN.CFG. It sounds as though
your COBOL system has not been set up correctly on XP.
"Cor Bruntink" <cor.br...@tsubaki.nl> wrote in message
news:3de78cdc$0$231$4d4e...@news.nl.uu.net...
--
Posted via http://dbforums.com
> I am trying to produce .gnt files for MF-COBOL programs in unix
> environment.Could anybody please help me the command to get the
> gnt files.
Add OMF"GNT" to the compiler directives. eg:
cob -u prog1.cbl -C OMF"GNT"
>
>I am trying to produce .gnt files for MF-COBOL programs in unix
>environment.Could anybody please help me the command to get the
>gnt files.
That's easy: cob -O program.
Better yet, put -O in the default compiler option file in $COBDIR/etc. I don't
recall the file name offhand.
> MFDEVP <membe...@dbforums.com> wrote:
>
>>
>>I am trying to produce .gnt files for MF-COBOL programs in unix
>>environment.Could anybody please help me the command to get the
>>gnt files.
>
> That's easy: cob -O program.
No. -O is something else. it is -u, or OMF"GNT"
>>No. -O is something else. it is -u, or OMF"GNT"
>
> I work with MF on Unix every day. It is definately -O.
Sigh, maybe you do work with it, but you never seem to read the manuals:
Object COBOL User Guide
Chapter 9: Descriptions of cob Flags
""" -----------------------------------------------------------------
Compile to .gnt Code for Unlinked Environment (-u)
Compiles the COBOL source code files (.cbl, .CBL or .cob) into intermediate
code (.int) and then code generates them to dynamically loadable native
code (.gnt) files.
You can supply intermediate code files to the cob command instead of COBOL
source code files; these are just code generated. You can also input any
object module files (.o) to the cob command; these are statically linked to
the dynamic loader to produce the static run-time library for dynamically
loadable files. Dynamically loaded programs can call any of the modules in
the statically linked run-time library as well as any other valid
dynamically loadable program.
Examples
The following examples illustrate the types of processing available using
the -u flag:
cob Command line Output Files
cob -u tmp/a.cbl a.int, a.gnt
cob -u b.cbl b.int, b.gnt
cob -u a.int a.gnt
cob -u tmp/b.int b.gnt
----------------------------------------------------------------- """
""" -------------------------------------------------------------
Enable Optimization (-O)
Enables maximum performance at run time by carrying out the minimum
run-time checks. This option is for use after all debugging has taken place
and maximum performance with minimum run-time checks is required. The exact
operation of this flag is environment dependent, but at a minimum it passes
the NOCHECK directive to the Compiler. If any .c files are being processed,
this flag also is passed through to cc.
---------------------------------------------------------------- """
The -O option can be added to either .int or to .gnt, but does not cause
production of .gnt.
The question was "the command to get the gnt files.".
The answer is -u or OMF"GNT".
One more question - I am getting error message "Recursive COBOL CALL
is illegal with a PC = 4E4E and error = 166.How to identify at
what of the
code this is happening with the PC.
Thanks in advance.
>
> Thank you so much.I was able to generate by using
> cob -u prog1.cbl -C "GNT".
>
> One more question - I am getting error message "Recursive COBOL CALL
> is illegal with a PC = 4E4E and error = 166.How to identify at
> what of the
> code this is happening with the PC.
It shouldn't be too hard to determine what the problem is: either a program
is CALLing itself, or it is CALLing a program that has CALLed it.
It the programs are created as .int and a REF and COPYLIST are directives
then you should get a listing that directly shows the PC numbers. However,
with a .gnt you also need to do something like ASMLIST"name.asm" and
SOURCEASM to be able to track the PC addresses.
It would be best to delete the .gnts and recompile to .int for testing and
then only go to .gnt for distribution (if ever).
Alternately add ANIM directive on the compile (to .int not .gnt) and
animate the programs to see what is going on.
Don't forget to rm *.gnt.
cob -u myprog.cbl will create gnt (and int) code on UNIX.
Simon.
Sorry for the misinformation.
FWIW, to make an option the default, put it in $COBLIB/etc/cobopt (not to be
confused with $COBOPT).
Robert
And you mentioned assembly lising will help to get the PC address.
Right now I am using the command to list the addresses :
cob -uaP -C ref prog1.cbl.
How do I need to incorporte the assembly listing in the above command.
I think you mean $COBDIR/etc/cobopt. Per the Server Express User's Guide :
At start-up, the cob command searches for options in the following sequence
of locations:
1.. System default options in the file $COBDIR/etc/cobopt
2.. User default options in the environment variable COBOPT
3.. Execution-time options on the cob command line
SimonT.
If you are using Net Express or Server Express, then you can animate
generated code.
For Server Express, if you compile your program thus :
cob -ug myapp.cbl
and then debug with :
anim myapp.gnt
You can either step through your program, or hit Zoom. Either way, execution
should stop on the offending source line. This will probably be much quicker
than trying to create assembly listings.
If you really want to create an assembly listing on UNIX, you can pass -S to
cob, i.e.
cob -uS myapp.cbl
though that directive is provided as-is (undocumented), and is not a
recommended method to resolve your problem.
Simon.
cob -S will still function with OCDS on UNIX, creating a .s file.
Simon.