Skip to content

Recompiling OS/VS and DOS/VS COBOL Sources

You will be able to obtain correct working versions of all your OS/VS COBOL or DOS/VS COBOL-IT Report Writer programs using new Report Writer. The migration of most Report Writer programs require no changes to the current Report Writer code. However, new Report Writer produces more information, in the form of informational (severity "I") messages to make certain processes and assumptions clear to you. You should therefore expect a number of these severity "I" messages to be produced when you submit a typical migrated Report Writer program to the precompiler.

The precompiler is also stricter than both OS/VS COBOL and DOS/VS COBOL in its checking of your Report Writer for adherence to syntax rules and in the additional consistency checks that it performs. In some cases, the precompiler will produce warning (severity "W") - or occasionally even severity "E" or "S" messages - in a program that the previous compiler accepted without any diagnostic messages. (You may find that the situations that cause these messages recur in all the programs originally written by the same individuals, because a certain style of coding is used consistently.) However, even severity "W" messages normally do not require a change to your program source, since your program will behave at run time exactly as it did under the previous compiler.

The following sections list the messages that have occurred when a large sample of "clean" migrated Report Writer programs were precompiled, compiled and run. They are listed in order of severity. This part outlines what action, if any, you should take for each severity level. A more detailed explanation of the messages will be found in Appendix E, where all diagnostic messages are listed.

Informational (I-level)

Informational messages do not indicate a fault of any kind and do not require you to take any action. You can suppress the listing of I-level messages by specifying the option FLAG(W). If you are running under CMS or TSO, the option MSGL(3) may be used to prevent I-level messages being displayed on your screen.

The following severity-I messages may result from "clean" migrated Report Writer programs.

RW-001-I No Report Writer data entries were found in this program

  • Meaning - This message should be expected if your program has no REPORT SECTION. You may wish to precompile every COBOL program since you cannot easily tell which programs contain Report Writer code and which do not. You may decide to place a NORW directory at the start of your source program to inhibit the scan for non-existent Report Writer code. (See Installation and Operation.)

  • Remedy - None required.

RW-008-I FD has record definition but no RECORD CONTAINS: compiler may assume variable-length

  • Meaning - This message may result if your report file FD is followed by a record description and the FD entry has no RECORD CONTAINS clause. New Report Writer creates a record description after your FD to enable it to output generated Report Writer records. If no RECORD CONTAINS clause is present, it sets up the record with a length equal to the longest actual line to be written (rounded up to a multiple of 4 and incremented by 1 for any carriage control character). Since your FD already has a record description, its length is likely to be different from the length of Report Writer's generated record. If RECORDING MODE F is specified, a compiler error will result. If not, the result may be unexpected variable-length records.

  • Remedy - It is probable that the record description after the FD entry was originally coded under the mistaken assumption that it is required. A record description is not required after the FD for a report file, unless the program issues WRITEs independently to the same file. Check whether the record description is referred to and, if not, remove it.

    If the record description is referred to, you should add a RECORD CONTAINS clause to the FD entry, specifying the length in bytes of the record description that follows the FD.

RW-030-I PAGE LIMIT will never be reached

  • Meaning - This message implies that your PAGE LIMIT is larger than it need be since no report line will ever reach it. There are two cases where this may happen. Either you have a PAGE FOOTING group, using absolute LINE numbers, which does not reach the PAGE LIMIT. Or, you have no PAGE FOOTING group but the value of LAST DETAIL or FOOTING is less than the PAGE LIMIT so that body groups can never reach it. Possibly the value of PAGE LIMIT was coded under the mistaken assumption that it should represent the physical size of the printed page.

  • Remedy - None required, but to eliminate the message you may reduce the value of the PAGE LIMIT to that of the last line of the PAGE FOOTING group, or to the value of LAST DETAIL or FOOTING.

RW-085-I New reserved word accepted as data-name

  • Meaning - This message appears when you use one of Report Writer's new reserved words as a SOURCE or SUM operand, for example "SOURCE FUNC" or "SUM COLS". Report Writer detects this from the context and allows the clause as you intended so that the new reserved words have as little impact as possible on migrated programs.

  • Remedy - None required, but to eliminate the message you may edit the program to change the data-name, for example from FUNC to WS-FUNC.

