補助教材 - opencobolide documentation · 2019-06-16 · opencobolide documentation, release...

51
OpenCobolIDE Documentation Release 4.7.6 Colin Duquesnoy Jun 24, 2017

Upload: others

Post on 03-Aug-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE DocumentationRelease 4.7.6

Colin Duquesnoy

Jun 24, 2017

Page 2: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going
Page 3: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

Contents

1 Parts of the documentation: 3

2 Meta information: 43

3 Indices and tables: 45

i

Page 4: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

ii

Page 5: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

OpenCobolIDE is a simple and lightweight COBOL IDE based on the OpenCOBOL/GnuCOBOL compiler and thepyQode source code editor widget.

Contents 1

Page 6: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

2 Contents

Page 7: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

CHAPTER 1

Parts of the documentation:

What’s New?

This page lists the most prominent milestones achieved by the OpenCobolIDE developers. For more specific detailsabout what is planned and what has been accomplished, please visit the issues page on github.

Next Version

OpenCobolIDE is in maintenance mode. No new features planned, only critical bugfixes. Note that it may automati-cally receive new features if they are implemented in pyQode.

Changelog

4.7

Starting from this version, OCIDE has entered in maintainance mode: no new features will be accepted, only bugfixes.

We are working a new IDE HackEdit. This new IDE will have a lot more features than OCIDE (project support,search/replace in files, configurable preparsers, ability to write your own plugins, and so on...). HackEdit is in alphastage for the now. We will continue to maintain and fix bugs in OCIDE until the final 1.0 version of HackEdit is ready.

4.7.6

New features:

• add -W and -Wall compiler flags

• add an help button next to the compiler flags settings, the help shows a dialog with the output of cobc –help

• add buttons to change order of copybooks and libraries in compiler settings

3

Page 8: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

• improved indentation in fixed mode (TAB/SHIFT+TAB)

• add support for going to a section using F7

• updated list of COBOL keywoards for GnuCOBOL 2.x users

