|  | 
|  | 1 | +       IDENTIFICATION DIVISION. | 
|  | 2 | +       PROGRAM-ID. Pgm. | 
|  | 3 | +       DATA DIVISION. | 
|  | 4 | +       WORKING-STORAGE SECTION. | 
|  | 5 | +       01 item   PIC X(20). | 
|  | 6 | +       01 part   PIC X(20). | 
|  | 7 | +       01 var0   PIC 9 VALUE 0. | 
|  | 8 | +       01 var1   PIC 9 VALUE 1. | 
|  | 9 | +       | 
|  | 10 | +       PROCEDURE DIVISION. | 
|  | 11 | +      * OK this is a shorthand | 
|  | 12 | +           MOVE item(2:) TO part | 
|  | 13 | +      * KO zero position | 
|  | 14 | +Line 14[22,22] <27, Error, Syntax> - Syntax error : Reference modifiers should be positive non-zero values. | 
|  | 15 | +           MOVE item(0:) TO part | 
|  | 16 | +      * KO negative position | 
|  | 17 | +Line 16[22,23] <27, Error, Syntax> - Syntax error : Reference modifiers should be positive non-zero values. | 
|  | 18 | +           MOVE item(-1:) TO part | 
|  | 19 | +      * KO by a previous step | 
|  | 20 | +Line 18[21,21] <27, Error, Syntax> - Syntax error : mismatched input '(' expecting TO | 
|  | 21 | +           MOVE item(:2) TO part | 
|  | 22 | +       | 
|  | 23 | +      * KO zero position | 
|  | 24 | +Line 21[22,22] <27, Error, Syntax> - Syntax error : Reference modifiers should be positive non-zero values. | 
|  | 25 | +           MOVE item(0:5) TO part | 
|  | 26 | +      * KO zero length | 
|  | 27 | +Line 23[22,22] <27, Error, Syntax> - Syntax error : Reference modifiers should be positive non-zero values. | 
|  | 28 | +           MOVE item(1:0) TO part | 
|  | 29 | +      * KO*2 zero values | 
|  | 30 | +Line 25[22,22] <27, Error, Syntax> - Syntax error : Reference modifiers should be positive non-zero values. | 
|  | 31 | +Line 25[22,22] <27, Error, Syntax> - Syntax error : Reference modifiers should be positive non-zero values. | 
|  | 32 | +           MOVE item(0:0) TO part | 
|  | 33 | +      * KO negative position | 
|  | 34 | +Line 27[22,23] <27, Error, Syntax> - Syntax error : Reference modifiers should be positive non-zero values. | 
|  | 35 | +           MOVE item(-1:5) TO part | 
|  | 36 | +      * KO negative length | 
|  | 37 | +Line 29[22,22] <27, Error, Syntax> - Syntax error : Reference modifiers should be positive non-zero values. | 
|  | 38 | +           MOVE item(1:-5) TO part | 
|  | 39 | +      * KO*2 negative values | 
|  | 40 | +Line 31[22,23] <27, Error, Syntax> - Syntax error : Reference modifiers should be positive non-zero values. | 
|  | 41 | +Line 31[22,23] <27, Error, Syntax> - Syntax error : Reference modifiers should be positive non-zero values. | 
|  | 42 | +           MOVE item(-1:-5) TO part | 
|  | 43 | +      * OK | 
|  | 44 | +           MOVE item(1.32:5) TO part | 
|  | 45 | +      * OK | 
|  | 46 | +           MOVE item(1:5.84) TO part | 
|  | 47 | +      * OK | 
|  | 48 | +           MOVE item(1.32:5.84) TO part | 
|  | 49 | +      * KO zero position | 
|  | 50 | +Line 39[22,24] <27, Error, Syntax> - Syntax error : Reference modifiers should be positive non-zero values. | 
|  | 51 | +           MOVE item(0.0:5) TO part | 
|  | 52 | +      * KO zero length | 
|  | 53 | +Line 41[22,22] <27, Error, Syntax> - Syntax error : Reference modifiers should be positive non-zero values. | 
|  | 54 | +           MOVE item(1:0.0) TO part | 
|  | 55 | +      * KO*2 zero values | 
|  | 56 | +Line 43[22,24] <27, Error, Syntax> - Syntax error : Reference modifiers should be positive non-zero values. | 
|  | 57 | +Line 43[22,24] <27, Error, Syntax> - Syntax error : Reference modifiers should be positive non-zero values. | 
|  | 58 | +           MOVE item(0.0:0.0) TO part | 
|  | 59 | +      * KO negative position | 
|  | 60 | +Line 45[22,26] <27, Error, Syntax> - Syntax error : Reference modifiers should be positive non-zero values. | 
|  | 61 | +           MOVE item(-1.32:5) TO part | 
|  | 62 | +      * KO negative length | 
|  | 63 | +Line 47[22,22] <27, Error, Syntax> - Syntax error : Reference modifiers should be positive non-zero values. | 
|  | 64 | +           MOVE item(1:-5.84) TO part | 
|  | 65 | +      * KO*2 negative values | 
|  | 66 | +Line 49[22,26] <27, Error, Syntax> - Syntax error : Reference modifiers should be positive non-zero values. | 
|  | 67 | +Line 49[22,26] <27, Error, Syntax> - Syntax error : Reference modifiers should be positive non-zero values. | 
|  | 68 | +           MOVE item(-1.32:-5.84) TO part | 
|  | 69 | +       | 
|  | 70 | +      * OK Variables are not checked | 
|  | 71 | +           MOVE item(var0:) TO part | 
|  | 72 | +           MOVE item(var1:) TO part | 
|  | 73 | +           MOVE item(2:var0) TO part | 
|  | 74 | +           MOVE item(2:var1) TO part | 
|  | 75 | +       | 
|  | 76 | +      * OK Expressions are not checked | 
|  | 77 | +           MOVE item(2 * 3  : 4     ) TO part | 
|  | 78 | +           MOVE item(2      : 4 * 2 ) TO part | 
|  | 79 | +           MOVE item(2 * 2  : 4 * 2 ) TO part | 
|  | 80 | +           MOVE item(-2 + 1 : 2     ) TO part | 
|  | 81 | +           MOVE item(2      : 4 * -2) TO part | 
|  | 82 | +           . | 
|  | 83 | +       END PROGRAM Pgm. | 
0 commit comments