- The CobCurses User Guide including installation.
- The CobCurses Programming Guide
- CobCurses Utility Programs and commands
- Indexed files used by CobCurses
The CobCurses Project OverviewThe prime motivation for this project was that the necessary support for screens was not available in the Open-Cobol
However, even if support for the SCREEN SECTION existed, there are still good reasons to implement an improved and more interactive method of communicating with your end user. Not only can users perform advanced emacs-like editing features within a field, the simple cursor oriented functions exist as well.
One major benefit for the programmer is that large fields can be "windowed". For example, data entry and editing can occur on a 1024 character book title, while only allocating a text window of 60 columns on the screen for it. The window automatically scrolls according to the position of your cursor. This frees your program from having to make special allowances for fields that cannot fit on the screen.
The CobCurses project supports two modes of operation:
- Action mode
- 3270 mode
The action mode screens are very interactive, and can support interactive browse features for example. This allows the user to enter a partial key in a search field, and then use the cursor up and down keys to find the prior (or next) records based upon that key.
3270 mode allows a simpler program design, emulating to a limited degree, a block mode terminal. The user is free to navigate between all of the fields that are presented (that are not read-only), and control returns to the application only after the Enter (return) or a function (PF) key was pressed. The application can then do further validation of the data, and if necessary, point to the field in error, and re-invoke the 3270 state machine for further interaction with the user, if necessary.
Both types of screens are supported by the use of Screen Designer and a code generator tools. Information about the screens designed are maintained in a small database of COBOL indexed sequential files that can be unloaded to text files for backup. Using the screen designer, the programmer can:
- use the Screen Painter to establish the background text of the screen
- use the Field Definition and Maintenance Screen to define screen fields, and their options
- use the Field State Definition and Maintenance Screen to define field states (for action mode screens)
- use the Character Set Maintenance Screen to define special character sets to restrict designated input fields to.
Additionally, there are several options to help with the validation of input fields, and to deal with numeric fields. Action mode screens use a callback mechanism to implement a powerful but extensible framework for your COBOL screens. All of these features combine to reduce the pain of creating a COBOL screen.
CobCurses provides its screen handling through the use of the venerable curses(3X)/ncurses(3X) open systems libraries. This makes CobCurses well positioned for supporting COBOL code on open platforms of your choice. While CobCurses provides high level interfaces for fields and screens, it is still possible to interact at a lower level, using curses(3X) like calls, for programs that require it.
These are some of the many reasons why a COBOL programmer should consider using CobCurses for their next Open-Cobol screen project.