Hello,
I've inherited a project where I am to upgrade the Micro Focus compiler from version 4.0.38 to version 10 at my company. I've installed the Build Tools because we want to continue to use the command line only setup for a while longer (we have lots of batch files that drive our process) and I've started recompiling with the new compiler. However, I realize now there are no cfg files created with this version. I've searched, or so I think, the documentation and can not pinpoint how to handle the lack of cfg files. I'm primarily a help desk jockey and cloud administrator here, so any guidance here would be great appreciated. TIA.
------------------------------
Jeff
------------------------------
Hello Jeff,
Are you referring to COBOL Workbench, Net Express, or Visual COBOL for the compiler version 4.0.38?
Which cfg file are you referring to and why would you need them?
------------------------------
Fano R.
Developer/Engineer
Rocket Forum Shared Account
------------------------------
Hello Jeff,
Are you referring to COBOL Workbench, Net Express, or Visual COBOL for the compiler version 4.0.38?
Which cfg file are you referring to and why would you need them?
------------------------------
Fano R.
Developer/Engineer
Rocket Forum Shared Account
------------------------------
Thanks for the response Fano. We simply use the compiler from the command line, so it's not Visual Cobol. We don't have Workbench, nor Net Express. I open a cmd session that uses a .env fiie that sets up the environment. It's very similar how the Visual Cobol Command prompt works now in the Build tools.
The cfg list all the lbr files that the programs depend upon, plus any shared libraries, run time switches and screen attributes. An example:
"[MOHAWK-PROGRAMS]
MOHAWK.LBR
MOBANDY.LBR
MOSHIMP.LBR
MOUTL.LBR
MOPDBA.LBR
$COBDIR\\TOOLS.LBR
[MOHAWK-STARTUP]
APPLICATION-LIBRARY:MOHAWK
INITIALIZATION-LIBRARY:$COBDIR\\TOOLS.lbr
[MOHAWK-SWITCHES]
(-P1+S5+S)
[MOHAWK-ATTRIBUTES]
SYS-ATT-01 : BLACK ON BLACK
SYS-ATT-02 : YELLOW ON RED
SYS-ATT-03 : BLACK ON CYAN
"
Since cfg files are depreciated in v10, how do I compile/link so that each exe would have this information? Thanks.
------------------------------
Jeff
------------------------------
Thanks for the response Fano. We simply use the compiler from the command line, so it's not Visual Cobol. We don't have Workbench, nor Net Express. I open a cmd session that uses a .env fiie that sets up the environment. It's very similar how the Visual Cobol Command prompt works now in the Build tools.
The cfg list all the lbr files that the programs depend upon, plus any shared libraries, run time switches and screen attributes. An example:
"[MOHAWK-PROGRAMS]
MOHAWK.LBR
MOBANDY.LBR
MOSHIMP.LBR
MOUTL.LBR
MOPDBA.LBR
$COBDIR\\TOOLS.LBR
[MOHAWK-STARTUP]
APPLICATION-LIBRARY:MOHAWK
INITIALIZATION-LIBRARY:$COBDIR\\TOOLS.lbr
[MOHAWK-SWITCHES]
(-P1+S5+S)
[MOHAWK-ATTRIBUTES]
SYS-ATT-01 : BLACK ON BLACK
SYS-ATT-02 : YELLOW ON RED
SYS-ATT-03 : BLACK ON CYAN
"
Since cfg files are depreciated in v10, how do I compile/link so that each exe would have this information? Thanks.
------------------------------
Jeff
------------------------------
I am fairly convinced the compiler version 4.0.38 you are referring to is the very old COBOL Workbench. We're talking a span of 30 years :)
The Visual COBOL Build Tools (VCBT) provides its own command prompt where all required environment variables to compile and link are set for you, so I recommend using that command prompt to compile and link your programs. If you need to run a script to set additional environment variables, then you may run it within this command prompt. Take good care not to override the environment variables that are set by VCBT.
Let's try to break the cfg file down in parts!
"[MOHAWK-PROGRAMS]
MOHAWK.LBR
MOBANDY.LBR
MOSHIMP.LBR
MOUTL.LBR
MOPDBA.LBR
$COBDIR\\TOOLS.LBR
- The above suggests that the main program is MOHAWK that depends on MOBANDY, MOSHIMP, MOUTL, and MOPDBA.
- The runtime file TOOLS.LBR no longer exists, and it is mainly replaced by another runtime file.
- I would suggest building:
- MOHAWK as .EXE and the other programs as separate .DLL's or
- MOHAWK as .EXE with the other programs statically linked in
[MOHAWK-STARTUP]
APPLICATION-LIBRARY:MOHAWK
INITIALIZATION-LIBRARY:$COBDIR\\TOOLS.lbr
- The above is not required when MOHAWK is built as .EXE.
- As mentioned above, TOOLS.LBR no longer exists.
[MOHAWK-SWITCHES]
(-P1+S5+S)
- I cannot find the P1 and S switches in the documentations, so they may have been deprecated or no longer required. I don't remember what they were or did.
- The S5 switch is still valid. You may supply this when running the program as MOHAWK.EXE (+S5)
[MOHAWK-ATTRIBUTES]
SYS-ATT-01 : BLACK ON BLACK
SYS-ATT-02 : YELLOW ON RED
SYS-ATT-03 : BLACK ON CYAN
- Sorry! I don't remember what these are.
Hopefully some other people here can fill in the blanks!
------------------------------
Fano R.
Developer/Engineer
Rocket Forum Shared Account
------------------------------