try to compile a cobol program (from ibm), get this result

Get help with the installation and running of the Zeus IDE. Please do not post bug reports or feature requests here. When in doubt post your question here.
Post Reply
meirab
Posts: 3
Joined: Sun Mar 24, 2013 10:33 pm

try to compile a cobol program (from ibm), get this result

Post by meirab »

i try to compile cobol program from this url:

http://publib.boulder.ibm.com/infocente ... subw23.htm

and c program from this url:

http://publib.boulder.ibm.com/infocente ... subw23.htm

and the result zeus gives is (for cobol):


---------------------------------------------------------------------------
Zeus - Version 3.97o
Copyright (c) Xidicone P/L 1993-2013. All rights reserved.
---------------------------------------------------------------------------
**** Unregistered Software. To be used for evaluation purposes only. ****
---------------------------------------------------------------------------


Using document type compiler options....

'cobol.exe' is not recognized as an internal or external command,
operable program or batch file.


what do i have to do to resolve the problem?
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

Using document type compiler options....

What this means is the compiler command line has come out of the COBOL document type.

In other words Options, Document Types menu, COBOL document type, Compile panel.
'cobol.exe' is not recognized as an internal or external command, operable program or batch file.

This line means that Zeus tried running the cobol.exe on the current file but it could not find that executable.

This is to be expected because apart from a few of the Zeus document types, some form of one off user configuration is required.

So what would you need to do :?:

1) Make sure the cobol.exe is in the system PATH:

http://www.zeusedit.com/zforum/viewtopic.php?t=6176

Also from the link you provided:

2) Setup the COBOL environment variables:

http://publib.boulder.ibm.com/infocente ... subw23.htm

3) Edit the compile command found in the Compiler panel mentioned earlier and set the compile command line options:

http://publib.boulder.ibm.com/infocente ... subw23.htm

Cheers Jussi

PS: The link that you provided describes an AIX COBOL compiler. Have you installed a X86 version of that compiler :?:
meirab
Posts: 3
Joined: Sun Mar 24, 2013 10:33 pm

i try to find the cobol.exe with no success

Post by meirab »

i try to find the cobol.exe with no success
and i try to set the path with: E:\Program Files\Zeus

and get the same result.

is zeus contains "cobol.exe" compiler or it must be installed some other way?
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

it must be installed some other way?
Yes, you need to install a COBOL compiler.

Here are a few options:
  1. OpenCOBOL - http://www.opencobol.org/
  2. COBOL for GCC - http://cobolforgcc.sourceforge.net/
  3. TinyCOBOL - http://tiny-cobol.sourceforge.net/
Cheers Jussi
meirab
Posts: 3
Joined: Sun Mar 24, 2013 10:33 pm

how can tinycobol configured to be executed from inside zeus

Post by meirab »

i have installed "tinycobol" at "c:" and the command: htcobol from:

C:\MinGW\local\bin

accepts the cobol program and has an output.

But i need to do it from inside "zeus" - how to define it inside zeus?
jussij
Site Admin
Posts: 2650
Joined: Fri Aug 13, 2004 5:10 pm

Post by jussij »

But i need to do it from inside "zeus" - how to define it inside zeus?
Just do this:
  1. Options, Document Types menu
  2. Select and edit the COBOL Document type
  3. Select the Compiler panel
  4. In the command line field add the command line shown below

    Code: Select all

    C:\MinGW\local\bin\htcobol.exe "$fn"
  5. You can also add any additional command line options. For more options see here: http://tiny-cobol.sourceforge.net/docs/htcobol_en.html
  6. 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:
  1. Options, Document Types menu
  2. Select and edit the COBOL Document type
  3. Select the Tools panel
  4. Setup this new tool:

    Code: Select all

         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.

Cheers Jussi
Post Reply