RW-110-I Elementary item has no size: will not be output

  • Meaning - This message appears when your elementary SOURCE item has no PICTURE clause. This technique has been used frequently by programmers to define "dummy" entries in a "totals-only" report, so that there will be a SOURCE identifier to correspond with every SUM identifier. For example:

    elementary source item

  • Remedy - No action is required, but if you wish to eliminate the message, simply attach a PICTURE to the entry:

    elementary source item

RW-146-I No GENERATE issued for this DETAIL

  • Meaning - The DETAIL group referred is probably a dummy group, coded in a "totals-only" report, as illustrated above under message RW-110. Without the SOURCE clauses in the dummy group, OS/VS COBOL and DOS/VS COBOL will not SUM these fields.

  • Remedy - None required. New Report Writer does not require dummy groups in this situation, because it does not require a SOURCE to correlate with each SUM. So, if this is the only purpose of the dummy group, you may eliminate this message by removing the dummy group.

RW-161-I SUM will be totalled UPON generation of xx due to SOURCE SUM correlation or RW-162-I SUM will be totalled also UPON generation of xx

  • Meaning - One of these messages should appear for each SUM identifier in your program which is not the name of another REPORT SECTION item. See Appendix E under these messages for additional commentary.

  • Remedy - None required.

RW-200-I MODE PRNT has been assumed for file due to CODE clause

  • Meaning - This message will appear if a report file has more than one RD, and they have CODE clauses with "literals" which are not all of the same length (counting an absent CODE clause as a "zero-length literal"). Clearly, this situation could not be implemented easily by means of normal WRITE statements, so the precompiler uses an independent report file handler. The PRNT file handler, which produces a similar output to basic COBOL WRITEs, is used if no other file handler is specified (in a MODE clause or by a parameter to the precompiler). For more information about file handlers, see Report Files.

  • Remedy - None required. However, if the FD is followed by a record description, message RW-180-E will also appear (see below). You might consider removing all CODE clauses from the program and assigning each affected report to a separate print file instead, thus avoiding the need to run the utility print program which makes multiple passes through your print file.

RW-213-I Value xx assumed for LINE LIMIT

  • Meaning - This message will appear for each RD in your program. It shows the rightmost position permitted for any character in a report line.

  • Remedy - None required.

Warning (W-level)

Warning messages indicate that the code found contains an infringement of the syntax, but that the program will execute as intended. In general, you need not correct W-level violations to ensure that the program will be compatible with OS/VS COBOL or DOS/VS COBOL. It is possible for a program source which produces no messages under the previous compiler to produce several W-level messages when precompiled.

The following W-level messages may result from "clean" migrated Report Writer programs. A simple change is suggested for each case, should you prefer to alter the source to make it clearer and easier to maintain, and to conform to the ANS-74/85 Report Writer standard.

RW-019-W Report xx in FD has no REPORT SECTION entry

  • Meaning - This message indicates that a REPORT clause in an FD refers to a report-name that has no RD entry in the REPORT SECTION. OS/VS COBOL, DOS/VS COBOL and the precompiler all ignore the report-name.

  • Remedy - No action is required but if you want to remove this message, delete the unused report-name from your program.

RW-031-W PAGE LIMIT increased to value of LAST DETAIL or FOOTING

  • Meaning - This message results when the PAGE LIMIT is less than the value of LAST DETAIL or FOOTING, for example:

      RD REPORT-ONE 
         PAGE LIMIT 50 LINES 
         LAST DETAIL 54 
         FOOTING 56.
    
    - Remedy - No action is required since both OS/VS COBOL, DOS/VS COBOL and the precompiler all override the inadequate PAGE LIMIT. If you want to avoid this message, increase the PAGE LIMIT integer to the value of LAST DETAIL or, if present, FOOTING:

      RD REPORT-ONE 
         PAGE LIMIT 56 LINES 
         LAST DETAIL 54 
         FOOTING 56.
    

RW-051-W duplicated CONTROL: ignored

  • Meaning - This message implies that your report description lists the same control field twice, for example:

      RD REPORT-ONE 
         PAGE LIMIT 60 LINES 
         CONTROLS ARE ACCOUNT-CODE 
                      ACCOUNT-CODE 
                      DISTRICT-CODE.
    
    - Remedy - No action is required but if you want to remove this message you should simply remove the second occurrence of the control, since it serves no purpose.

