Can't Save .cob
Can't Save .cob
I'm trying to teach myself cobol and I can't figure how this thing works. I'm kind of starting from scratch, so this is probably super simple but I'm not figuring it out. I am needing to save a .cob; then I need to know how to get it into a workspace; and then I need to figure out how to run it. I apologize if it's in the video tutorials and I missed it on youtube, but I am just totally lost. THanks!
I am needing to save a .cob;
1) Select the Templates section of the Navigator (on the left)
2) Select the COBOL Document Type
3) Click on the New File option
4) Use the File, Save As menu and save the file to: c:\temp\test.cob
then I need to know how to get it into a workspace;
1) Workspace, New menu to create a new workspace
2) Open c:\temp\test.cob and use the File, Add to Active Project menu. Also see here: http://www.zeusedit.com/zforum/viewtopic.php?t=7066
Before you can run anything you need to compile and link the COBOL file to produce and executable.then I need to figure out how to run it.
What COBOL compiler have you installed

Cheers Jussi
Zeus, not a compiler? What should I get?
I thought Zeus was a compiler.What COBOL compiler have you installed
I've been watching https://www.youtube.com/watch?v=bqExtGo ... nB&index=1
and he uses IDE Cobol that looks like it does everything all in one. I tried to install something that I thought was that program and it said that it wasn't compatible to my Windows 8 computer. So I got Zeus IDE and I guess I didn't know I needed a compiler as well.
Any suggestions for a compiler? And how do I get them to work together?
Downloaded OpenCOBOL 2.2 dev 2012
I downloaded OpenCOBOL 2.2 dev 2012 from one the list of compilers on one of your other responses but I'm trying to follow your instructions to get them to work in my situation.Just do this:
Options, Document Types menu
Select and edit the COBOL Document type
Select the Compiler panel
In the command line field add the command line shown below
Code:
C:\MinGW\local\bin\htcobol.exe "$fn"
You can also add any additional command line options. For MORE options see here: http://tiny-cobol.sourceforge.net/docs/htcobol_en.html
Open a COBOL document and use the Compiler, Compile to compile and build that file
The above steps should create an executable in the same folder. You should check that this is the case.
If you now want to run that executable do this one off configuration to create a Tool item to run the executable:
Options, Document Types menu
Select and edit the COBOL Document type
Select the Tools panel
Setup this new tool:
Code:
Menu Text: Execute: '$fb.exe'
Program Type: Executable
PROGRAM Name: $fb.exe
Arguments:
Work Directory: $fdd
Turn on Capture Standard Output and Capture Standard Error options
Add the item to the different menus as required
This will add a tool item to the Navigator, Tools panel (left side of editor).
After you have compiled your COBOL file you can now run the executable for that file from the Tools panel. To run the executable make sure the COBOL document is active and then use this new Tool item to do the run.
The output of the program should also get captured inside of Zeus.
Towards the end of this topic you will see a more detail set of instructions on getting TinyCobol to work with Zeus:
http://www.zeusedit.com/zforum/viewtopic.php?t=2393
I found this page that has a link to a Windows installer for the GNU Cobol (formerly known as OpenCOBOL):
The direct link to the installer is here.
Cheers Jussi
http://www.zeusedit.com/zforum/viewtopic.php?t=2393
I found this page that has a link to a Windows installer for the GNU Cobol (formerly known as OpenCOBOL):
The direct link to the installer is here.
Cheers Jussi
Good so far...
Everything you've given me so far has been gold. Got TinyCobol. Got my document to Compile successfully. It does say this when I compile it along with the successful message:
C:\MinGW\local\bin\htcobol.exe: Could not find input file for 'C:\Users\Mark\AppData\Local\Temp\First-attempt' using search suffixes '.cob;.COB;.cbl;.CBL;'. Abort.
Also, when i select the executable file under the Tools tab within the navigation section, it makes a loud sound like 'you did something wrong' and brings up a blank debug screen that has this in it
---------------------------------------------------------------------------
Zeus - Version 3.97t
Copyright (c) Xidicone P/L 1993-2014. All rights reserved.
---------------------------------------------------------------------------
**** Unregistered Software. To be used for evaluation purposes only. ****
---------------------------------------------------------------------------
Let me know if you can work anymore of your "the force" magic and get me all the way home. Thanks!
C:\MinGW\local\bin\htcobol.exe: Could not find input file for 'C:\Users\Mark\AppData\Local\Temp\First-attempt' using search suffixes '.cob;.COB;.cbl;.CBL;'. Abort.
Also, when i select the executable file under the Tools tab within the navigation section, it makes a loud sound like 'you did something wrong' and brings up a blank debug screen that has this in it
---------------------------------------------------------------------------
Zeus - Version 3.97t
Copyright (c) Xidicone P/L 1993-2014. All rights reserved.
---------------------------------------------------------------------------
**** Unregistered Software. To be used for evaluation purposes only. ****
---------------------------------------------------------------------------
Let me know if you can work anymore of your "the force" magic and get me all the way home. Thanks!
Even though Zeus might be saying the compile was successful I don't think that is the caseGot my document to Compile successfully.

