Hi.. I am running the following COBC in my compile script:
cobc -x -Wall -fnotrunc -t lst\%src%.lst -o obj\%src%.exe CBL\%src%%cur_ext%
I wanted to add the following to my compile: -X and -ftsymbols, but when I try to insert those into the COBC systax, the compile fails. How does one introduce them? Is there a specific column that they start in?
By the same token I was interested in changing the behavior of a screen program to be more like Micro Focus.. to see how that impacts it. I was used to using Microsoft's compilers some time ago, which was written by MF, but there was no MS options that I could see. Again, not at all clear on how I could compile with these options.
I might want to override runparms. The impression I got from the manuals was that one could insert an entry into the runconfig.cfg file to point to an alternate parm file.. and install somehow directives as INCLUDES that might change the run's behavior. Is that so?
**Are there ANY examples of how any of these are set? ** I work best from examples.. though I have read thru the manuals many times (probably missing things). I still don't see how to install those switches into the process, to use.
To explain, I am actually getting some results with preliminary testing. I have written a screen program that seems to work, and some basic file load and file dump programs, to build and unload isam files. Hope to bring them all together to allow me to enter data into a file, modify it on screen, inquire by key, remove unwanted records. But I wanted control over some of the compile and run options.. so I could see the XRef, for example, or ask the compiler to treat screens like Micro Focus, if needed.
Thank you,
Steve
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For old Microsoft COBOL: I'd start with cobc -fregister=COL,LIN source.cob and see where this leads you, if you get strange syntax errors because of reserved words you could use -fno-reserved=WORD-ONE,WORD-TWO. But it would be possibly better if someone could come up with a ms.words file which we can integrate.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Simon,
THANK YOU!! That worked. I got the xref and other features.
And I was able to google how to get successful compile when the line was too long..
Shift +6 (Hex 5E) created a carat symbol n the end of the COBC line, allowing me
to enter more overrides on the following line.
Regarding Microsoft .. what do you mean by ms.words? If you can further describe I will try to put together what you need. Having MS Cobol represented would be great.
Thank you again,
Steve
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The reserved word lists are stored in config/*.words - so far there is none for the "Microsoft COBOL dialect. As soon as it exists you can directly (without recompiling GnuCOBOL) do
cobc -std=cobol85 -frelaxed-syntax -freserved-words=MS" prog.cob and should have most working already. You would have to have a look at the documentation of MS COBOL to get the list (or at least use the MicroFocus reserved list for the MS-dialect) to set this list up and have a look at the other .words files how the synax looks like / wgat to add,
If we find it is really useful, then we can then also add a ms.conf, which would allow cobc -std=ms prog.cob, too.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Simon,
Tried emailng you to your sourceforge.net account, to show you preliminary draft of what I am compiling, to provide the Microsoft Reserve Words. Hope you see it and can let me know if I am on the right track. If I am I will complete over next couple of days, as time permits.
Thank you,
Steve
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi.. I am running the following COBC in my compile script:
cobc -x -Wall -fnotrunc -t lst\%src%.lst -o obj\%src%.exe CBL\%src%%cur_ext%
I wanted to add the following to my compile: -X and -ftsymbols, but when I try to insert those into the COBC systax, the compile fails. How does one introduce them? Is there a specific column that they start in?
By the same token I was interested in changing the behavior of a screen program to be more like Micro Focus.. to see how that impacts it. I was used to using Microsoft's compilers some time ago, which was written by MF, but there was no MS options that I could see. Again, not at all clear on how I could compile with these options.
I might want to override runparms. The impression I got from the manuals was that one could insert an entry into the runconfig.cfg file to point to an alternate parm file.. and install somehow directives as INCLUDES that might change the run's behavior. Is that so?
**Are there ANY examples of how any of these are set? ** I work best from examples.. though I have read thru the manuals many times (probably missing things). I still don't see how to install those switches into the process, to use.
To explain, I am actually getting some results with preliminary testing. I have written a screen program that seems to work, and some basic file load and file dump programs, to build and unload isam files. Hope to bring them all together to allow me to enter data into a file, modify it on screen, inquire by key, remove unwanted records. But I wanted control over some of the compile and run options.. so I could see the XRef, for example, or ask the compiler to treat screens like Micro Focus, if needed.
Thank you,
Steve
For runtime configuration variables and the option to include other files: see config/runtime.cfg.
For the CBL: just place them anywhere ("posixly correct" would be "anywhere before the source names):
just use:
For old Microsoft COBOL: I'd start with
cobc -fregister=COL,LIN source.coband see where this leads you, if you get strange syntax errors because of reserved words you could use-fno-reserved=WORD-ONE,WORD-TWO. But it would be possibly better if someone could come up with a ms.words file which we can integrate.@sf-mensch
Simon,
THANK YOU!! That worked. I got the xref and other features.
And I was able to google how to get successful compile when the line was too long..
Shift +6 (Hex 5E) created a carat symbol n the end of the COBC line, allowing me
to enter more overrides on the following line.
Regarding Microsoft .. what do you mean by ms.words? If you can further describe I will try to put together what you need. Having MS Cobol represented would be great.
Thank you again,
Steve
The reserved word lists are stored in config/*.words - so far there is none for the "Microsoft COBOL dialect. As soon as it exists you can directly (without recompiling GnuCOBOL) do
cobc -std=cobol85 -frelaxed-syntax -freserved-words=MS" prog.coband should have most working already. You would have to have a look at the documentation of MS COBOL to get the list (or at least use the MicroFocus reserved list for the MS-dialect) to set this list up and have a look at the other .words files how the synax looks like / wgat to add,If we find it is really useful, then we can then also add a ms.conf, which would allow
cobc -std=ms prog.cob, too.Hi Simon,
Tried emailng you to your sourceforge.net account, to show you preliminary draft of what I am compiling, to provide the Microsoft Reserve Words. Hope you see it and can let me know if I am on the right track. If I am I will complete over next couple of days, as time permits.
Thank you,
Steve