[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

HP COBOL
User Manual


Previous Contents Index


/STANDARD=V3 evaluation order not supported for this construct
  • For destinations where OCCURS DEPENDING ON requires different behavior in the MOVE statement:


    /STANDARD=V3 variable length item rules not supported for this construct
    

    For full information on the differences in the HP COBOL for OpenVMS Alpha or the OpenVMS I64 implementation of the /STANDARD=V3 qualifier, refer to the online help.

    /STANDARD=OPENVMS_AXP

    HP COBOL for OpenVMS VAX Version 5.1 (and higher) provides a flagging system, via the /STANDARD=OPENVMS_AXP qualifier option, to identify language features in your existing programs that are not available in HP COBOL on the OpenVMS Alpha system. (There may be additional language features not available on the Tru64 UNIX system.)

    When you specify /STANDARD=OPENVMS_AXP, the HP COBOL for OpenVMS VAX compiler generates informational messages to alert you to language constructs that are not available in HP COBOL on OpenVMS Alpha or OpenVMS I64. (You must also specify /WARNINGS=ALL or /WARNINGS=INFORMATIONAL to receive these messages.) You can use this information to modify your program.

    Specify /STANDARD=NOOPENVMS_AXP, which is the default, to suppress these informational messages.

    B.4 HP COBOL Behavior Differences on VAX and Alpha and I64

    This section describes behavior differences between HP COBOL on its Alpha and I64 and VAX platforms.

    B.4.1 Program Structure Messages

    In some cases, the HP COBOL compiler (whether on the OpenVMS Alpha, OpenVMS I64, or the Tru64 UNIX system) generates more complete messages about unreachable code or other logic errors than does the HP COBOL for OpenVMS VAX compiler.

    The following example illustrates a sample program and the messages issued, or not issued, by the HP COBOL compiler on each of the three platforms:

    Source file


           IDENTIFICATION DIVISION.
           PROGRAM-ID. T1.
           ENVIRONMENT DIVISION.
           PROCEDURE DIVISION.
           P0.
               GO TO P1.
           P2.
               DISPLAY "This is unreachable code".
           P1.
               STOP RUN.
    

    On OpenVMS VAX systems


    $ COBOL /ANSI/WARNINGS=ALL T1.COB
    $
    

    The program compiles. The HP COBOL for OpenVMS VAX compiler produces no messages.

    On OpenVMS Alpha and I64 systems


    $ COBOL/ANSI/OPTIMIZE/WARNINGS=ALL T1.COB
           P2.
    .......^
    %COBOL-I-UNREACH, code can never be executed at label P2
    at line number 7 in file DISK$YOURDISK:[TESTDIR]T1.COB;1
    

    On Tru64 UNIX systems


    % cobol -ansi -O -warn all T1.COB
    cobol: Info: T1.COB, line 7: code can never be executed at label P2
           P2
    -------^
    

    HP COBOL on either Alpha platform, or on I64 is an optimizing compiler. One use of optimization is to perform analysis for uncalled routines and unreachable paragraphs. The compiler performs the unreachable code analysis for all levels of optimization, including /NOOPTIMIZE or the equivalent -O0 flag. HP COBOL for OpenVMS VAX does not have an /OPTIMIZE qualifier.

    B.4.2 Program Listing Differences

    Some differences appear in program listings depending upon whether they were produced by the HP COBOL compiler on OpenVMS Alpha, OpenVMS I64, OpenVMS VAX, or Tru64 UNIX.

    B.4.2.1 Machine Code

    With HP COBOL on Alpha and I64, /NOOBJECT and -noobject cause the compiler to suppress code generation, so no machine code is produced either for the listing or for the object module.

    If you want the machine code to be included in the program listing, do not use /NOOBJECT or -noobject .

    On VAX, /NOOBJECT suppresses just the creation of the .OBJ file. The compiler still does all the work to generate the object code so it can be placed in the listing.

    B.4.2.2 Module Names

    With HP COBOL on Alpha and I64, the name of the first program is the module name throughout the compilation. On VAX, the module name changes as the various programs are encountered.

    B.4.2.3 COPY and REPLACE Statements

    The HP COBOL compiler produces output in slightly different formats on Alpha and I64 and VAX when listing annotations for the COPY statement in COBOL programs.

    The following two compiler listing files illustrate the difference in the position of the listing annotations, represented by the letter "L":

    HP COBOL on Alpha and I64 Listing File for COPY Statement


    
                  1 IDENTIFICATION DIVISION.
                  2 PROGRAM-ID. DCOP1B.
                  3 *
                  4 *       This program tests the copy library file.
                  5 *       with a comment in the middle of it.
                  6 *       It should not produce any diagnostics.
                  7         COPY
                  8 *       this is the comment in the middle
                  9                 LCOP1A.
    L            10 ENVIRONMENT DIVISION.
    L            11 INPUT-OUTPUT SECTION.
    L            12 FILE-CONTROL.
    L            13 SELECT FILE-1
    L            14         ASSIGN TO "FILE1.TMP".
                 15 DATA DIVISION.
                 16 FILE SECTION.
                 17 FD      FILE-1.
                 18 01      FILE1-REC       PIC X.
                 19 WORKING-STORAGE SECTION.
                 20 PROCEDURE DIVISION.
                 21 PE.     DISPLAY "***END***"
                 22         STOP RUN.
    
    

    HP COBOL on VAX Listing File for COPY Statement


    
    
        1         IDENTIFICATION DIVISION.
        2         PROGRAM-ID. DCOP1B.
        3        *
        4        *    This program tests the copy library file.
        5        *    with a comment in the middle of it.
        6        *    It should not produce any diagnostics.
        7             COPY
        8        *    this is the comment in the middle
        9                     LCOP1A.
       10L        ENVIRONMENT DIVISION.
       11L        INPUT-OUTPUT SECTION.
       12L        FILE-CONTROL.
       13L        SELECT FILE-1
       14L            ASSIGN TO "FILE1.TMP".
       15         DATA DIVISION.
       16         FILE SECTION.
       17         FD  FILE-1.
       18         01  FILE1-REC       PIC X.
       19         WORKING-STORAGE SECTION.
       20         PROCEDURE DIVISION.
       21         PE. DISPLAY "***END***"
       22             STOP RUN.
    
    
    

    B.4.2.4 Multiple COPY Statements

    The HP COBOL compiler also produces output in slightly different formats on Alpha and I64 and VAX when listing a COBOL program with multiple COPY statements on a single line.

    The following two compiler listing files illustrate the difference in the position of the listing annotations, represented by the letter "L," for multiple COPY statements on a single line:

    HP COBOL on Alpha and I64 Listing File for Multiple COPY Statements


    
    
                  1 IDENTIFICATION DIVISION.
                  2 PROGRAM-ID. DCOP1J.
                  3 *
                  4 *       Tests copy with three copy statements on 1 line.
                  5 *
                  6 ENVIRONMENT DIVISION.
                  7 DATA DIVISION.
                  8 PROCEDURE DIVISION.
                  9 THE.
                 10         COPY LCOP1J. COPY LCOP1J. COPY LCOP1J.
    L            11         DISPLAY "POIUYTREWQ".
    L            12         DISPLAY "POIUYTREWQ".
    L            13         DISPLAY "POIUYTREWQ".
                 14         STOP RUN.
    
    
    

    HP COBOL on VAX Listing File for Multiple COPY Statements


    
    
        1         IDENTIFICATION DIVISION.
        2         PROGRAM-ID. DCOP1J.
        3        *
        4        *    Tests copy with three copy statements on 1 line.
        5        *
        6         ENVIRONMENT DIVISION.
        7         DATA DIVISION.
        8         PROCEDURE DIVISION.
        9         THE.
       10             COPY LCOP1J.
       11L            DISPLAY "POIUYTREWQ".
       12C                         COPY LCOP1J.
       13L            DISPLAY "POIUYTREWQ".
       14C                                      COPY LCOP1J.
       15L            DISPLAY "POIUYTREWQ".
       16             STOP RUN.
    
    
    


    Previous Next Contents Index