• updated bundled GnuCOBOL version on windows: now at GnuCOBOL 2.0rc2 (build made by Arnold Trembley,can be downloaded here: http://www.arnoldtrembley.com/GnuCOBOL.htm)

Fixed bugs:

• fix TypeError: start_process() got an unexpected keyword argument ‘cwd’ when running a module with cobcrun

• fix OutputWindow backend cannot import pyqode (search not working in output window)

• fix occasional RuntimeError: wrapped C/C object of type CobolCodeEdit has been deleted

• fix MemoryError when reading log file

• fix [Unhandled exception] UnicodeEncodeError when getting cursor position in bytes

• fix change to Encoding leads to empty editor window

• fix Preferences->Run misses a label/link for “run in external terminal”

• fix goto (F7) sometimes going to a wrong identifier

4.7.5

Bug fix release for PyQt5.7

4.7.4

Improvements:

• a new output window with support for the most common ANSI Escape Codes.

• use a white toolbar on Windows 10

• add support for parsing exceptional messages from GnuCOBOL (e.g. when there is a configuration issue)

• improve run in external terminal on OSX (working dir is now correctly used and running a module with cobcrunshould now be working)

• add ability to choose a custom working directory in the run preferences

• use -v option when checking for compiler checks

Fixed bugs:

• fix compiler path tooltip (the full path is not required since version 4.7)

• fix typo in unhandled exception dialog

• fix typo in compiler check dialog

• fix check compiler can only be used once

4.7.3

Improvements:

• add a checkbox in the status bar to quickly switch between fixed and free format

4 Chapter 1. Parts of the documentation:

Page 9: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

• improve saving and restoring window state (hidden dock widgets will stay hidden).

• allow to see pyqode debug log messages

• improve logging system to easily make the distinction between the current log content and content of otherinstances.

• don’t include full compiler path in default configuration (already set in PATH)

• update to latest qcrash:

– split report into general and application log

– GitHubBackend: upload log file as a gist

– add option to save login only.

• update to latest pyqode:

– many improvements to the cobol code folding

– name parser works with incomplete sources (copybooks or programs which have DIVISIONS incopybooks)

– add zoom menu to the editor context menu

– add ability to close tabs on the left/right of the current tab.

– fix cursor not visible under margins

– and many other bug fixes

• include all available pygments lexer in the frozen build on Windows and OSX (you will have basic syntaxhighlighting for file that are not cobol sources, e.g. bash, foxpro, ...).

• simplify new file templates + use free format setting to choose the correct template.

Fixed bugs:

• fix compiler output not parsed correctly if ‘;’ in error message

• prevent overriding RunEnv[’PATH’] by CompilerEnv[’PATH’]

• fix linter not working if no compiler full path specified (will now use PATH to find the full compiler path).

• fix clear logs not working on Windows

• fix PermissionError when determining the available icon themes

• fix spelling error GnuCobol -> GnuCOBOL in about dialog.

• fix external terminal not working anymore on GNU/Linux.

• fix generic editor’s backend not working in frozen mode

• fix default icon theme not correctly detected on Plasma 5.6 (maybe on other linux desktops too).

4.7.2

Improvements:

• move the crash report tool to an external package: [qcrash](https://github.com/ColinDuquesnoy/QCrash)

• improve the crash report tool by introducing a review dialog where you can edit the final bug report and removeany sensitive data from the report

Fixed bugs:

1.1. What’s New? 5

Page 10: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

• fix FileNotFoundError if wrong vcvarsall path is specified

• fix issues where bad github crendentials would be stored by the bug report tool with no way to correct them

4.7.1

Fix a few issues with the new report tool:

• github credentials not saved correctly

• disable sign in button before signing in

• improve system information to retrieve os name and version on OSX and GNU/Linux

4.7.0

New features:

• New margins mode: you can now configure up to 4 different margins.

• New way to handle MSVC based compilers, including 64 bit support

• Add more command line options to ocide: –compile, –conf, –runtime-env, –cobc-runtime-env

• Add option to save/load preferences.

• Allow to drag & drop paths to the preferences line edits.

• Allow to drag & drop files in the main window to open them in a new editor.

• Add ability to copy runtime dlls to the output directory [Windows].

• Add ability to run a program that requires to set some environment variables.

• Add option to show compiler and runtime configuration.

• Add buttons preferences and about to the home page.

• Add “clean” and “rebuild” actions to the toolbar/menu.

• Add std=nonen, std=cobol2014 and std=acu

• Add a status bar button to forcibly enable/disable the linter (background checks), overriding the Show errorssetting from the Editor preferences.

• Add option to synchronise navigation pane with the editor

• Add option to go up in the filesystem treeview

• Add ability jump to previous/next cursor position (Ctrl+Alt+Z and Ctrl+Alt+Y)

• Add option to send bug report via email

• Improve github bug report, login to github is now done from OCIDE itself

• Update dbpre integration to work with dbpre 0.4

• Allow to use Shift+Enter from the search/replace panel to search backwards

Fixed bugs:

• Fix broken icon theme selection on GNU/Linux and use more icons from theme

• Use KDE specific build icons

• Fix “failed to decode compiler output with encoding cp1252 with external compilation”

6 Chapter 1. Parts of the documentation:

Page 11: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

• Fix “log pane (Issues tab): Line breaks from cobc & gcc are not translated correctly”

• Fix various bugs with environment variables and compiler settings

• Fix a few issues related to save as (title not updated after save as,...)

• Fix using extra quotes in compiler flags not working

• Fix using windows paths style in preferences (backslash instead of slash)

• Fix various unhandled exceptions reported by users

• Fix a few issues with file system view (warn user if using a UNC path, fix bugs when opening a file that islocated at the root of a drive)

• Fix read only property of some fields in the about dialog or the main window (log, compiler output,...)

• Fix cobc warnings treated as errors

• Fix compiler settings not restore if user press Cancel

• Fix a few issues with the offset calculator and some specific types

4.6

4.6.6

Improvements:

• Cancel all compilations if the build errored

• Prevent the same exception message to be shown more than once during the same session

Fixed bugs:

• Fix a UnicodeDecodeError with the linter on Windows

• Fix error messages not appearing when using a MSVC based GnuCOBOL.

• Fix content menu entries not working at mouse position

• Fix lost of cursor selection after case conversion

• Fix offset calculator: it now handles lvl 78/88 and redefines

• Fix a gui bug with offset calculator, disable sorting of items and allow user to resize columns.

• Fix unhandled exception when closing an unsaved editor

4.6.5

New features:

• Ability to show cursor position in bytes, taking the file encoding into account.

• Excepthook that automatically triggers the bug report tool in case of unhandled exception.

• Simplification of the visual studio wrapper batch

Fixed bugs:

• Fixed confusing message about compiler not found. The message now indicates that a “working compiler”could not be found.

• Fixed a few typos in the documentation and the readme.

1.1. What’s New? 7

Page 12: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

• Fixed issues with permission errors on compile/save. Now a message box will appear to indicate to you that youdon’t have the permission to save/compiler a particular file.

• Fixed an issue with the issues pane: opening a file with double click does not work for relative paths

4.6.4

Fixed bugs:

• fix freeze when compiling a file where column 1-6 are not empty in non-free mode.

• fix detection of submodule when lowercase keywords are used

• fix a few issues with PyQt 5.5

4.6.3

New features:

• add an option for specifying copybook paths

• make auto-detect dependencies an optional feature

Fixed bugs:

• Fix crash on startup if check_compiler failed or if compiler not installed on linux

• Use full compiler path when VCVARS32 is set

• Remove duplicates in custom compiler extensions

• Fix linter errors with relative coybook paths in compiler options

• Fix compiler preferences not applied on linux/osx

• Fix misleading tooltip in compiler path line edit

• Fix info messages interpreted as error messages

• Fix file recompiled if source is up to date, now the IDE will compare modification time and will skipcompilation if the source is older than the binary.

• Fix get_dependencies results: comment should be ignored

4.6.2

Bug fix release - major improvements to the installer on Windows.

New features:

• [Windows] Installer - own binaries are now digitally signed

• [Windows] The bundled compiler has been update from OpenCOBOL 1.1 to Gnu-COBOL 1.1, see the list of differences here: http://opencobol.add1tocobol.com/gnucobol/#what-are-the-differences-between-opencobol-1-1-and-gnucobol-1-1

• You can now set the full compiler path instead of just the directory (e.g. /usr/bin/cobc instead of /usr/bin)

• Improve cobc –version parser to include the project name (GnuCOBOL, GnuCOBOL C–,...)

• Due to a bug with pip and the new wheel package, the executable name on linux is now lowercase (open-cobolide instead of OpenCobolIDE).

8 Chapter 1. Parts of the documentation:

Page 13: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

• Add missing extensions to save as dialog and fix filters of open file dialog.

• Show a warning before executing restore to factory defaults.

Fixed bugs:

• Fix installation of desktop files on linux.

• File system view was still fully reloaded needlessly

• Fix consistency in cobc commands (sometimes full path were used sometimes not)

• Fix about dialog closing on [CTRL]

• Fix an infinite recursion in get_dependencies if a module call itself

• Fix case of associated compiler extensions

• Fix a bug with file watcher if a file has been deleted externally and user choose to keep it in the editor

• Fix unicode decode error when the compiler is broken on windows

• Fix a few typos

• Fix creation of temporary files by linter (now they are back to the system temp folder)

• Fix shortcut conflict: F3 used for both goto and find next. The goto shortcuts has been reassigned to F7

• Fix misleading/false positive compilation message in case compiler failed but no output was given. Nowthe IDE will remove files before compiling and will check that the expected file has been created beforeclaiming for success.

4.6.1

Fix a potential failure on startup (probably just on Windows)

4.6.0

New features/Improvements:

• Add ability to control where the binaries will be placed

• Add environment variable settings for compiler (PATH, COBC_CONFIG_DIR,...)

• Add dialog and a button to check whether your compiler works or not ( check compilation of a simplehello world)

• Add .lst to default list of COBOL extensions

• Add a compiler output log view with the complete output of the cobc commands

• Fix some spelling errors and always use GnuCOBOL instead of OpenCOBOL

• Show PICTURE in navigation item’s tooltip (this works but still requires some work on the parser to befully finished)

• Add ability to run module with cobcrun

Fixed bugs:

• Fix a crash with corrupted recent files list

• Fix fullscreen mode not setup on startup but recognized in the options

• Fix Ctrl-Home not working as expected (go to first line)

1.1. What’s New? 9

Page 14: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

• Fix bug with linter that does not take compiler options into account (file not found error for copybooks)

• Fix misleading compiler settings label

• Fix file system view reloaded when parent directory has not changed

• Remove dock widgets hotkeys not working on windows (remove the “&” from the dock widgets’ titles)

• Fix SECTION/DIVISION not correctly recognized in navigation panel and fold panel if there are somespaces between the keyword and the period.

• Fix linter running when compiler is not working

• Fix detection of file type (EXECUTABLE/MODULE) and dependencies of file when there are some new-lines between CALL, USING and the PAREMTER of the call

4.5

4.5.1

New features:

• add ability to set custom file extension association with the different compiler (cobc, dbpre and esqlOC)

Fixed bugs:

• Fix issues with non COBOL files on frozen builds (Windows and OSX only)

• All bugs fixed in pyqode.core 2.6.1

4.5.0

New features:

• EOL management (see issue #110)

• New filter mode for code completion: subsequence

• Add support for stdeb (ppa packages available)

Fixed bugs:

• fix a bug with comment (see issue #109)

4.4

4.4.0

New features:

• esqlOC integration (SQL precompiler for windows)

Fixed bugs:

• fix a bug with the new reporter tool on windows (and get rid of the github3.py dependency)

• improve comment/uncomment when workin in fixed format and column 1-6 is not empty.

10 Chapter 1. Parts of the documentation:

Page 15: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

4.3

4.3.1

New features:

• new bug report tool that make use of the Github API to submit a new bug report using your account thatautomatically includes system information and the application log.

Fixed bugs:

• fix a couple of small bugs in pyqode which should improve the usability (things like restoring cursor positionafter a reload due to an external change, improved auto-completion of quotes and parentheses).

4.3.0

New features:

• experimental support for dbpre on Linux

• experimental support for using a custom GnuCOBOL compiler on Windows

• support for custom keywords convention (lower or upper case keyword suggestions)

• support for very small screens (10 inches)

• support for opening more than one file

Fixed bugs:

• improvements to the navigation panel: fix issues where exec statements were shown in the outline.

• fixed a bug where the linter mixed the code of two opened tabs

• fixed indentation bugs when indenting source that have characters before column 7 (non free format)

• fixed duplicate entires in the recent files list

• fixed a bug that prevent the IDE to remember the last open/save path

• fixed a bug where compilation/run actions were wrongly disabled

4.2

4.2.0

New features:

• splittable tab widget: you can now split and editor vertically or horizontally infinitely.

• a file system tree view that show the content of the directory of the current editor

• navigation panel (and file system tree view panel) can now be closed

• make the control panel (buttons in the editor in minimal view) look better on windows

• add file association to the windows installer

• allow to disable intelligent backspace (now disabled by default) (#78)

• add a path label to the status bar

• add support for pygments 2 (new color schemes)

1.1. What’s New? 11

Page 16: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

• add “Report bug” menu action (clicking on this will open your browser to the github issue tracker with a pre-filled error report)

Fixed bugs:

• fix a line ending issue with the run console on windows (#77)

• fix a bug with navigation panel (#76)

• improve usage of rrt theme (#79)

4.1

4.1.0

New features:

• add support for GnuCOBOL 2.0 on GNU/Linux

• add a way to specify global compiler switches (-g, -ftrace,...)

• improve detection of external terminal on GNU/Linux

• make use of pyqode-console to prompt for a key press at the end of the program when run in an external terminal(Windows - GNU/Linux)

• style improvement: the internal terminal will use the same colors as the COBOL editor.

• performance improvement: avoid useless re-highlight on open

• update to pyqode 2.3 (add occurrences highlighting, global checker, better selections, smart backspace, autocomplete of quotes and parentheses, ...)

4.0

4.0.0

The entire application has been rewritten.

The COBOL code editor widget has been moved to the pyqode.cobol package.

New features:

• code folding

• improved auto indentation (after if/else/perform)

• reworked user interface: the default view (from v2) is back as the default view but you can switch to the minimalview (from v3) by double clicking an editor tab (see issue #47)

• navigation panel is now fully synced with code folding panel of the current editor

• you can now cancel a build/run action

• new syntax highlighter which is about 3 times faster than the previous highlighter

• more keywords in code completion

• ability to disable the linter (see issue #46)

12 Chapter 1. Parts of the documentation:

Page 17: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

3.0

3.0.0

New features:

• add Mac OSX support

• move to PyQt5 (to support retina screens)

• add support for pyQode 2.0: the new api is a lot more stable API and is now fully tested. The editor styleand performances have been improved but the folding panel has been temporarely removed (for performancereason)

• new user interface: the menu and toolbar has gone, instead there is now a compile and run button inside theeditor and a drop down button in the status bar for the most important actions. The homepage and the preferencesdialog also got redesigned.

• compiler process management has been improved: We are now using QProcess instead of subprocess, this allowsome neat improvements such as auto compile before run.

• better log message - log window: include information from the log window when you report bugs!

Please, read the Getting started section of this manual to get started with the new user interface!

2.3

2.3.1

• drop python 2 support (the main script must now be run by a python3 interpreter)

• fix bug with encoding error, see bug #31 on github

2.3.0

New features:

• add ability to run the compiled programe in an external terminal. This is useful if you are using the SCREENSECTION as the embedded terminal does not support redirection.

Fixed bugs:

• fix bug with detection of submodules call if they are enclosed with single quotes instead of double quotes

2.2

2.2.0

New features:

• pic fields offsets calculator

• case converter, you can convert selected text to lower or TO UPPER using the editor context menu.

• full dark style using qdarkstyle

• new test suite for compiler and parser modules

• improved go to line dialog

1.1. What’s New? 13

Page 18: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

• add support for _*.pco_ and _*.cpy_ files

Fixed bugs:

• fix compilation for file if path contains spaces (Linux and Windows)

• fix parser crash that prevents from compiling

• improve COBOL parser to support malformed syntax

• fix ambiguous shortcut overload: F2

• fix outline not informative for COBOL files that have data in column 1-6

2.1

2.1.0

New features:

• Go to definition for variables and procedures (ctrl - click on symbol)

• New debian package on ppa:open-cobol-ide/stable and ppa:open-cobol-ide/unstable

Fixed Bugs:

• code completion should not occur in comments and strings

• fix column number for navigation panel

2.0

2.0.1

Fixed Bugs:

• removed un-needed import of pexpect which caused some issue on clean system which does not have pexepect.

2.0.0

This new release is a major update which makes the transition from PCEF to pyqode. Most of the application has beenrewritten from scratch.

Here are the major changes:

• port to pyqode 1.0

• new compiler errors panel

• interactive output console for program output

• uses pyqode.qt in place of PySide

• support for both python 2 and python 3

• on the fly syntax check, OpenCobolIDE compile your code in the background to quickly warn you about wrongsyntax.

• better integration with most linux desktop environments (use icons and colors from theme, desktop entry).Tested with KDE, Gnome, Unity and Cinnamon.

• allow user to type in lower case (https://github.com/OpenCobolIDE/OpenCobolIDE/issues/1)

14 Chapter 1. Parts of the documentation:

Page 19: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

1.4

1.4.2

• Update code so support pcef 0.2.2

1.4.1

Fixed Bugs:

• slow in large files: https://bugs.launchpad.net/cobcide/-bug/1179228

1.4.0

New features:

• shortcuts for dock windows (F9: log panel, F10: navigation panel)

• show fullscreen shortcut change from F12 to F11

• the application will restore its geometry and state (maximised, dock window positions)

Fixed Bugs:

• dock panel shown when switching tab: now the panel is only show when coming from the homepage or whencompiling

• crash when editing/compiling files who have unicode characters in their path

• focus lost when opening recent files from the menu or the homepage on ubuntu 12.04 -> 13.04

Enhancements and fixed bugs in PCEF 0.2.0:

• improve performances in general

• support for custom word separator, allow OpenCobolIDE to remove the ‘-‘ character from word separatorswhich brings a better code completion for COBOL

• dirty flag is correctly updated

• scrollbars are now correctly update when folding/unfolding code blocks

1.3

1.3.0

This release improves usability with a focus on the run and compile actions:

• detect source dependencies and compile them (if a program P requires a subprogram A who requires a subpro-gram B than the IDE will compile A, B and P)

• Automatically compile file when the run action is triggered

• Run the last program if the current tab is a subprogram

• Avoid compiling a file that is already compiled and up to date

1.1. What’s New? 15

Page 20: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

1.2

1.2.1

• Fix bug: https://launchpad.net/cobcide/-milestone/1.2.1

1.2.0

Added:

• Home page with list of recent files

• A settings page to change a few options (mainly related to the editor style)

• A navigation panel to quickly browse large files (tree with div, sections, variables and paragraphs)

• A shortcut to comment/uncomment selected or active lines (ctrl-/)

• On GNU/Linux, at first start the program will ask the user if he wants to create a desktop files

Bug fixes:

• windows path not normalized

• fix bug with mingw when path contains spaces on windows

• fix bug where no extension was proposed when creating a new file

1.1

1.1.0

• better encoding detection using chardet

• COBOL specific code completion model

• status bar infos (filename, encoding, cursor position)

• windows port (a windows installer is available in the download section)

1.0

1.0.1

• fix packaging issues

1.0.0

• Initial development

Download & Install

Here you’ll find all the necessary explanations for installing OpenCobolIDE.

16 Chapter 1. Parts of the documentation:

Page 21: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

Requirements:

OpenCobolIDE depends on the following packages:

• Python 3

• PyQt5 or PyQt4

• OpenCOBOL/GnuCOBOL

• pyqode.core

• pyqode.cobol

• pygments

GNU/Linux

Note: starting from v4.6.2, the installed executable name is lowercase: opencobolide

Ubuntu

A debian package is available here: https://launchpad.net/cobcide/+download

This package should work on any Ubuntu version >= 14.04 and on any version derived from Ubuntu.

Fedora

A RPM package for Fedora 23 is available here: https://launchpad.net/cobcide/+download

ArchLinux

OpenCobolIDE is available from the AUR.

You can install using one of the many available AUR helper; e.g. using yaourt:

yaourt -S opencobolide

KaOS

OpenCobolIDE is up in the KaOs Community Package (KCP):

kcp -i gnu-cobolkcp -i opencobolide

Other distributions

Install Python3, PyQt5, GnuCOBOL and pip for Python3 using your package manager, then run the following com-mands:

sudo pip3 install OpenCobolIDE --upgrade

Note that if you have both PyQt5 and PyQt4 on your system, the IDE will use PyQt5 by default. To force the use ofPyQt4, you should set the QT_API environment variable to pyqt4.

1.2. Download & Install 17

Page 22: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

Windows

There is a windows installer available here: https://launchpad.net/cobcide/+download

Mac OSX

There is a dmg image available here: https://launchpad.net/cobcide/+download

The only thing you have to do is:

• to install GnuCOBOL compiler, e.g. using homebrew:

brew install gnu-cobol

• run the OpenCobolIDE app

Note: If you installed the compiler in a non-standard path and it is not recognized, you can specify and the path tothe compiler in the preferences dialog under the Build & Run section. Just make sure to only specify the directorywhere the compiler can be found, not the full path.

Getting started

Note: All the screenshots were taken on Gnome 3 desktop. You will have different looks and feels on other operatingsystems or desktop environments.

OpenCobolIDE is simple and lightweight IDE. It works on a single file basis (i.e. it has no concept of project): youcreate/open a file, compile it then run it.

18 Chapter 1. Parts of the documentation:

Page 23: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

This is the first window you will see when running OpenCobolIDE, called the home page. From there you can createnew files or open existing one. You can also access the application menu by right clicking on any empty area.

Create a new file

• click on New

• the following dialog should appear:

• fill up the following information:

– Type: Specify the type of file to create. Depending on your choice the default code template that is createdwill changed. Note that you can changed the file type later on after creating the file.

You can choose from:

1.3. Getting started 19

Page 24: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

* program: A program is an executable. When compiled, it produces an .exe on Windows and anexecutable binary file on GNU/Linux and Mac OSX.

* module: A module or subprogram is a library, a list of procedures that can be shared amongother modules/programs. When compiled, it produces a dynamically linked library (.dll) onWindows and a shared object (.so) on GNU/Linux and Mac OSX.

* empty: create an empty file.

– Name: file name without extension (you can choose the extension in the drop down list)

– Directory: directory where the file will be created.

Warning: The source code of a module must be located in the same directory as the calling program’s sourcecode to work properly.

Open a file

Simply click on Open or choose a file in the recent files list.

Note: The recent files list have a context menu that let you remove a file or clear the entire list.

The main window

Here is the main window of OpenCobolIDE:

It is made up of 5 distinct parts:

20 Chapter 1. Parts of the documentation:

Page 25: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

1. menu and toolbar zone:

The menu contains all the actions that can be performed in the application. Note that the menu ishidden when you switch to the minimal perspective. In that case, you can show it by right clickingnext to the last editor tab (in the empty area).

2. code editors tab widget:

This is where you type your code.

3. the Navigation panel (movable and closable):

This panel shows the document structure. It is fully synced with the code folding panel (inside thecurrent editor).

4. the Log panel (movable and closable):

This panel shows the list of errors found in your program and you program output.

It is made up of the following tabs:

• Issues: the list of issues

• Output: the program output (when you run it).

Note: The output console is interactive and accepts stdin but does not support COBOLSCREEN SECTION. If you’re using the screen section, you should run your programin an external terminal (Preferences->Build And Run)

5. the status bar:

The status bar shows menu/actions description on the left and current editor information on the right(free/fixed format, cursor position, file encoding).

Compile a file

To compile a file, press F8 or press the compile button.

This will compile the current file as well as its dependencies.

You can double click on an entry in the issues table to quickly go to the problematic line in the editor (if the file hasn’tbeen open, OpenCobolIDE will gently open it for you).

To change the program type you must press the down arrow next to the compile button. Doing this will reveal a dropdown menu where you can choose the program type:

Run a compiled program

Press F5 or click the run button (inside the editor) to run the file.

The program will run in the Output window which is interactive (support for stdin has been tested and works with theACCEPT keyword).

Note: It will recompile the file and all its dependencies before running the compiled program.

1.3. Getting started 21

Page 26: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

Application preferences

This page describes the preferences settings that are available for you to customise your experience with the IDE.

To open the preferences dialog, go to Edit->Preferences (F2 on Windows and Linux and CMD+, on OS X).

Editor settings

This tab let you change the cobol source code editor settings.

View options:

• Display line numbers: show/hide the line numbers panel on the left of the editor

• Highlight current line: enable/disable highlighting of the current line

• Highlight whitespaces: show/hide visual whitespaces

• Show errors: enable/disable cobol linter (errors appears as red lines in the editor and as icons on the left ofthe editor).

• Show cursor position in bytes: show cursor in position in bytes (take encoding into account) if enabled,otherwise show the column number.

22 Chapter 1. Parts of the documentation:

Page 27: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

Margins

You can configure up to 4 different margins. You can choose the column where the margin should appear and its color.Use 0 to hide a margin.

Comments symbol

Choose the comment symbol you want to use for the comment/uncomment action (Ctrl+/).

Default is ‘‘*> ‘‘ which should work with both fixed format and free format.

If you’re using fixed format, you can set it to *.

Indentation otions:

• Width: the number of spaces for a tabulation

• Automatic indentation: enable/disable automatic smart indentation. The editor will move the cursor to thecorrect indentation level when you press ENTER (e.g. it will indent automatically after an if statement and soon.

• Intelligent backspace: If enabled, backspace will de-indent (eat at most Width spaces).

Code completion options:

• Filter mode: choose how code completions should be filtered. You can choose between Prefix or subsequence.Subsequence might lead to better results but is much slower.

• Trigger length: specify the amount of characters needed to automatically trigger a code completion request. Avalue of 1 make the code completion trigger automatically as soon as you type.

• Proposed keywords: let you choose a convention for the cobol keywords: lower-case or UPPER-CASE key-words

EOL options:

This group let you change how line endings are handled by the editor.

• Preferred EOL: Specify you preferred EOL, this EOL will be used for creating/saving files

• Auto-detect EOL: If checked, the editor will try to auto detect and keep the original line ending. If false, thepreferred EOL will be used instead of the original line ending when you save a file.

1.4. Application preferences 23

Page 28: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

Style settings

This tab let you change the appearance of the cobol editor and the interface.

Application style options

This group of settings let you change the appearance of the interface. You can either choose to use the Native theme(the app will look similar to the native apps of your system) or use a Dark stylesheet.

On GNU/Linux, you can also choose a custom icon theme.

Editor font options

This group of settings let you change the code editor font settings (font name and default size).

Editor color scheme

This let you choose a color scheme for the source code editor and the run output window.

OpenCobolIDE uses the pygments library for its color schemes definition. You can easily add some custom colorschemes by installing python plugin (this won’t work with a frozen application on Windows and OS X).

24 Chapter 1. Parts of the documentation:

Page 29: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

Compiler settings

This tab let you change the GnuCOBOL compiler settings.

Warning: Those settings are applied globally to every file you compile with the IDE. At the moment there is noway to set custom compiler settings per file.

Note: These settings don’t support environment variable expansion.

Compiler path

This option let you specify the full path to a working GnuCOBOL compiler. When you change this path you can checkwhether your compiler is working by clicking on the “Check compiler” button. The following dialog will then showup.

Press “Check compilation” to check if the compiler is able to compile a simple hello world executable. If you don’t get“Compiler works”, read the compiler output carefully. If it is not working, you might need to adjust the environmentvariables.

• PATH: prefix paths to the PATH environment variable

1.4. Application preferences 25

Page 30: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

• COB_CONFIG_DIR: Hmm, news says this was dropped, but it’ll effect where .conf dialect support files arefound.

• COB_COPY_DIR: Path to COPY books.

• COB_INCLUDE_PATH

• COB_LIB_PATH

Auto-detect and compile submodules checkbox let you choose whether you’d like the IDE to compile submodulesautomatically (that way you just have to compile your main modules).

Note: Each environment variables has an associated checkbox, it won’t be used unless the check box is checked.

Output directory

This option let you chose where to put the binaries, by default binaries will be placed into a bin folder next to thesource file. You can define another relative or absolute directory if you want.

Associated extensions

Associate custom extension with the GnuCOBOL compiler. Extensions should be dotted (.cbl) and lowercase. Theuppercase version will be handled by the ide automatically.

Standard

This option let you choose the target COBOL standard.

Free format

Enable/Disable coding in free format.

Compiler flags

This let you change some common C compiler settings. Every checkbox has a tooltip that describes what the settingis used for.

There is a line edit widget where you can add additional missing compiler flags (separate them with a blank space).

Copybook paths

This option let you add custom copybook paths, e.g. to locate a COBOL copybook you’re including in your program.

Library paths

This option let you add custom library paths, e.g. to locate a c library that you need to link with (such as mysqlclient).-L flag

26 Chapter 1. Parts of the documentation:

Page 31: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

Libraries

This option let you specify the libraries you want to link with. Separate them with a blank space. -l flag

VCVARSALL path:

This option is not visible on the above screenshot because it is available only on windows.

This option let you specify the path to vcvarsall.bat which is needed if you are using a custom GnuCompiler built withVisual Studio. vcvarsall.bat can be found in the VC folder of your Visual C++ installation.

Run settings

Note: These settings don’t support environment variable expansion.

External terminal

This tab let you change the way the IDE run executable programs.

1.4. Application preferences 27

Page 32: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

By default the program will run inside the IDE, in the program output window. This work nice for basic program butwill fail as soon as you start using the SCREEN-SECTION, an error message about being unable to redirect outputwill appear in the program output.

To run such a program you need to run it in an external console window.

To enable running a program in an external terminal:

• check Run in external terminal

• specify the terminal program to use if necessary:

– On Windows, the IDE will automatically use cmd.exe.

– On OS X, the IDE will automatically use open.

– On linux, it depends on the distribution and the desktop environment you are using. The IDE will tryto pick up one of those if available: gnome-terminal, konsole and xfce-terminal. If you areusing another terminal, please indicate the command to use.

Environment

Here you can define some additional environment variables that you’d need to run your program.

Quoting Simon Sobisch (the lead of the GnuCOBOL project):

Users with (recent) GnuCOBOL 2.x can set COB_RUNTIME_CONFIG (see the documentation or conf/runtime.cfg) to have all settingsthey need in one place - both for use with and without OCIDE.

Use multiple configuration files (one "master" and the others onlysetting necessary "special" flags and include master.cfg) and youhave a different set of runtime configurations by just one change inOCIDE :-)

28 Chapter 1. Parts of the documentation:

Page 33: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

SQL Cobol settings

This tab let you configure dbpre integration to get mysql support with COBOL!

Warning: This has been tested and validated on Linux only.

DBPRE Configuration

It’s up to you to install and setup dbpre. Once done, you can configure integration with the IDE.

This group of settings let you specify where to find the various parts of the dbpre framework:

• dbpre: location of the dbpre executable

• cobmysqlapi: location of the cobmysqlapi object file.

• Framework: path to the directory that contains the cobol copybooks that are needed to compile and run yoursql cobol program

DB Connection Parameters

This group of settings let you specify the content of the .param file that will be generated after the compilation of yourprogram succeeded. This file contains database connection settins. Read the dbpre documentation to get more info!

1.4. Application preferences 29

Page 34: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

Advanced topics

Setup a custom compiler on Windows

Starting from version 4.6.0, you have all the tools to setup a custom GnuCOBOL compiler on windows.

The first step is to download or build the compiler and make sure it works from the command line.

Then fire up OpenCobolIDE, open the preferences dialog and go to the compiler tab:

• specify the compiler path in “Custom compiler path”. When you choose a new compiler, you will be presentedwith a dialog that let you check if the compiler works. If the test failed, then this might be because you need toadjust some environment variables

• adjust the environment variables (PATH and COBC_CONFIG_DIR are usually required, you might also needto adjust the include and copy path depending on the compiler you chose). You may disable variables that youdon’t need by removing the check mark.

Note: when you’ve changed an environmnent variable, you can check if the compiler works by clicking on thecheck compiler button.

• if the compiler is build with MSVC, you will also need to indicate the path of vcvarsall.bat of the com-piler used to build GnuCOBOL. If using Visual Studio 2010, you can find this file in c:\ProgramFiles(x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat

Here is the setup I use for working with GnuCOBOL 2.0 MSVC:

30 Chapter 1. Parts of the documentation:

Page 35: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

SQL COBOL Guide

GnuCOBOL does not support SQL statements (such as EXEC SQL) natively but you may use a pre-compiler that willconvert your sql statements to pure COBOL that can then be compiled with GnuCOBOL.

OpenCobolIDE supports the following pre-compilers:

• dbpre (UNIX)

• esqlOC (WINDOWS)

Read the below section to know how to setup OpenCobolIDE to work with one of these pre-compilers.

Warning: Pre-compilers are associated with one specific extension (.scb for dbpre and .sqb for esqlOC). Thosetools will get used only if the file extension match the associated extension! E.g. pre-compilers will never getcalled on regular COBOL files (.cbl, .cob,...).

esqlOC (on Windows)

Warning: To work with esqlOC, you need to use GnuCOBOL built with Visual Studio. Read Setup a customcompiler on Windows to setup the correct compiler.

1. Setup OpenCobolIDE to work with GnuCOBOL compiled with Visual Studio (make sure you can compile asimple HelloWorld)

2. Download esqlOC and install it somewhere on your drive (prefer a path without spaces such as c:\esqloc).

3. Open the OpenCobolIDE preferences and go to the SQL Cobol tab. There specify the installation directory ofesqlOC.

4. Open a .sqb file and compile it.

DBPRE (on GNU/Linux)

1. Download dbpre and follow the instruction for compiling. You don’t need to install it system wide, just create aclean dbpre directory in your home folder where you you copy the following files:

• dbpre executable

• cobmysqlapi.o

• the copybooks: PGCTBBAT, PGCTBBATWS and SQLCA

The dbpre directory should look like that:

1.5. Advanced topics 31

Page 36: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

2. Run OpenCobolIDE and open the preferences dialog.

3. Go to the SQL Cobol setting tab

4. Specify the path to the dbpre executable, cobmysqlapi.o and the directory that contains the copybooks

5. Setup the DB connection parameters to connect to your test db$

6. Go to the compiler settings tab

7. Add a new library path that points to: /usr/include/mysql

8. Add mysqlclient to the libraries.

9. Open a .scb file, compile and enjoy!

Here are some screen-shots of a working configuration:

DBPRE configuration:

32 Chapter 1. Parts of the documentation:

Page 37: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

Compiler configuration:

1.5. Advanced topics 33

Page 38: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

Developer mode

By default, OpenCobolIDE embeds a series of third party libraries and modify python’s sys import path to always loadthe bundled libraries first. Those libraries are bundled inside the opencobolide python package (this path is internallyused to set the OCIDE_EXTLIBS_PATH environment variable).

This behaviour can be changed by setting the OCIDE_DEV_MODE environment variable to 1. If you do so, you’llneed to install the required third-parties yourself. This can be done easily by running the following command at theroot of the OpenCobolIDE’s source directory:

pip install -r requirements.txt

Tips and tricks

Calculate the offset of a selected record

Since version 2.2, you can now calculate the offset of a selected record.

• select the text that contains the record you’re interested in,

• right click on the editor to open the context menu

• click Calculate PIC offsets.

• a new side panel will open and will show you a table with the offset of each selected record:

Switching to a full dark style

Since version 2.2, OpenCobolIDE comes with a dark style sheet.

34 Chapter 1. Parts of the documentation:

Page 39: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

To activate it, open the preferences dialog (Edit->Preferences). Then go to the Style page and click on the Dark radiobutton.

Your IDE should look like that:

1.6. Tips and tricks 35

Page 40: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

Note: Switching the dark style on will change the editor color scheme.

Note: Since v4.0, you can also change the icon them on linux.

Switching between classic view and minimal view

Version 4.0 allow you to switch between a classic view (where the menu and toolbars are visible) to a minimal viewby double clicking on an editor tab.

The minimal view looks like that:

_static/MinimalViewWithNumbers.png

To access the application menu, just click next to the last open editor (1). To compile and run the file, use the buttonslocated inside the editor widget (2).

Splitting an editor

Starting from version 4.2, you can split an editor vertically or horizontally.

To do that, right click on the editor tab you want to split and select Split->Horizontally or Split->Vertically.

36 Chapter 1. Parts of the documentation:

Page 41: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

FAQ

1) Where are the generated binaries?

The executable program or module can be found in the bin folder next to your source file

2) I cannot compile on Windows. What can I do?

(the compiler freeze or I get a execution error)

First ensure that you do not have a conflicting installation of MinGW in your PATH. If yes, remove it.

If the problem persists, do not hesitate to open an issue.

OpenCobolIDE is known to work on Windows (from Windows Xp, to Windows 10).

Chances are that the issue come from your configuration.

3) Cannot detect OpenCOBOL compiler on Mac OSX. What can I do?

If you installed the GnuCOBOL compiler in a non-standard path, you will have to tell OpenCobolIDE where to look.

You can specify the path to the compiler in the preferences dialog (Build & Run tab).

4) Cannot compile source code that contains EXEC SQL statements. What can Ido?

GnuCOBOL does not support EXEC SQL statements. You need to use a COBOL precompiler that will convert yoursql statements to regular COBOL code that can be compiled with GnuCOBOL.

Read the SQL COBOL Guide.

5) OpenCobolIDE failed to open a file due to an encoding issue. What can I do?

OpenCobolIDE does not detect file encoding automatically. It first tries with your locale file encoding (e.g. UTF-8on GNU/Linux and Mac OSX and whatever windows-XXX encoding on Windows). If that fails, the editor will openwith a blue panel at the top asking you to select another encoding and retry:

1.7. FAQ 37

Page 42: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

1. You must choose another encoding from the character encoding combo box. This combo box contains yourpreferred file encodings. Usually there is only one entry in this list and you need to add a new file encoding toyour preferred encodings. To do that, click on Add or remove.

38 Chapter 1. Parts of the documentation:

Page 43: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

2. Add one or more file encodings from the Available encodings to your Preferred encodings andclick on Ok.

3. Select the encoding to use in the Character encoding‘‘combo box and click on ‘‘Retry‘

1.7. FAQ 39

Page 44: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

If you selected the correct encoding, the file should now load properly in the editor. If not, try another encoding...

6) Where can I find OCIDE’s log file?

You can find the OCIDE log file here:

• %USERPROFILE%/OpenCobolIDE/cache/OpenCobolIDE.log on Windows

• ~/.cache/.OpenCobolIDE/OpenCobolIDE.log on GNU/Linux

• ~/Library/Caches/OpenCobolIDE/OpenCobolIDE.log on OSX

7) Using paths with spaces in extra compiler flags

Paths with spaces should now be working as long as you wrap the with quotes:

-I "D:\my test"

Note that if you’re using a mingw based compiler, you will need to escape whitespaces:

-I "/d/A\ path\ with\ some\

Contributing

OpenCobolIDE is an open-source project, and it needs your help to go on growing and improving.

You can contribute in many different ways:

• reports new bugs/features on the issue tracker

• fork the project and send pull requests to merge your work

If you have any question, just open an issue on the issue tracker.

It might also be worth checking the OpenCobolIDE’s wiki (for developers and contributors).

Since v4.3.1, you can report a bug from within the IDE (? -> Report a bug). The first time you use it, it will promptyou for your github credentials in order to generate a personal access token that is needed to submit a bug report usingyour credentials. This tool will automatically send the system information and the application log, you just have towrite a short title and description.

Recommendation for submitting a bug report:

To submit a valuable bug report, the following information is required:

• Operating System

• Desktop Environment (for GNU/Linux only)

• Describe the way you installed the IDE (for GNU/Linux only): pip or apt-get or another method?

• Include the Application log output content (?->About OpenCobolIDE->Log)

Starting from v4.2, there is a report bug menu action (?->Report a bug) that will open your web browser to the githubbug tracker with a prefilled report template.

40 Chapter 1. Parts of the documentation:

Page 45: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

Recommendations for submitting pull requests:

Pull Requests are great!

1. Fork the Repo on github.

2. Create a feature or a bugfix branch before you start coding.

3. If you are adding functionality or fixing a bug, please add a test!

4. Add your name to AUTHORS.rst

5. Push to your fork and submit a pull request to the master branch.

Please use PEP8 to style your code (PEP8 compliance is tested Travis CI).

You can check pep8 compliance before pushing by running the test suite with the –pep8 option:

($ pip3 install pytest-pep8)$ python3 runtests.py --pep8 -m pep8

License

OpenCobolIDE is licensed under the GPL v3.

• What’s New? What’s new since the last release, and what is planned for the next one.• Download & Install Instructions on where and how to install OpenCobolIDE.• Getting started Getting started with OpenCobolIDE• Application preferences Description of the application preferences settings• Advanced topics Covers some more advanced topics• Tips and tricks Tips & Tricks• FAQ Frequently asked questions

1.9. License 41

Page 46: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

42 Chapter 1. Parts of the documentation:

Page 47: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

CHAPTER 2

Meta information:

• Contributing How to contribute and report bugs• License OpenCobolIDE license

43

Page 48: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

44 Chapter 2. Meta information:

Page 49: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

CHAPTER 3

Indices and tables:

• genindex

• search

45

Page 50: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

OpenCobolIDE Documentation, Release 4.7.6

46 Chapter 3. Indices and tables:

Page 51: 補助教材 - OpenCobolIDE Documentation · 2019-06-16 · OpenCobolIDE Documentation, Release 4.7.6 •improved indentation in fixed mode (TAB/SHIFT+TAB) •add support for going

Index

Aadvanced, 41

Ccontribute, 43

Ddownload, 41

Ffaq, 41

Ggetting_started, 41

Llicense, 43

Ssettings, 41

Ttipsandtricks, 41

Wwhats_new, 41

47