000300 IDENTIFICATION DIVISION.<br>000400 PROGRAM-ID. TEST0001.<br>000410* COPYRIGHT (C) Crox<br>000500 ENVIRONMENT DIVISION.<br>000600 CONFIGURATION SECTION.<br>000700 SOURCE-COMPUTER. IBM-PC.<br>000800 OBJECT-COMPUTER. IBM-PC.<br>000900 INPUT-OUTPUT SECTION.<br>001000 FILE-CONTROL.<br>001100 DATA DIVISION.<br>001200 FILE SECTION.<br>001300 WORKING-STORAGE SECTION.<br>001400 01 HULPVELDEN.<br>001500 03 X VALUE 9 PIC 9.<br>001510 03 Y VALUE 8 PIC 9.<br>002700 PROCEDURE DIVISION.<br>002710 HOOFD SECTION.<br>002800 0001.<br>002900 DISPLAY 'PERFORM VARYING DIALECT ANS : '<br>003000 PERFORM HULP<br>003010 VARYING X FROM 1 BY 1 UNTIL X > 3<br>003100 AFTER Y FROM X BY 1 UNTIL Y > 3.<br>006100 0009.<br>006200 STOP RUN.<br>006210<br>006300 HULP SECTION.<br>006400 0001.<br>006410 DISPLAY 'X / Y: ' X ' / ' Y.<br>006500 0009.<br>006600 EXIT.<br><br>compiled with the COBOL 74 compiler, jou<br>get different output compared with the<br>COBOL 85 compiler. If you use CA-REALIA<br>COBOL, you can compile with one of the<br>16 dialects it supports. Than you can<br>see the differences using that single<br>compiler. <br><br>output of the '85 compiler:<br><br>PERFORM VARYING DIALECT ANS : <br>X / Y: 1 / 1<br>X / Y: 1 / 2<br>X / Y: 1 / 3<br>X / Y: 2 / 2<br>X / Y: 2 / 3<br>X / Y: 3 / 3<br><br><br>output of the '74 compiler:<br><br>PERFORM VARYING DIALECT ANS : <br>X / Y: 1 / 1<br>X / Y: 1 / 2<br>X / Y: 1 / 3<br>X / Y: 2 / 1<br>X / Y: 2 / 2<br>X / Y: 2 / 3<br>X / Y: 3 / 2<br>X / Y: 3 / 3<br><br>So you see, you get complete different output.<br><br>There are more examples of course like<br>the alphabetic test, moves of records<br>with varying length, those kinds of<br>things. There are many of them. <br><br>