RW-064-W LINE entries nested: previous LINE assumed level xx

  • Meaning - This message is issued when two LINE clauses are at different levels. The commonest instance is where a group with more than one LINE clause has the first LINE clause at the 01-level:

      01 TYPE REPORT FOOTING LINE NEXT PAGE. 
        03 COLUMN 1 ... 
        03 LINE IS PLUS 1. 
          05 COLUMN 1 ...
    
    - Remedy - No action is required because OS/VS COBOL, DOS/VS COBOL and the precompiler allow this situation. If you want to remove this message, restructure the code as follows:

      01 TYPE REPORT FOOTING. 
        03 LINE NEXT PAGE. 
          05 COLUMN 1 ... 
        03 LINE IS PLUS 1. 
          05 COLUMN 1 ...
    

RW-070-W COLUMN entries following LINE assumed to be subordinate to it

  • Meaning - This message will appear if a COLUMN entry is not at a level lower than the preceding LINE entry, as in the following example:

      01 TYPE PAGE HEADING. 
        03 LINE 1 COLUMN 1 ... 
        03 COLUMN 21 ...
    
    The second COLUMN clause is not strictly subordinate to the LINE clause.

  • Remedy - No action is required because OS/VS COBOL, DOS/VS COBOL and new Report Writer allow this arrangement of clauses. If you wish to eliminate this message, you may restructure the code as follows:

      01 TYPE PAGE HEADING. 
        03 LINE 1. 
          05 COLUMN 1 ... 
          05 COLUMN 21 ...
    

RW-072-W Recurrence of same absolute LINE merged with preceding

  • Meaning - This message will appear if the same absolute LINE clause is repeated in successive entries with different COLUMN clauses, for example:

      01 TYPE PAGE HEADING. 
        03 LINE 1 COLUMN 10 ... 
        03 LINE 1 COLUMN 30 ...
    
    This is a loose interpretation of the ANS 68 standard allowed by the older compilers.

  • Remedy - No action is required because OS/VS COBOL, DOS/VS COBOL and new Report Writer allow this arrangement of clauses. If you wish to eliminate this message, you may restructure the code as follows:

      01 TYPE PAGE HEADING. 
        03 LINE 1. 
          05 COLUMN 10 ... 
          05 COLUMN 30 ...
    

RW-096-W LINE clauses in group will cause it to extend beyond bottom limit

  • Meaning - This message will appear if a report group ends too far down the page. For example:

    warning message

    Both report groups in this example will invoke this message. The REPORT HEADING stretches down to beyond the PAGE LIMIT (the absolute limit on all report line positions). The PAGE HEADING encroaches into the FIRST DETAIL position. (Note, if the second line of the PAGE HEADING is an absolute line such as LINE 5, instead of the equivalent LINE PLUS 4, OS/VS COBOL and DOS/VS COBOL do give an error message.)

  • Remedy - No action is required because OS/VS COBOL, DOS/VS COBOL and the precompiler will all accept the REPORT HEADING and PAGE HEADING as described and will begin the DETAIL groups immediately after the PAGE HEADING. To clear these conditions, you should aim to adjust the PAGE LIMIT sub-clauses so that they truly represent the regions of your page, without affecting any other part of the report. If you alter the PAGE LIMIT, and require complete compatibility, it is advisable to include both a LAST DETAIL and a FOOTING clause to ensure that your DETAIL and CH/CF groups come down to the same lowest position as before. The above code can now be rewritten as follows:

      RD REPORT-ONE 
         PAGE LIMIT IS 60 LINES 
         FIRST DETAIL 6 
         LAST DETAIL 58 
         FOOTING 58.
    

RW-106-W This RH group will have own page: NEXT GROUP NEXT PAGE assumed

  • Meaning - This message appears if your REPORT HEADING group has no NEXT GROUP NEXT PAGE clause (which usually means that the first PAGE HEADING should follow it on the same page) but there is no room to print the REPORT HEADING above the first PAGE HEADING between HEADING and FIRST DETAIL, as in this example:

    warning next group

  • Remedy - No action is required because OS/VS COBOL and DOS/VS COBOL-IT Report Writer also place the REPORT HEADING on a page by itself and your results will be identical. If you wish the REPORT HEADING to temporarily push down the PAGE HEADING, omit the FIRST DETAIL clause. If you wish to avoid this message, add the NEXT GROUP NEXT PAGE clause: 01 TYPE IS REPORT HEADING NEXT GROUP NEXT PAGE.

