HP 3000 Manuals

New Components and Features [ COBOL/HP-UX Getting Started for the Series 700 and 800 ] MPE/iX 5.0 Documentation


COBOL/HP-UX Getting Started for the Series 700 and 800

New Components and Features 

Animator 

   *   You can choose between having the advanced features described
       below and a more compact version of Animator for use when memory
       is limited.

   *   The number of programs that can be animated at one time (as part
       of the same application) has been increased to around 200,
       depending on program type and features.

   *   You can monitor many data items simultaneously, each displayed in
       a window on the screen.  The windows are positioned on the screen
       automatically, stacking on the right hand side of the screen from
       the bottom up, or they can be moved to a position you choose.  The
       windows can also be sized, hidden, and automatically tidied.

   *   You can see data values before and after a statement is executed
       by executing two "half-steps".  Animator recognizes the data items
       in the statement and shows the values before and after the
       statement is executed.  (Function called Watch).

   *   You can watch the program executing at controllable speeds
       displaying values of data items before and after each statement is
       executed (Function called Animate).

   *   You can set a breakpoint on a data item so that, when the contents
       change, program execution is interrupted at the statement
       immediately after the statement causing the change.

   *   You can set a breakpoint on the current line and switch
       immediately into Zoom mode (executing the program at full speed).
       (Function called Breakpoint/Zoom).

   *   Lines on which breakpoints have been set are highlighted in the
       source display.

   *   You can ask for the user screen to be displayed after the
       execution of each statement.  This can be useful when non-COBOL
       subprograms which interact with the screen are called.

   *   When executing code within one or more PERFORM paragraphs, you can
       ask Animator to show the statement which will next be executed
       when the PERFORM is completed.

   *   There are functions to do a fast scroll of the listing (up or
       down).

   *   All input of text strings to Animator is via windows, not on the
       bottom line as in previous versions.

   *   You can zoom to the program that called the current program.

   *   You can set breakpoints on section-headers and paragraph headers.

   *   There are Perform/Step, Exit, and Quit functions for use in
       in-line PERFORM statements.

   *   Breakpoints and monitors can be saved between invocations of
       Animator.  This is configurable using an Animator option.

   *   You can zoom to the cursor.

   *   When you are monitoring subscripted data items the display is
       updated automatically.

   *   You can set up to 100 breakpoints, instead of four as in previous
       releases.

Callable Sort Interface 

The Callable Sort Interface is a new feature that provides additional
flexibility by giving access to sorting and merging capabilities via CALL
statements to the External Sort Module supplied with Micro Focus COBOL.
With the Callable Sort Interface many file and sort characteristics can
be dynamically determined and modified at execution time rather than
statically at compile time.

The Callable Sort Interface has these advantages:

   *   File characteristics, such as record lengths, sort keys and file
       types can be determined at run time, simplifying the creation of
       generalized sorting routines.

   *   The Callable Sort can be called from languages other than COBOL,
       thereby allowing sorting of Micro Focus format files from programs
       that would otherwise lack this ability.

Co-Writer 

Co-Writer is a new feature that provides access to COBOL data files
without the need to write programs to read and format the data.  You can
use it to generate reports.  A data dictionary provides the interface
between Co-Writer and the COBOL data files.

COBOL System Library Routines 

   *   Many new routines have been added to the library of routines
       callable from COBOL. A prefix of "CBL_" indicates the routine is
       available across MF-supported environments; "PC_" indicates the
       routine is available only on DOS and OS/2; "cob" indicates the
       routine is available only on UNIX.