To determine the success or otherwise of a compile, all Zeus does is try to parse the compiler output for any sign of problems.
By default that is nothing more than a check for any indication of errors and/or warnings.
As you can see from the output produced, in terms of English it seems clear it has failed, but the based on the text of that output, Zeus would have seen it as a success.
C:\MinGW\local\bin\htcobol.exe: Could not find input file for 'C:\Users\Mark\AppData\Local\Temp\First-attempt' using search suffixes '.cob;.COB;.cbl;.CBL;'. Abort.
This line says to me that TinyCobol (i.e. htcobol.exe) could not find this file:
Code: Select all
C:\Users\Mark\AppData\Local\Temp\First-attempt
Code: Select all
C:\Users\Mark\AppData\Local\Temp\First-attempt.cob
C:\Users\Mark\AppData\Local\Temp\First-attempt.COB
C:\Users\Mark\AppData\Local\Temp\First-attempt.cbl
C:\Users\Mark\AppData\Local\Temp\First-attempt.CBL

If the file does exists then it indicates the command line defined in the Zeus COBOL document type is probably wrong. Is this the command line you have defined

Code: Select all
C:\MinGW\local\bin\htcobol.exe -M "$fn"
My first guess as an alternative command line would be this instead:
Code: Select all
C:\MinGW\local\bin\htcobol.exe -M "$fdd$fb"
That is sending the file name to the compiler without the extension and letting the COBOL compiler add the extension.
Finally, to better understand why this is failing I would use the Options, Editor Options menu and in the General panel turn on the Debug tools, macros and executables checkbox option.
With this option on you will see exactly what command line Zeus is sending to the htcobol.exe compiler.
Post back that command line and I will be able to help you fix this

Cheers Jussi
Details on how to use the GNU Cobol compiler inside Zeus can be found here: http://www.zeusedit.com/zforum/viewtopic.php?t=7174
Cheers Jussi
Cheers Jussi
This is what I got from the changes to the command line...
---------------------------------------------------------------------------
Zeus - Version 3.97t
Copyright (c) Xidicone P/L 1993-2014. All rights reserved.
---------------------------------------------------------------------------
**** Unregistered Software. To be used for evaluation purposes only. ****
---------------------------------------------------------------------------
Debug: Changed to the 'C:\Users\Mark\AppData\Local\Temp\' directory supplied
Debug: Command: C:\MinGW\local\bin\htcobol.exe -M "C:\Users\Mark\AppData\Local\Temp\C:\Users\Mark\AppData\Local\Temp\First-attempt"
Debug: stdout: yes
Debug: stderr: yes
Debug: save: no
Debug: save all: no
Debug: prompt: no
Debug: reload: no
Debug: output: no
--------------------Configuration: Practice Programs - Release--------------------
Using document type compiler options....
Debug: Command: C:\WINDOWS\system32\cmd.exe /c C:\MinGW\local\bin\htcobol.exe -M "C:\Users\Mark\AppData\Local\Temp\C:\Users\Mark\AppData\Local\Temp\First-attempt"
Debug: Process ID: 0x2F54
C:\MinGW\local\bin\htcobol.exe: Could not find input file for 'C:\Users\Mark\AppData\Local\Temp\C:\Users\Mark\AppData\Local\Temp\First-attempt' using search suffixes '.cob;.COB;.cbl;.CBL;'. Abort.
Zeus - Version 3.97t
Copyright (c) Xidicone P/L 1993-2014. All rights reserved.
---------------------------------------------------------------------------
**** Unregistered Software. To be used for evaluation purposes only. ****
---------------------------------------------------------------------------
Debug: Changed to the 'C:\Users\Mark\AppData\Local\Temp\' directory supplied
Debug: Command: C:\MinGW\local\bin\htcobol.exe -M "C:\Users\Mark\AppData\Local\Temp\C:\Users\Mark\AppData\Local\Temp\First-attempt"
Debug: stdout: yes
Debug: stderr: yes
Debug: save: no
Debug: save all: no
Debug: prompt: no
Debug: reload: no
Debug: output: no
--------------------Configuration: Practice Programs - Release--------------------
Using document type compiler options....
Debug: Command: C:\WINDOWS\system32\cmd.exe /c C:\MinGW\local\bin\htcobol.exe -M "C:\Users\Mark\AppData\Local\Temp\C:\Users\Mark\AppData\Local\Temp\First-attempt"
Debug: Process ID: 0x2F54
C:\MinGW\local\bin\htcobol.exe: Could not find input file for 'C:\Users\Mark\AppData\Local\Temp\C:\Users\Mark\AppData\Local\Temp\First-attempt' using search suffixes '.cob;.COB;.cbl;.CBL;'. Abort.
So as per the error message do any of these files exist
Cheers Jussi