RW-107-W This RF group will have own page: NEXT PAGE assumed

  • Meaning - This message appears if your REPORT FOOTING group begins with an absolute LINE without a NEXT PAGE phrase (which usually means that it should follow the last PAGE FOOTING on the same page) but the LINE number is not greater than the last LINE position of the PAGE FOOTING, as in this example:

    warning next page

  • Remedy - No action is required because OS/VS COBOL and DOS/VS COBOL-IT Report Writer also place the REPORT FOOTING on a page by itself and your results will be identical. If you wish to avoid this message, add a NEXT PAGE phrase to the LINE clause of the REPORT FOOTING:

      01 TYPE IS REPORT FOOTING. 
        03 LINE 1 ON NEXT PAGE. 
          05 COLUMN 1 PIC X(13) VALUE "END OF REPORT".
    

RW-142-W No INITIATE statement found for this report and RW-143-W No TERMINATE statement found for this report

  • Meaning - These messages may appear if your original program has no INITIATE or TERMINATE for a report. Your program may have operated successfully under the previous compiler without one or both of these statements. ANS standards require that every Report Writer program must perform an INITIATE at the start and a TERMINATE at the end of each report. If the INITIATE is not performed, a run time error message 14 will be issued from your program and the INITIATE will be implicitly performed. If the TERMINATE is not performed, the last set of CONTROL FOOTING groups, the last PAGE FOOTING and the REPORT FOOTING, as applicable, will be lost from your output.

  • Remedy - If the INITIATE is missing, it is advisable to add it to the source. If in doubt, insert it immediately after the OPEN for the report file. If the TERMINATE is missing and you are satisfied that it was not omitted deliberately to prevent the final groups being printed (mentioned in the preceding paragraph), add it to your source. If in doubt, insert it immediately before the CLOSE for the report file. For further information, see Sequence of Operations.

RW-151-W Superfluous period: ignored

  • Meaning - OS/VS COBOL and DOS/VS COBOL are tolerant of superfluous period characters coming at the end of an entry, for example: 05 COLUMN 23 PIC Z(6)9 SOURCE AMOUNT. . .

  • Remedy - No action is required, but if you want to remove this message, simply remove any extra periods appearing after the first period.

RW-163-W Item not in REPORT SECTION is accumulated on each GENERATE

  • Meaning - This message should never appear in a correct and logical OS/VS COBOL or DOS/VS COBOL program. It suggests a serious discrepancy in your original program. The message indicates that your program has a SUM clause whose operand is not a SOURCE in a DETAIL group or another SUM in your REPORT SECTION. This condition is not flagged by the older compilers but it will not perform any adding and will produce a value of zero in the report. The precompiler, on the other hand, processes the SUM clause by accumulating the field on each GENERATE.

  • Remedy - If the report is producing a zero value and you are satisfied with it, you may substitute VALUE ZERO for the SUM clause. If you decide that the field should be accumulated, you should decide whether to allow it to accumulate on each GENERATE. If you decide that it should be accumulated only on the GENERATE of certain DETAIL groups, add the phrase UPON detail-group-name(s)... to the Sum clause.

RW-250-W Item overlaps or is to left of item in same line

  • Meaning - This message appears when the COLUMN entries within a line are not in ascending sequence, or, taking into account their sizes, are found to overlap. OS/VS COBOL and DOS/VS COBOL allow COLUMN entries to appear in any order and to overlap to any extent. It simply stores them into a line initially set to spaces in the order they were coded. Each entry may have any starting COLUMN and byte length. No check is performed as to whether some data has already been stored in any of the target positions. Here is an example:

    warning overlap

  • Remedy - If you are satisfied with your current version of the program, then you need not make any change. In the case above, the first field is longer than it need be. The second field overwrites the excess spaces so no harm results. The third field has its COLUMN number "out of sequence" but it does not overlap any other field. It may therefore be left as it is. Since overlapping has serious implications, you may prefer to remove it. In the case above, the PICTURE may be shortened or simply removed. It is possible that an unintended overlap will become more serious with time, especially when larger values need those higher-order digit positions that might be overlaid by another field. If you cannot rearrange the COLUMN numbers or reduce the PICTURE sizes, try a "staggered" layout, such as the following:

      $$$$$$$$$.99    $$$$$$$$$.99        $$$$$$$$$.99 -LINE PLUS 1
                $$$$$$$$$.99       $$$$$$$$$.99        -LINE PLUS 1
    

    If your fields are simply out of order, rearranging them by ascending COLUMN number will make it easier for you to detect genuine cases of overlap. (If the last entry in the example had been mistyped as COLUMN 25, it would have overwritten the top digit of the monetary value on its right!)

