=========================================================================
M I C R O F O C U S C O B O L
V3.2.20
Running Under The DG/UX
Operating System Version 5.4.3
On The AViiON
=========================================================================
COMPATIBILITY WITH PREVIOUS RELEASES
====================================
TABLE OF CONTENTS
=================
INTRODUCTION
COMPATIBILITY ISSUES IN RELEASE V3.2
COMPATIBILITY ISSUES IN RELEASE V3.1
COMPATIBILITY ISSUES IN RELEASE V3.0 REVISIONS ABOVE 50
COMPATIBILITY ISSUES IN RELEASE V3.0
COMPATIBILITY ISSUES IN RELEASE V1.3
COMPATIBILITY ISSUES IN RELEASE V1.2
COMPATIBLE CHANGES IN COBOL/2 V1.3.0
COMPATIBLE CHANGES IN COBOL/2 V1.2.0
COMPATIBLE CHANGES IN COBOL V3.0 REVISIONS ABOVE 50
COMPATIBLE CHANGES IN COBOL V3.1
INTRODUCTION
============
This document is for use when maintaining applications created using
earlier releases of this product. It describes the differences that may
cause problems, and ways of overcoming these problems. It includes
documentation of obsolete features no longer documented in the manuals
but maintained for compatibility.
This document is cumulative; it is carried forward from one release of
the COBOL system to the next, with a new section being added each time
for the latest release. The text of existing sections is not updated
except for corrections. Phrases like "the latest product" and "earlier
products" are therefore relative to the release when the section was
written. For example, when the section "Compatibility Issues In Release
V3.0" talks about "previous releases" it means releases before V3.0.
This document consists of main sections with subsections; the title of
each main section indicates the release when it was added. To make
browsing easier, the release is also shown beneath the title of each
subsection. From July 1993, any correction added in a later release to an
existing section is followed by a line indicating when it was added; the
reference number (PDR number) of the correction is also given, if any.
Separate sections later in the document summarize other changes, that
are not expected to cause problems.
Releases of this product before V3.0 were called COBOL/2.
COMPATIBILITY ISSUES IN RELEASE V3.2
====================================
Reserved Words
========V3.2==
o The default setting of the MF directive is now MF(10), which may
cause some data-names to be illegal as the reserved word list has
been extended. If you have this problem, either change the data-name,
use the REMOVE(reservedword) directive or recompile with MF(9).
New reserved words included when using MF(10) are:
TYPEDEF REPEATED OMITTED
The new MFOO directive causes the following words to become reserved:
SELF SELFCLASS OOSTACKPTR SUPER FACTORY METHOD OBJECT
INHERITING OBJECT-STORAGE PRIVATE PUBLIC INVOKE END-INVOKE
INVOKED
Changes in System Behavior
====================V3.2==
COBOL System Library Routines
-----------------------------
o One of the COBOL system library routines provided in earlier
releases as call-by-number has been replaced by call-by-name
routines. We recommend that you replace all call-by-number routines
by their equivalent call-by-name routines. The replaced
call-by-number routine is documented in the section "Call-By-Number
Routines" below.
Routine Summary
------- -------
82 Put a character to the Screen
Environment Variables
---------------------
o The COBNOFED environment variable is no longer supported.
File Handling
-------------
o The default lock mode has changed from 0 to 2.
Run-time Configuration
----------------------
o The default setting of the run-time tuneable lock_mode has changed
from 0 to 2.
Screen Handling
---------------
o The default effect of LOWLIGHT has changed to Dim, if it's defined in
terminfo.
Previously, if Dim was defined in terminfo, Normal (and Lowlight)
text was Dim and Highlight text became standard intensity. This old
behavior can be got by using the new COBATTR=4 setting.
Previously, a COBATTR=1 setting would override the (old) default and
have Highlight as bold (if defined in terminfo) and normal text as
standard intensity - even if Dim was defined in terminfo. Lowlight
was always the same as Normal and so would be standard intensity as
well. This behavior is still supported.
The new default (COBATTR unset or COBATTR=0 ) has Highlight as Bold,
if defined in terminfo, or standard intensity otherwise; Normal
text as standard intensity; Lowlight as Dim, if defined in terminfo,
or standard intensity otherwise.
Signal Handling
---------------
o The default signal handling used by the COBOL run-time system has
changed to the more robust sigaction() interface, in place of the
signal() interface, on platforms that support it. This will not
cause any difference in behavior, except possibly if you are setting
up your own signal handlers. You can get the old behavior
by using the signal_interface run-time tuneable.
Call-By-Number Routines
=================V3.2==
To enable you to maintain existing applications, the call-by-number
routine that has been replaced by call-by-name routines is documented
here.
The replacement CBL_ routines are in the chapter Library Routines
(Call-by-Name) in the COBOL System Reference.
Put a Character to the Screen
-----------------------------
CALL x"82" USING character
where:
character is a PIC X COMP-X field containing the character to be
displayed at the current cursor position.
This routine displays a character on the screen and is available for use
only on UNIX.
This routine has been replaced by CBL_GET_CSR_POS and
CBL_WRITE_SCR_CHARS.
COMPATIBILITY ISSUES IN RELEASE V3.1
====================================
Changes in System Behavior
====================V3.1==
Compiler (Directives)
---------------------
o The OSVS, VSC2, DOSVS and COBOL370 directives now prevent checking of
minimum record lengths.
o The FILECASE directive is no longer documented. It is still supported
by the software for compatibility with earlier versions of the COBOL
system, but it may be removed in a future version.
o PIC N support and the DB space value are now affected by the NCHAR(2)
and DBSPACE directives. The default is NCHAR(2) DBSPACE. For
compatibility with previous products use NCHAR(1) NODBSPACE.
o The RW directive has been made obsolete by incorporating the Report
Writer reserved words into the main dialects that support Report
Writer. If you have a program that uses some Report Writer reserved
words as data-names, and used to be compiled with the NORW
directive, then you need to replace the NORW directive by USE(NORW).
This will cause the Report Writer reserved words to be removed from
the reserved word list, making them available for use as data-names.
COBOL System Library Routines
-----------------------------
o Some of the COBOL system library routines provided in earlier
releases as call-by-number have been replaced by call-by-name
routines. We recommend that you replace all call-by-number routines
by their equivalent call-by-name routines. The replaced
call-by-number routines are documented in the section "Call-By-Number
Routines" below.
Routine Summary
------- -------
83 Read a character from the keyboard
8C Split a file-name
8D Join a file-name
B7 Control screen I/O
B8 Control screen I/O
D9 Test keyboard status
E6 Move cursor
Linking
-------
o You can no longer statically link the compiler with other
programs.
o On Windows 3.0, the .DEF file produced by the Generator is now put in
the same directory as the .OBJ and .LNK files.
Call-By-Number Routines
=================V3.1==
To enable you to maintain existing applications, the call-by-number
routines that have been replaced by call-by-name routines are documented
here.
The replacement CBL_ routines are in the chapter Library Routines
(Call-by-Name) in the COBOL System Reference.
Read a Character from the Keyboard
----------------------------------
CALL x"83" USING character
where:
character is a PIC X field that contains the character that
is returned.
Call x"83" accepts a character from the keyboard.
This routine has been superseded by CBL_READ_KBD_CHAR.
You can use this routine only after you have used Extended ACCEPT/DISPLAY
syntax - the full-screen ACCEPT/DISPLAY statements supported by the adis
module - in your application. For example, the statement:
DISPLAY SPACES AT 0101
uses adis (to clear the screen), and after using it you can use this
routine.
Split a File-name
-----------------
CALL x"8C" USING filespec, directory, file-name, extension
where:
filespec is a PIC X field of variable length, but not less than
101 bytes, containing the full file specification.
directory is a PIC X field of variable length, but not less than
101 bytes, containing the directory path-name.
file-name is a PIC X field of variable length, but not less than
15 bytes, containing the name of the file.
extension is a PIC X field of variable length, but not less than
15 bytes, containing the file-name extension.
Call x"8C" enables you to separate the standard file-names into their
component parts. The component parts of a file-name are the directory
(for example, /usr/demo), the name itself (for example, prog) and the
file extension (for example, cbl) which together form the file
specification (for example, /usr/demo/prog.cbl).
The split file-name routine takes the string found in filespec and stores
its component parts in directory, file-name and extension.
This routine has been superseded by CBL_SPLIT_FILENAME.
Join a File-name
----------------
CALL x"8D" USING filespec, directory, file-name, extension
where:
filespec is a PIC X field of variable length, but not less than
101 bytes, containing the full file specification.
directory is a PIC X field of variable length, but not less than
101 bytes, containing the directory path-name.
file-name is a PIC X field of variable length, but not less than
15 bytes, containing the name of the file.
extension is a PIC X field of variable length, but not less than
15 bytes, containing the file-name extension.
Call x"8D" enables you to join the parts to make a standard file-name.
The component parts of a file-name are the directory (for example,
/usr/demo), the name itself (for example, prog) and the file extension
(for example, cbl) which together form the file specification (for
example, /usr/demo/prog.cbl).
The join file-name routine takes the strings found in directory,
file-name and extension and combines them to form a complete file
specification which it stores in filespec.
The Micro Focus COBOL system uses the split and join file-name routines
to:
o produce default listing and intermediate code file-names from the
source file-name
o produce overlay names
o produce file-names for segments and the intersegment reference files
The values allowed in filespec, directory, file-name, and extension must
conform to the standards described in the documentation supplied with
your UNIX operating system, and each data item must end with a space
character. You must ensure that the area allocated in the Working-Storage
Section for each data item is not less than the minimum length given
above.
This routine has been superseded by CBL_JOIN_FILENAME.
Delete a File
-------------
CALL x"91" USING result, function-num, file
where:
result is a PIC 9(2) COMP-X field that contains zero if the call
is successful, or non-zero if not successful. The number
returned for unsuccessful calls varies according to
function-num.
function-num is a PIC X COMP-X field that containing the function
number 18.
file is a PIC X field of variable length that identifies the
file on which this subprogram is to work. The format for
file is:
01 file.
03 file-name-length pic 9(2) comp-x.
03 file-name pic x(nn).
Routine x"91" functions impose heavy size penalties as they need a large
number of support routines.
This routine has been superseded by CBL_DELETE_FILE.
Control Screen I/O
------------------
Two call-by-number routines are available for controlling screen I/O:
x"B7" and x"B8".
CALL x"B7" USING function, parameter, buffer
where:
function is the name of a PIC 9(2) COMP-X data item whose value
indicates which of the subprograms controlled by this call
code is to be called.
parameter is a group item consisting of three data items:
o a PIC 9(4) COMP-X field showing the length
of the data to be read or written.
o a PIC 9(4) COMP-X field giving the start
position on the screen. Top left is position 1,
81 is the start of the next line, assuming an 80
column display.
o a PIC 9(4) COMP-X field showing the start
position in the buffer, starting from position 1.
buffer is the COBOL data area. It is a PIC X (n) field and
may be as large or as small as you require in order to
write your data.
function can take any of the following values:
Value Description
----- -----------
10 Read a string of characters from the screen.
11 Write a string of characters to the screen.
12 Read a string of attributes from the screen.
13 Write a string of attributes to the screen.
14 Clear a specified string of consecutive character
positions to spaces.
15 Clear a specified string of consecutive character
positions to normal attributes.
16 Write a specified character to a string of consecutive
character positions.
17 Write a specified attribute to a string of consecutive
character positions.
The structure of the attribute byte is given in the appendix Display
Attributes in your COBOL System Reference.
Call x"B7" gives access to a number of subprograms that control screen
output. These subprograms cause the COBOL screen handling system to be
invoked. See the chapter Comparison of Screen Handling Methods in your
COBOL User Guide for details.
While call x"B7" provides you with the means for direct screen handling
from COBOL, the Micro Focus COBOL system also supports additional
screen-handling calls which are designed to be used from C. See the
chapter Interfacing and Mixed Language Programming in your COBOL User
Guide for full details on these additional calls.
Note:
Use of the x"B7" routine results in code that is not portable to other
environments. If you are using an add-on product you can provide generic
color support by using the generic attribute routines described in the
chapter Additional Library Routines in your Toolset Reference.
The x"B7" function 10 has been superseded by CBL_READ_SCR_CHARS.
The x"B7" function 11 has been superseded by CBL_WRITE_SCR_CHARS.
The x"B7" function 12 has been superseded by CBL_READ_SCR_ATTRS.
The x"B7" function 13 has been superseded by CBL_WRITE_SCR_ATTRS.
The x"B7" function 14 has been superseded by CBL_WRITE_SCR_CHARS.
The x"B7" function 15 has been superseded by CBL_WRITE_SCR_ATTRS.
The x"B7" function 16 has been superseded by CBL_WRITE_SCR_N_CHAR.
The x"B7" function 17 has been superseded by CBL_WRITE_SCR_N_ATTR.
CALL x"B8" USING function, parameter, text-buffer, attribute-buffer
where:
function is the name of a PIC 9(2) COMP-X data item whose value
indicates which of the subprograms controlled by this call
code is to be called.
parameter is a group item consisting of three data items:
o a PIC 9(4) COMP-X field showing the length
of the data to be read or written.
o a PIC 9(4) COMP-X field giving the start
position on the screen.
o a PIC 9(4) COMP-X field showing the start
position in the buffer, starting from position 1.
text-buffer is a COBOL data area. It is a PIC X(n) field and may be as
large or as small as you require in order to read or write
your text.
attribute-buffer
is a COBOL data area. It is a PIC X(n) field and may be as
large or as small as you require in order to read or write
your text. The structure of the attribute byte is given in
the appendix Display Attributes.
function may take any of the following values:
Value Description
----- -----------
10 Read strings of text and attributes from the screen.
11 Write strings of text and attributes to the screen.
12 Swap the text and attributes on the screen with those in
the text and attribute buffers respectively.
Call x"B8" gives access to a number of other subprograms that affect
screen input and output.
While call x"B8" provides you with the means for direct screen handling
from COBOL, the Micro Focus COBOL system also supports additional
screen-handling calls which are designed to be used from C. See the
chapter Interfacing and Mixed Language Programming in your COBOL User
Guide for full details on these additional calls.
The x"B8" function 10 has been superseded by CBL_READ_SCR_CHATTRS.
The x"B8" function 11 has been superseded by CBL_WRITE_SCR_CHATTRS.
The x"B8" function 12 has been superseded by CBL_SWAP_SCR_CHATTRS.
Test Keyboard Status
--------------------
CALL x"D9" USING parameter
where:
parameter is the name of a PIC 9(2) COMP-X item. The routine returns
a zero value in parameter if there is no character waiting
to be read, or a non-zero value if there is a character
waiting to be read.
Call x"D9" determines whether or not there is a character waiting
to be read from the keyboard.
You can use this routine only after you have used Extended ACCEPT/DISPLAY
syntax - the full-screen ACCEPT/DISPLAY statements supported by the adis
module - in your application. For example, the statement:
DISPLAY SPACES AT 0101
uses adis (to clear the screen), and after using it you can use this
routine.
This routine is superseded by CBL_GET_KBD_STATUS.
Move the Cursor to a Defined Position
-------------------------------------
CALL x"E6" USING result, parameter
where:
result is not used.
parameter is an 01 level item containing the following:
03 row-number pic 9(2) comp-x.
03 column-number pic 9(2) comp-x.
The value of row-number should be in the range 0 to x, where x is the
number of lines on the screen minus 1. The value of column-number should
be in the range 0 to y, where y is the number of columns on the screen
minus 1. The number of rows and columns on the screen are defined in the
terminfo database in the variables lines and cols respectively. For
details on terminfo, see the chapter "Device Handling and Terminfo" in
your COBOL System Reference.
Call x"E6" positions the cursor at the specified screen position.
This routine has been superseded by CBL_SET_CSR_POS.
COMPATIBILITY ISSUES IN RELEASE V3.0 REVISIONS ABOVE 50
=======================================================
Release V3.0.51 is a re-release of V3.0. Consequently this section
applies if you are using any revision of V3.0 above V3.0.50.
Changes in System Behavior
=================V3.0.50==
Compiler Directives
-------------------
o In V3.0 before this release, NOFP-ROUNDING had the same effect as
FP-ROUNDING"OSVS". In this release, when NOFP-ROUNDING is specified
no rounding is done for fixed point targets in calculations involving
floating-point operands unless the ROUNDED phrase is explicitly used
in the source.
Reference Modification
----------------------
o In previous products, although it was documented as illegal, the use
of a negative result in a reference modification operation would be
allowed. However, the results were and still are undefined.
An overall result to be used for reference modification must be a
non-zero positive integer. However, in previous products, due to a
bug in the run-time system, if a negative result was used to
determine the length of a portion of a data item for the purposes of
reference modification the negative result was converted to a
positive one.
Although it is legal to use negative values in a reference
modification calculation, as long as the calculated result is a
positive non-zero integer, the bug in the run-time system had the
effect that those negative values were converted to positive also.
Therefore reference modification would work incorrectly when
negative values were being used to arrive at an overall positive
result. For example, the following program shows the problem:
working-storage section.
01 a pic x(10) value "ABCDEFGHIJ".
01 b pic s9(1) value -3.
procedure division.
display a(1:b + 4)
stop run.
The correct behavior of the above program is to display "A".
Instead, because of the run-time system bug in previous products,
the value held in data item b was converted to a positive value,
+3, and the program displayed "ABCDEFG".
Another consequence of this behavior was that the following example
code could be executed, simply because the negative value used was
changed to a positive one. Again it should be noted that it is not
legal in this COBOL system to use a negative result to reference
modify and therefore the program below is illegal as it uses illegal
values.
working-storage section.
01 a pic x(10) value "ABCDEFGHIJ".
01 b pic s9(1) value -3.
procedure division.
display a(1:b).
stop run.
The bug in the RTS which caused the negative to change to a
positive value was in the logic for the MOVE statement. It had
implications for explicit MOVEs, as well as for the implicit MOVEs
produced during reference modification. Obviously when this problem
was corrected, the result was that negative values stayed negative.
As a result the program above now produces different behavior.
The result of incorrect reference modification in this release of
the product is undefined, but usually an operating system
error will result. The operating system error occurs in this
instance because at the current product level we cannot detect any
attempt to perform this illegal operation, either when the program
is compiled or run, and as a result no run-time error can be
generated. This behavior will occur in any new programs that you
write if you are using illegal values, or when running existing
programs that contain illegal values as illustrated above.
If you have any code that uses a negative result to calculate the
length or portion of a data item for the purposes of reference
modification, you should amend your code so that the operation
results in positive values.
COMPATIBILITY ISSUES IN RELEASE V3.0
====================================
Releases of this product before V3.0 were called Micro Focus COBOL/2.
This section gives changes since COBOL/2 V1.3.0.
Changes in System Behavior
====================V3.0==
Animating
---------
o If you animate your program when the COBCTRLCHAR environment variable
is set, you must use cobrun +A to invoke the animator.
o To animate code which has been compiled on versions of Micro Focus
COBOL pre-Micro Focus COBOL/2 version 1.3.0, you will need to
recompile the source program first under this Micro Focus COBOL
system.
Compiling
---------
o The behavior of the BLANK LINE clause in the Screen Section has
changed. Formerly it behaved exactly the same as ERASE EOL; that is
all characters to the right of the cursor were deleted. Now it causes
the whole line to be deleted. You can get the old behavior by
specifying the OLDBLANKLINE directive.
o The RMMOVE directive has been removed.
o The default for the OSVS Compiler directive has changed from OSVS to
NOOSVS.
o COMP-6 is now supported at run time and when animating. To turn on
this support, you need to set the following directives:
COMP-6
ADDRSV(COMP-6)
o Multiple cobruns using the COBOL profiler (cobprof): in previous
versions of Micro Focus COBOL, the "Module called" count was not
incremented by multiple cobruns of a program. In this version, the
count is incremented, meaning that you can now run a program multiple
times, choosing several different options within the program, and can
obtain a combined set of statistics, showing which parts of the
program are used the most often. You get the former behavior by
removing the .ipf file before running your application.
o The following Generator directives are no longer supported:
NOCOMMS
NOFASTLINK
NOLIST
NOOPTSIZE
NOOPTSPEED
NOSTATS
NOTRICKLE
The NOBOUND Generator directive now applies only to table bounds, and
not to PERFORMs.
Forms-2
-------
o You must regenerate any index programs which you have created under
previous versions, so that the correct file status is returned.
Program Search Order
--------------------
o Under Micro Focus COBOL V3.0, the program search mechanism has been
enhanced so that it is configurable via the cobconfig environment
variable program_search_order to produce three different search
sequences. The first is the new default. The second is for
compatibility with previous UNIX versions of the Micro Focus COBOL
product. The third is for compatibility with DOS.
However, if a program is called with a specific path, the search
sequence is not affected by the program_search_order cobconfig
variable, and follows steps 1 and 2 below:
1. The run-time system is checked to see if the program is
statically linked.
2. The path specified in the call is searched.
Unix key mappings
-----------------
o In order to enhance the usability of the UNIX key mappings for
terminals which do not support the full range of function keys
expected by the Micro Focus COBOL system, two of the existing
mappings have been altered to avoid possible confusion with other
mappings:
Function Key Mapping under V3.0 Mapping under V1.3.0
============ ================== ====================
Help /? /H
Caps Lock /u /C
(uppercase)
All other key mappings remain unchanged. See the appendix UNIX Key
Mapping in your COBOL System Reference for details.
Obsolete Features
===========V3.0==
This section describes features supported for compatibility with previous
releases. We recommend that you do not use them in new applications.
Calling Non-COBOL Subprograms
-----------------------------
This COBOL system enables you to call non-COBOL subprograms by using the
standard COBOL CALL statement. However, for compatibility with existing
Micro Focus COBOL products, you also can call a non-COBOL subprogram by
supplying a numeric value, which is interpreted by the RTS as an index
into its run-time subprogram table. The RTS uses this table entry to
locate the object code of the called subprogram, which might have been
written in C or some other language. For example:
CALL "7" USING...
or:
CALL SPR-INDEX USING...
where SPR-INDEX is an alphanumeric item whose value is a valid run-time
subprogram table index.
Before you can call such subprograms, you must incorporate them into the
RTS. The issued software includes, in libcobol.a, all of the modules
necessary to create a standalone COBOL RTS which includes a dummy version
of the run-time subprogram table. The source of the run-time subprogram
table is also supplied in usercall.c.
To incorporate a non-COBOL subprogram into the RTS:
1. Modify usercall.c to create an entry for the subprogram in the RTS
run-time subprogram table. See below for a detailed description of
how to do this.
2. Include usercall.c on the cob command line. For example:
cob -xo rts32 -e "" prog1.cbl prog2.cbl usercall.c
3. Move the user RTS to /usr/lib/cobol, or to the directory pointed to
by the COBDIR environment variable, where it can be accessed by
cobrun.
The module usercall.c contains a function xequcall( )<$Ixequcall()
function>. It is this function that you modify to incorporate a
subprogram into the RTS.
The xequcall( ) function consists of a single switch statement, where
each case clause in the switch corresponds to a single subprogram
incorporated in the RTS. Incorporating a new subprogram means adding a
new case clause to the switch in xequcall( ). However, before updating
the switch in xequcall( ), you must understand how the RTS handles CALL
and the parameters passed with it.
When the RTS processes a CALL, it goes through an internal CALL executor,
which determines the type of call and accesses the appropriate table to
find the routine. All of the arguments following USING are COBOL data
names. The absolute addresses of these items are placed in the global
calargv[ ] array, and the count is assigned to calargc. These are
analogous to the argv/argc structure with which a C program is invoked.
For instance, if a COBOL program included the following sentence:
CALL "1" USING A, B.
then calargv[0] would contain the address of data item A, calargv[1]
would contain the address of data item B, and calargc would have the
value 2. The data items can be numeric or alphanumeric strings. If you
use COMP variables, note that the byte order might differ from that of
the machine. In COBOL, the highest order byte is always first.
If the CALL parameter is numeric, as in the example above, this indicates
that the call is to a user routine in the RTS, rather than to another
COBOL program, and the xequcall( ) function is called.
Non-COBOL Programs Calling COBOL Subprograms
--------------------------------------------
Under previous Micro Focus COBOL products you had to use cobcall when
calling a COBOL subprogram from a program written in a language other
than COBOL. cobcall is still supported for compatibility purposes.
COBOL Capabilities File (cobcap)
--------------------------------
In this release of the Micro Focus COBOL system, file-name mapping
enables you to make use of advanced file assignment facilities. In
previous releases, such file assignment facilities were handled by the
COBOL capabilities file, cobcap. cobcap is still supported for
compatibility purposes.
COBCTRLCHAR Environment Variable
--------------------------------
Earlier Micro Focus COBOL products display certain attributes on the
screen by displaying Escape sequences. In this version of Micro Focus
COBOL, this is not supported as it has been replaced with extended ACCEPT
and DISPLAY syntax. However, if for compatibility purposes you need to
display Escape sequences, you can do so by displaying the control code
for the required attribute. When doing this, you must ensure that the
COBCTRLCHAR environment variable is set to Y. Since displaying control
codes impairs performance, you are strongly advised to use the extended
ACCEPT and DISPLAY syntax instead.
Additionally, COBCTRLCHAR imposes a number of restrictions:
o Programs containing Escape sequences cannot be animated.
o Automatic new line handling is not supported and all output goes
directly to the terminal. It is, therefore, your responsibility
either to use explicit cursor addressing, or to ensure that the
correct control codes are output for that particular terminal in your
particular configuration.
Commands to Invoke the Micro Focus COBOL System Components
----------------------------------------------------------
In this release of the Micro Focus COBOL system, the components of the
COBOL compilation system are invoked via a single command, cob. In
previous releases each component was invoked via its own command:
o the cobol command - to invoke the Compiler
o the cgen command - to invoke the native code generator
In previous releases, if you did not specify a file extension for the
files input to these commands, cobol assumed the extension .cbl, cgen the
extension .int. In this release you must specify the file extensions
explicitly. Also, the default list of Compiler and native code generator
directives set by the cobol and cgen commands is not the same as that set
by cob.
The cobol and cgen commands are provided for compatibility with LEVEL II
COBOL/ET. You are recommended not to use these commands, but if you want
to do so, refer to your LEVEL II COBOL/ET documentation.
Optimizing Intermediate Code
----------------------------
Operating Guides for earlier Micro Focus products, such as LEVEL II
COBOL/ET, describe how to optimize intermediate code. With the Micro
Focus COBOL system, you are advised to optimize your native code versions
of your programs rather than the intermediate code versions.
Where arithmetic statements conform to the guidelines given in previous
Operating Guides, the resulting intermediate code is called
comp(utational) subset code. Comp subset code is more efficient than
intermediate code produced from arithmetic statements not conforming to
the guidelines.
However, in this version of Micro Focus COBOL, you do not need to produce
comp subset code, because generating your code makes it as efficient as
it can be. Arithmetic statements are not made any more efficient by comp
subset code.
COMPATIBILITY ISSUES IN COBOL/2 V1.3.0
======================================
This section gives changes since COBOL/2 V1.2.0.
Changes in System Behavior
=================V1.3.0===
o Dynamic memory allocation
This version will return Run-Time system error 105 if file handler
dynamic memory requests are unsuccessful. Previous versions did not
consistently detect this condition, and results were, therefore,
unpredictable.
o ON OVERFLOW
Under this version, a call with the ON OVERFLOW phrase specified,
within programs compiled with ANS85, will result in the ON OVERFLOW
path being taken if the called program is not found. Previous
versions returned a Run-time error message 173. See the CALL
Statement in your Language Reference for details.
o NOFOLDPROGID behavior
Under previous versions, this compiler directive attempted to provide
ANSI-conforming behavior in programs written in a non-conforming
manner. This caused illogical situations; therefore the directive has
been removed.
o Cobcf utility
The cobcf utility has been removed and replaced with a new facility,
cobconfig, which allows a greater range of configuration. See your
COBOL System Reference for details.
o ISAM Key Check
In version 1.2.0, fixed length ISAM files did not check the key
descriptions at open time for conflicting key definitions between the
file description and the file. Version 1.3 has been enhanced so that
variable and fixed length files both check at open time for such
discrepancies. This behavior is configurable. See your COBOL
System Reference for details.
o Overlapping moves
This version has been enhanced so that the Compiler returns warning
message 656 if overlapping moves within Working-Storage items are
identified. See your Error Messages for details.
o ANSI ACCEPT from command line
This version has been enhanced so that the first ANSI ACCEPT can take
input from either the user, or the command line, depending on the
setting of a new configuration option. See your COBOL System Reference
for details.
o FUNCTION as a reserved word
In order to maintain ANSI conformance, this version recognizes
FUNCTION as a reserved word. You should now use the REMOVE-FUNCTION
directive if your application uses FUNCTION as a data name. See your
COBOL System Reference for details.
o ASSIGN TO PRINTER File Formats
A file which is ASSIGNed TO PRINTER is now equivalent to a disk file
with sequential organization and line advancing.
o Wyse terminal support
Under previous versions, Wyse terminals were not supported, meaning
that their cursor and function keys were inoperable. These keys are
now fully operable. See your COBOL System Reference for details.
o FLAG directive
The LOW and HIGH options of the FLAG directive have been removed and
replaced with a new directive, FLAGSTD.
o PROGID-COMMENT
A new compiler directive, [NO]PROGID-COMMENT, has been added to this
version. For compatibility with earlier versions, the PROGID-COMMENT
will allow comments to follow the PROGRAM-ID clause.
o RETRYLOCK Compiler directive
This directive no longer makes use of the +R and +Q run-time
switches. See your COBOL System Reference for details.
o COMP-3 fields treated as signed
In previous versions, when you compiled RM, any unsigned COMP-3
fields were treated as signed fields. This behavior could cause file
corruptions and has therefore been removed. Note that any indexed
files created using the previous version might not return the data
you input if you recompile your source using this version of your
Micro Focus COBOL product.
o Optional-file behavior
When compiling ANS85 under Micro Focus COBOL, and attempting to open
I-O an index file which is an optional file, the file status returned
is now 05 and not 00 as under previous versions. You must either
amend any programs which explicitly check for a 00 status under these
conditions or recompile without the ANS85 directive set.
o ANS85 Compiler directive
Under versions of Micro Focus COBOL, pre-Micro Focus COBOL/2 Version
1.1, the ANS85 Compiler directive was set OFF by default. However,
under this version of Micro Focus COBOL as under versions 1.1 and
1.2, the ANS85 directive is set ON by default. In order to
successfully compile and execute programs created under a previous
version of Micro Focus COBOL, you may need to specify the NOANS85
directive when you compile them under this version of Micro Focus
COBOL. You may need to use the ANS85=SYNTAXVS15 Compiler directive
for source code developed under VS COBOL Version 1.5, where the
program depends on either the lack of range checking for moving
variable length items, or the ANS74 standard behavior for
PERFORM...VARYING. See your Language Reference for further details.
o SPZERO directive
The Compatibility Guide states that setting the RM directive
automatically sets the SPZERO directive as well. However, in your
version of the Micro Focus COBOL system, this automatic setting of
the SPZERO directive has been overridden.
The SPZERO directive was automatically set when the RM directive was
set, to allow emulation of RM/COBOL's behavior when comparing
uninitialized numeric items with zero. Under RM/COBOL this comparison
will be true, but under the Micro Focus COBOL system, with the SPZERO
directive not set, this comparison in generated code will be false.
However, using the SPZERO directive would seriously affect
performance and would cause numeric items containing alphanumeric
values not to have their most significant half-byte validated in
comparison operations in generated code. This means that emulation of
RM/COBOL's handling of alphanumeric values in numeric fields would
not be complete if the SPZERO directive was set.
If you need to emulate RM/COBOL behavior for comparisons of
uninitialized numeric fields with zero in generated code, you can do
so by setting the SPZERO directive explicitly. However, you should be
aware of the effect on performance that this will have, and the
possible effect on other results if you move alphanumeric values to
numeric fields in your program. We recommend, therefore, that you
ensure your numeric fields are correctly initialized to zero before
they are used, rather than use the SPZERO directive.
o HIGH-VALUES
The RM/COBOL system allows you to move HIGH-VALUES to a COMP-1 data
item, which results in a value of -1. The Micro Focus COBOL system,
however, will not allow you to move HIGH-VALUES to a numeric data
item because it is an alphanumeric figurative constant. If you wish
to use HIGH-VALUES to initialize data in your program in this way
under the Micro Focus COBOL system, you must amend your program by
substituting HIGH-VALUES with -1. Note that, if the -F Run-Time
switch is set, this move will be allowed under the Micro Focus COBOL
system, but the result will not be -1. See your COBOL System Reference
for details of the -F Run-Time switch.
o execerr() function renamed
The module usercall.c function execerr() has been renamed to
mFt_execerr. If you are using a usercall.c file from a previous
version of this product, you must rename the execerr() routine to
mFt_execerr() or replace your version of usercall.c with that supplied
with V1.2 of this product. If you do not, you will receive
the message:
Undefined symbol - execerr
if you try to link usercall to the rts using cob -x.
COMPATIBILITY ISSUES IN RELEASE V1.2
====================================
This section gives changes since COBOL/2 V1.1 rev 2.
Changes in System Behavior
====================V1.2==
General
-------
This version has been enhanced so that your Micro Focus COBOL system
conforms to the X/Open standard. Most of the changes enhance
functionality and will not affect existing applications. Some of the
changes, however, could affect existing applications. See the
subsection "X/Open Portability" in the section "Restrictions", and
the section "Supplementary Information", in the Release Notes for
details.
Animating
---------
o The default setting of the Animator directive SCREENPAGE has been
changed from NOSCREENPAGE to SCREENPAGE. Under Animator, if you
attempt to move the cursor to the line following the last one
displayed on the screen, the screen no longer scrolls one line but
pages up.
Compiling
---------
o The -r cob option is no longer supported.
Running
-------
o The Micro Focus File Handler and the Run-time system relative File
Handler error checking has been enhanced to ensure that the relative
key cannot exceed its picture size. In previous versions this
condition caused unpredictable results.
o Errors are now returned for path-names exceeding OSNAMESIZE, within
open, dd_ mapping and split/join. For ISAM files, Run-time error 75
("Indexed data file too long") is returned. For other files, error
188 ("File name too large") is returned.
o If you specify a directory by setting the environment variable
TMPDIR, SORT will use this as the location for its temporary work
files. If you do not set TMPDIR, the system default temporary
directory will be used. See the section "Machine Requirements" for
details.
o If your terminal and terminfo support color and you specify the
REVERSE-VIDEO reserved word, the foreground and background colors on
your screen are swapped. However, your terminfo entry ncv may prevent
this behavior.
o You can now map the output from an ASSIGN TO PRINTER by using dd_
filename mapping. See the section "Machine Requirements" for details.
o If you specify the XOPEN directive, your program's RETURN-CODE SIZE
will be 4, unless you explicitly override this by using the
RTNCODE-SIZE directive. By setting RTNCODE-SIZE to 0, no implicit
return code will be declared in the program.
o The Run-time system has been amended so that it returns a duplicate
key error if an indexed file, which has been accessed sequentially,
has a duplicate record written when the K Run-time switch is unset.
This behavior now matches that of the Micro Focus COBOL Filehandler.
COMPATIBLE CHANGES IN COBOL V3.1
================================
See your Getting Started book for these changes.
COMPATIBLE CHANGES IN COBOL V3.0 REVISIONS ABOVE 50
===================================================
The following new Compiler directives have been added:
o ADDRSV
Adds one or more specific reserved words to the reserved word list,
so that they will be recognized as reserved words within the user
program. The specified reserved words will be added whatever dialect
directives are in force.
o COBFSTATCONV
Causes mFFH to use the user-supplied module specified in the
COBFSTATCONV environment variable to convert the file status codes if
an I-O error is encountered on a file.
o COMP-6
Specifies whether COMP-6 data is to be held in binary or packed
decimal format.
o CONVERTRET
Causes COMP items specified in CALL...RETURNING and EXIT
PROGRAM...RETURNING phrases to be converted to COMP-5.
o EARLY-RELEASE
Enables use of the following Micro Focus Early User Syntax support:
CALL prototypes, OMITTED parameter and TYPEDEF phrase.
o IOCONV
Causes a straight group move for READ...INTO WRITE...FROM. Normally,
the ANSI behavior is to convert elementary record descriptions when
required. It is provided for backwards compatibility.
o NCHAR
Provides Micro Focus Double-Byte Language Extension (PIC N, Japanese
data-names and Japanese procedure-names).
o OLDSTRMIX
Allows PIC X and PIC N fields to be specified in the same STRING,
UNSTRING or INSPECT statement.
o RAWLIST
Allows a listing without page headers or other information that may
change according to date, time or compiler release to be produced.
o RDEFPTR
Causes COMP redefinitions of POINTER data items to be stored in
machine-specific format (that is, it converts such redefined fields
into COMP-5 fields).
o SOURCEFORMAT
Selects Fixed or Free format for COBOL source.
o STDERR
Causes error messages to be echoed to STDERR rather than to the
console (STDOUT).
o SYSIN
Causes ACCEPT, DISPLAY and EXHIBIT statements to be mapped onto files
SYSIN and SYSOUT.
Some additional COBOL syntax has been provided as Early Release features:
o OMITTED parameter
Enables CALL parameters to be omitted by passing a null address.
o TYPEDEF phrase
Enables a group or elementary data description to be declared as a
type definition, and allows instances of that data description to be
declared.
o CALL prototype
Provides a skeleton program which serves to define a called
subprogram's characteristics, including the number of parameters
required, the type of these parameters and the calling convention.
COMPATIBLE CHANGES IN COBOL/2 V1.3.0
====================================
This section gives changes since COBOL/2 V1.2.0.
o ISAM data record length
The maximum size of a fixed length ISAM record has been extended to
32k for compatibility with CISAM.
o SORT
COMP-5 key formats are supported in this version.
The sort speed has been greatly improved over version 1.2.0.
o EVALUATE statement
The limit on the number of cases in an EVALUATE statement has been
removed. There is now no limit.
o Conditional compilation
Conditional compilation has been extended to provide "$IF 78-name
[NOT]DEFINED". It has also removed the version 1.2.0 restriction that
the 78-level item must be numeric. See your Language Reference for
details.
o bcheck utility
The bcheck utility has been removed and replaced with an enhanced
range of new File Handler utilities. See your COBOL System Reference
for details.
o INTLEVEL
A new Compiler directive, INTLEVEL, has been implemented. This
provides a degree of portability of intermediate code across both
UNIX and DOS platforms. See your COBOL System Reference for details.
o CBL_ routines for case conversion
Two new routines, CBL_TOUPPER and CBL_TOLOWER, have been implemented.
They convert letters in a data item between upper and lower case. See
your COBOL System Reference for details.
o [NO]DETECTLOCK Compiler directive
A new Compiler directive, [NO]DETECTLOCK, has been implemented. This
causes READ statements to detect records which are locked by another
program. See your COBOL System Reference for details.
o Detection of multiple OPENs
A new cobconfig run-time configurable, same_proc_excl_detection, has
been implemented. If an exclusive OPEN request is issued for a file
that is already open, or if an additional OPEN request is issued for
a file that is already opened exclusively, these conditions will be
verified for requests issued by the same run unit. Previously,
requests from a different run unit only were verified. See your COBOL
System Reference for details of the configurable.
o Multiple periods in file-names
cob will not accept multiple periods in file-names. If you attempt to
specify more than one period, cob will generate an error message. See
your COBOL System Reference for details.
o Windowing Syntax
New windowing syntax is now available to you. This is:
- Display Box phrase
- Display Line phrase
- Display Window phrase
See your COBOL System Reference for details of this syntax.
o Defined behavior when NOONSIZE ERROR phrases specified
The CHECK directive will cause predictable behavior when NO ON SIZE
ERROR is specified and a size error occurs. See your COBOL System
Reference for details.
COMPATIBLE CHANGES IN COBOL/2 V1.2.0
====================================
This section gives changes since COBOL/2 V1.1 rev 2.
o Terminal modes
Under this version, it is possible to dynamically change to wide
terminal mode or standard terminal mode. See your COBOL System
Reference for details.
o Global mapping of file-names
This version provides you with the facility to map data files on a
global basis, giving you the ability to place working data files in a
directory whose name is not known until run-time. You do this by
setting the COBDATA environment variable. See your COBOL System
Reference for details.
o Controlling terminal printers
Your Micro Focus COBOL system now supports a number of calls,
allowing you to control a printer attached to your terminal. See your
COBOL System Reference for details.
o OSNAMESIZE value
The dd_ value has been increased so that the length of each path
within a dd_ path list may be up to the value of OSNAMESIZE. See your
COBOL System Reference for details.
o CALL USING parameters limit
The number of CALL USING parameters has increased from 63 to 255.
o OPEN EXTEND on a pipe
The behavior of an OPEN EXTEND operation on a dd_ pipe or named pipe
now matches that of an OPEN OUTPUT operation.
o ALIGN compiler option default
The default for the ALIGN compiler option has been changed to 4. This
may lead to a reduction in size of COBOL Data Divisions, but will not
necessarily result in a smaller on-disk size because the Data
Division is allocated dynamically at Run-Time.
o Dynamic Paging Buffer Switch (d)
Under this version, the Dynamic Paging Buffer Switch (d) has been
added, to allow you to specify the amount of memory, in bytes, to use
for the Run-Time system dictionary paging buffer. By increasing its
value you may be able to improve the performance of the Compiler and
Generator. See your COBOL System Reference for details.
o Sparse keys
The Micro Focus format File Handler now supports sparse keys for
variable record length files. See your COBOL System Reference for
details.
o The following new compiler directives have been added:
- ALPHASTART - sets starting point within collating sequence.
See your COBOL System Reference
- DATACOMPRESS - ISAM file data compression. See your COBOL
System Reference
- KEYCOMPRESS - ISAM file key compression. See your COBOL
System Reference
- RMMOVE - controls MOVE statements. See your COBOL
System Reference
- SYMBSTART - sets starting point within collating sequence.
See your COBOL System Reference
- XOPEN - enables X/Open XPG3 COBOL standard See your
COBOL System Reference
o The following new environment variables have been added:
- COBKEYTIMEOUT - sequence timeout length. See your COBOL
System Reference
- COBANIMOPT - specifies directives in Animator. See your COBOL
System Reference
=========================================================================
Micro Focus and Animator are registered trademarks of Micro Focus
Limited.
Micro Focus COBOL, Micro Focus COBOL/2, VS COBOL, and LEVEL II COBOL/ET
are trademarks of Micro Focus Limited.
RM/COBOL is a registered trademark of Ryan-McFarland Corporation.
X/Open is a trademark of X/Open Company Limited.
Wyse is a registered trademark of Wyse Technology.
UNIX is a registered trademark of UNIX System Laboratories Inc.
=========================================================================
@(#)Vrn/changes.1/3.2.00/29Mar94/nrV
Copyright (C) 1992-94 Micro Focus Limited