COBOL Syntax 

   *   The EVALUATE statement has been extended.  It allows more natural
       coding than the current definition.  Previously conditions had to
       be specified with a TRUE or FALSE statement, for example:

            evaluate true
            when customer-sort-code = 2
                display "code = 2"
            when customer-sort-code = 3
                display "code = 3"
            when customer-sort-code = 43
                display "code = 43"
            end-evaluate

       Now a partial condition (for example, "= 2") is allowed when the
       subject is an identifier.  So you can code:

            evaluate customer-sort-code
            when = 2
                display "code = 2"
            when = 3
                display "code = 3"
            when = 43
                display "code = 43"
            end-evaluate

   *   The PERFORM verb has been extended to have a PERFORM ...  UNTIL
       EXIT format.  With this form the specified code is executed until
       a specific exit statement is encountered.  For in-line PERFORMs,
       valid exits are STOP RUN, EXIT PROGRAM, EXIT PERFORM, and GO TO;
       for out-of-line PERFORMs, valid exits are STOP RUN and EXIT
       PROGRAM.

   *   You can now SET a condition-name to FALSE, provided that the VALUE
       clause for the condition-name includes the WHEN SET TO FALSE
       phrase (an extension to the VALUE clause).

   *   A WITH WAIT clause has been added to the READ statement.  If this
       clause is specified, the system, on finding a record locked, waits
       for the lock to be released before returning to the program.

   *   A WITH IGNORE LOCK clause has been added to the READ statement.
       If this clause is specified, the system, on finding a record
       locked, will go ahead and read it anyway.

   *   Specifying the directive SAA"2" enables the special registers
       RETURN-CODE and SORT-RETURN.

   *   Specifying the WITH UPPER (or LOWER) clause in an ACCEPT or
       DISPLAY statement forces the input or output to upper- (or lower-)
       case.

   *   "C" and "R" have been added to the set of characters which can be
       specified in the CURRENCY SIGN IS phrase.

   *   The VALUE clause has been extended to include LENGTH OF
       identifier, ADDRESS OF identifier, and ANDing and ORing of numbers
       (to give particular bit combinations <196> useful for interfacing
       to non-COBOL routines).

   *   Level II of IBM's Systems Application Architecture (SAA) is now
       supported.

   *   The IBM DOS/VS and COBOL/370 dialects are supported.

   *   A facility is provided for detecting the Alt and Ctrl keys on
       systems where the terminal and operating system support this.

   *   You can specify that the intermediate results in a COMPUTE
       statement are to be stored in a form that gives the same behavior
       as on an IBM mainframe.

   *   A new data type is provided, for procedure pointers.

   *   You can now call programs recursively.  There is a Local-Storage
       Section for use with recursive programs.

   *   SET pointer UP/DOWN.

   *   You can specify the calling convention to be used when calling
       programs in other languages.

   *   Floating-point data is supported.

   *   Intrinsic functions are supported.  These extend the COBOL
       language with operations including:

          *   Trigonometric functions (for example, SINE, COSINE)

          *   Integer functions (for example, of numbers or dates)

          *   Log functions

          *   Case conversion

          *   Statistical operations (for example, MEDIAN, MEAN)

   *   You can use the SORT verb on a table defined in an 01 level in
       Working-Storage.  This makes simple sorts much easier to define
       and faster in operation.

COBOL Behavior 

   *   A limit in previous releases on the number of OCCURS DEPENDING ON
       items which could be in the same group has been removed.

   *   For people creating applications to run on multiple environments a
       generic attribute palette can be used.  The run-time system maps
       the generic attributes coded in the application to the appropriate
       attribute for the machine/operating system on which the
       application is being run.  The system allows a choice of 16
       simultaneous colors from a pallette of 64K.

   *   The Generic Line Drawing system enables you to write source
       programs which will run unmodified in any supported environment,
       and produce the best possible representation of graphic characters
       available in that environment.

   *   Behavior when a program attempts a divide by zero can be selected
       from one of the following options (using the CHECKDIV directive):

          *   ANSI Standard - when no ON-SIZE clause is present execution
              continues with no error

          *   mainframe-compatible - gives a run-time error

          *   most efficient code - results undefined

   *   You can now write to an environment variable, if you enable the
       X/Open syntax for doing this.

COBOL Editor 

   *   The COBOL Editor has "windows" so you can edit several files at
       the same time.

   *   You can invoke the Compiler and Animator from within the COBOL
       Editor.  When the Compiler detects and error, or you abandon
       animation of a program, the source file is loaded into the COBOL
       Editor at the line where the error was found or the line that was
       current in the Animator.

   *   There is an intermediate step when you use F2=COBOL, enabling you
       to set Compiler and Animator directives.

Color 

   *   The system uses color in its displays.  You can configure the
       colors used.

Common Communications Interface 

The Common Communications Interface (CCI) gives you a high level
interface to low level communications protocols; on Unix, it gives you an
interface to TCP/IP. This enables your program to perform peer-to-peer
communication for cooperative processing while remaining independent of
the protocol used.

CCI is a set of functions that you use to connect to other workstations,
send and receive data, and suspend, resume, and terminate workstation
connections.  Most of these functions can be invoked asynchronously as
well as synchronously.  When invoked asynchronously, the functions
provide you with a handle which can subsequently be used to wait for the
function to complete, or to query whether the function has completed.

CCI is used by cooperative Fileshare Version 2.