Code: Select all
C:\Users\Mark\AppData\Local\Temp\C:\Users\Mark\AppData\Local\Temp\First-attempt.cob
C:\Users\Mark\AppData\Local\Temp\C:\Users\Mark\AppData\Local\Temp\First-attempt.COB
C:\Users\Mark\AppData\Local\Temp\C:\Users\Mark\AppData\Local\Temp\First-attempt.cbl
C:\Users\Mark\AppData\Local\Temp\C:\Users\Mark\AppData\Local\Temp\First-attempt.CBL
I thought I had. I resaved it by changing the file type and still got this:
---------------------------------------------------------------------------
Zeus - Version 3.97t
Copyright (c) Xidicone P/L 1993-2014. All rights reserved.
---------------------------------------------------------------------------
**** Unregistered Software. To be used for evaluation purposes only. ****
---------------------------------------------------------------------------
Debug: Changed to the 'C:\Users\Mark\AppData\Local\Temp\' directory supplied
Debug: Command: C:\MinGW\local\bin\htcobol.exe -M "C:\Users\Mark\AppData\Local\Temp\C:\Users\Mark\AppData\Local\Temp\First-attempt.cob"
Debug: stdout: yes
Debug: stderr: yes
Debug: save: no
Debug: save all: no
Debug: prompt: no
Debug: reload: no
Debug: output: no
Using document type compiler options....
Debug: Command: C:\WINDOWS\system32\cmd.exe /c C:\MinGW\local\bin\htcobol.exe -M "C:\Users\Mark\AppData\Local\Temp\C:\Users\Mark\AppData\Local\Temp\First-attempt.cob"
Debug: Process ID: 0x2644
C:\MinGW\local\bin\htcobol.exe: Could not find input file for 'C:\Users\Mark\AppData\Local\Temp\C:\Users\Mark\AppData\Local\Temp\First-attempt.cob' using search suffixes '.cob;.COB;.cbl;.CBL;'. Abort.
The is the command that Zeus is running and as you can see it is clearly wrong:
This means the compiler settings in the COBOL document type are not correct.
The compiler setting should be this:
Cheers Jussi
Code: Select all
Debug: Command: C:\MinGW\local\bin\htcobol.exe -M "C:\Users\Mark\AppData\Local\Temp\C:\Users\Mark\AppData\Local\Temp\First-attempt.cob"
This means the compiler settings in the COBOL document type are not correct.
The compiler setting should be this:
Code: Select all
C:\MinGW\local\bin\htcobol.exe -M "$fn"
Not working...
That's what I had. I'm not sure what I'm doing wrong on this. I know it's something simple. Here are the new errors:
Code: Select all
Using document type compiler options....
Debug: Command: C:\WINDOWS\system32\cmd.exe /c C:\MinGW\local\bin\htcobol.exe -M "C:\Users\Mark\AppData\Local\Temp\First-attempt.cob"
Debug: Process ID: 0x33A0
'as.exe' is not recognized as an internal or external command,
operable program or batch file.
Compilation completed with errors.
'as.exe' is not recognized as an internal or external command
This means that the MinGW is not installed or is not in the path.
To see if the file is on the machine run this command line from inside Zeus (using the Tools, DOS Command Line menu) or at the Windows command line prompt:
Code: Select all
Command: dir as.exe /s
Directory: c:\
and especially these MinGW install steps: http://www.zeusedit.com/zforum/viewtopic.php?t=6957
That's what I had. I'm not sure what I'm doing wrong on this. I know it's something simple.
TinyCOBOL is a real pain to install only because it is not self contained and is missing several parts and those parts have to be installed individually.
I would continue with the TinyCOBOL install, only since you have got this far and in the process you are learning how Windows executables work

But I found the GNU Cobol much easier to get working: http://www.zeusedit.com/zforum/viewtopic.php?t=7174
That would be my suggested as a better COBOL toolset.
Cheers Jussi
New error...
Ok this is my latest error message....
Code: Select all
Debug: Command: C:\WINDOWS\system32\cmd.exe /c C:\OpenCobol\
Debug: Process ID: 0x1978
'C:\OpenCobol\' is not recognized as an internal or external command,
operable program or batch file.