More Severe (E- and S-level) Messages

IGYPA3107-S "UNSTRING INTO" identifier (name (usage)) was invalid ...

  • Meaning - Depending on which COBOL compiler you are using, one of these messages will appear when your program has a CONTROL data item which is not USAGE DISPLAY. The VS COBOL II error can occur only when the option NOXCAL is in effect. If the PRTX option is in effect, this message will have been placed on the affected CONTROL clause.

Remedy - This condition is corrected by REDEFINing your CONTROL data item as PIC X(...) and using the data-name of the redefinition instead. An equivalent method is to make your CONTROL item a group-level item:

error unstring

With VS COBOL II, you may avoid the problem by specifying the (default) option XCAL.

IGYPS2052-S A "RECORDING MODE" of F was specified for file...

  • Meaning - This compiler error message appears as a result of the precompiler message RW-008-I.

  • Remedy As under RW-008-I.

RW-149-E Report assigned to more than one FD: file handler DUPL required

  • Meaning - Defining the same report-name in the REPORT clause of more than one FD is allowed in new Report Writer, as in OS/VS COBOL and DOS/VS COBOL, but for quite different reasons. OS/VS COBOL allows a report to be written to up to two files at the same time, but new Report Writer follows the Codasyl standard by requiring you to select only a single file to be written to at INITIATE time. Thus the following is allowed by both:

    error annual summary

    but new Report Writer requires you to code UPON FILE-A or UPON FILE-B after INITIATE ANNUAL-SUMMARY.

  • Remedy - You can still write to two files simultaneously if you need to but this must be achieved using a file handler that performs a separate WRITE to each file. See Multiple Reports. The file handler is supplied with all versions of the run time library. You should now add a MODE DUPL clause to your SELECT statement as follows:

    error annual summary

RW-020-S Group item has elementary clauses: ignored

  • Meaning - OS/VS COBOL and DOS/VS COBOL allow entries below report group level to have any level-numbers from 02 to 49. The precompiler performs the same strict checks on level-numbers that you would expect in any other DATA DIVISION section. In the following case, for example:

    error group item

    You will see the following diagnostic messages: RW-069-W COLUMN should be subordinate to LINE: LINE + 0 assumed and RW-020-S Group item has elementary clauses: ignored.

    It is essential to remove the error condition by renumbering the levels so that:

    • LINE clauses are subordinate to (01-level) report groups,

    • COLUMN clauses are subordinate to LINEs.

    The above example, when corrected, should appear as:

    error group item

RW-180-E CODE not allowed in RD where a record description follows FD: discarded

  • Meaning - Your FD has more than one RD with "CODEs" of unequal size and the corresponding FD is followed by an 01-level record description. (See RW-200-I above). The precompiler implements the CODE clause in this casethrough a file handler that does not permit access to a separate filerecord.

  • Remedy - A record description is not required after an FD that has a REPORT(S) clause, unless your program does a WRITE independently to the same report file. If your program does not do a WRITE to the same file, the entire record description is redundant and can be removed. If your program does do a WRITE to the same file, you should convert the WRITE to a GENERATE, if necessary by defining a new RD for the same file containing no PAGE clause and a simple DETAIL group for each special record format written to the file.

    It is possible for your program to cause other severe diagnostics to appear. Some may be through the unexpected tolerance of the previous compiler of some erroneous construct. It should be clear from the message what you need to do to correct the error. The descriptions of the messages in Appendix E will help you, and you may also refer to the main sections describing the clauses.

Back to top