Compatibility with Mainframe COBOL 

   *   The following extensions have been added to help in developing
       applications targeted at the DOS/VS environment:

          *   a DOSVS directive to switch on syntax and semantic support
              for DOS/VS COBOL-targeted applications

          *   a FLAG"DOSVS" directive to switch on flagging of syntax
              that is not valid in the DOS/VS COBOL environment

          *   assignment of an 11-byte special register COMREG

          *   adjustment to ASSIGN(EXTERNAL) behavior to match the
              file-name use in the DOS environment

          *   use of the appropriate WHEN-COMPILED format

   *   You can now give a compiler directive (ARITHMETIC"VSC2" or
       ARITHMETIC"OSVS") which ensures the program will give results
       compatible with IBM mainframes in arithmetic statements.  Up until
       now arithmetic statements have used Micro Focus's algorithms for
       the accuracy of results (generally determined by the way
       intermediate results in arithmetic statements are stored).  With
       this release the algorithms used are selectable at compile time.
       A simple example of where behavior can be different is:

            01  work-index     pic 9.
                ...
                compute work-index = ( 7 / 4 ) * 4.

       The mainframe compilers will return the result 4; Micro Focus has
       always returned the result 7.  This is because on the mainframe
       the intermediate result of the division (1.75) is stored in a PIC
       9 field so it becomes 1.

       Results in Micro Focus COBOL may still differ from results on the
       mainframe, if the intermediate result requires more than 20 digits
       before, or more than 20 digits after, the decimal point,

   *   Many IBM mainframe COBOL programmers know that the mainframe
       compilers store record length information for File Section records
       in a few bytes before the actual record.  There are therefore a
       number of COBOL programs that define File Section records as
       tables and get the record length by using zero or negative
       subscripts.  The compiler directive RDW makes the Micro Focus
       compiler store record length information in the same place as the
       mainframe compilers so you can access it in this way.

   *   The STICKY-PERFORM directive causes PERFORM buckets to be left in
       the same state between an EXIT and CALL back to the program.  This
       applies in both intermediate code and generated code.

   *   Range checks have been implemented on literal intrinsic functions
       in a manner compatible with IBM COBOL/370.

   *   Comment text is now allowed in ++INCLUDE and -INC statements,
       after the file-name.

   *   The CBL, PROCESS, *CBL, *CONTROL statements, which influence
       mainframe compiler behavior, are now accepted.  A warning message
       is issued to indicate that no action is being taken on their
       contents.

   *   The VS COBOL II extension of allowing JUSTIFIED to be specified on
       alphanumeric edited fields has been implemented.  Previously
       JUSTIFIED was not allowed on alphanumeric edited fields.  You can
       now code:

            01  receiving-item      pic xbxbxbx justified.
                ...
                move "ABC" to receiving-item.

       This will give "A B C" in RECEIVING-ITEM.

Compiler Behavior 

   *   Directives files can be nested.

   *   The COBOL source listing gives the origin of directives.  If
       Directives files have been used the listing will indicate which
       file directives were taken from and when processing of each
       Directives file ends.

   *   Whether the directive SQL is set or unset the settings of all
       directives that affect SQL behavior are shown in the listing.

   *   The listing of COPY REPLACING has been tidied:  certain text
       replacements no longer cause lines to be split into multiple lines
       in the listing.

   *   The flagging of the different levels of ANSI 74 has been removed.

   *   Coding CHAIN ...  ON EXCEPTION or CHAIN ...  ON OVERFLOW generates
       a compiler error message.  Previously only a warning message would
       have been generated, indicating that the syntax would have no
       effect.

Double-Byte Character Set 

Changes similar to the X/Open CAE National Character Support, which is
modelled after the MIA Technical Requirements for the Programming
Language COBOL, have been implemented:

   *   You can mix PIC N, and PIC G data definitions.

   *   There is a new literal format:  N"{Japanese-character-1}...".

   *   The CLASS condition can specify that the field being tested is a
       NATIONAL field.

   *   The INITIALIZE statement can allow NATIONAL and NATIONAL-EDITED
       fields to be initialized with national character values.

File Handling 

   *   The file to be used can be determined at run time by setting an
       environment variable which maps the name in the program to the
       name of the file to be used.  The environment variable can also
       indicate if the file is a printer, or multi-reel file.

   *   IDXFORMAT"4" files are supported, making improved handling of
       duplicates possible.

   *   There is a facility for data compression and index compression.
       This reduces the amount of space needed for a file, and may also
       increase the speed of I/O.

   *   The following functions have been added to the CALL interface:

          *   Relative byte addressing

          *   Unlock a record - to release only the lock on the
              particular record

   *   Step operations, enabling you to access the data file of an
       indexed file without going via the index.

Fileshare Version 2 

Fileshare Version 2 is a new feature that makes possible sharing of files
between applications on different machines.  It provides rapid network
I/O by compressing I/O requests into packets and sending them across
network lines, so that the file processing is done on the server that
contains the files.  It can also link several files togethr into a
logical database.  You can set up a recovery log when accessing that
database, providing a high level of data integrity.

Fileshare V2 has transaction logging, which allows your user to delay
writing changes to files until all the information is complete.  You can
secure these changes with a COMMIT or cancel them with a ROLLBACK.

Integrated Preprocessor Support 

You can specify a preprocessor that will be called by the Compiler to
process the source program before handing it on to the Compiler.  This
enables you to have non-COBOL statements, for example CICS statements, in
your program.

An important point to note is that when you animate the program you are
animating the original code, not the processed code.

Object Code 

   *   Each release of Micro Focus COBOL can run a particular level of
       intermediate code; this is known as its Intlevel.  A product that
       supports a higher intlevel can produce code of lower intlevels.
       Developers targetting multiple platforms can produce code of the
       intlevel supported across all the platforms, test that code in the
       development environment and then either ship it for execution in
       the other target environments, or compile it to the machine code
       for the target environment and ship that code.  In either case,
       support for it is assured in the other environments.  As certain
       language or subroutine features may not be available at a
       particular intlevel a guide is provided to help developers code to
       the right level.



MPE/iX 5.0 Documentation