Common Errors and Resolution - Converting to Natural 3.1.x
|
NAT0002 |
DEFINE DATA |
No file is available with specified name or number. Probably because the file has not been loaded into the test environment. | ||
|
NAT0009 |
NEWPAGE |
Invalid relational operator in relation expression. NEWPAGE IF LESS THAN 14 LINES LEFT | ||
|
NAT0082 |
INCLUDE
|
This error message is issued when a value is entered in the command line, which is neither a Natural command nor the name of a Natural program, contained in the active library or in the library defined as STEPLIB. | ||
|
NAT0111 |
DEFINE DATA |
Error ... in line ... of data area ... processing
.... | ||
|
NAT0166 |
DEFINE DATA |
An invalid definition of the DEFINE DATA statement has
been detected. RESET +USDIP /* defined as A 31 (1:36) Was permitted in Natural 2.2+; should look like this under Natural 3: RESET +USDIP(*) | ||
|
NAT0199 |
NAT0199 |
Duplicate label definition. FIND-IIDM. FIND FIND-IIDM WITH POLICY-NUMBER = #POL-NUM IF NO RECORDS FOUND ESCAPE BOTTOM(FIND-IIDM.) END-NOREC Natural is misinterpreting the label and the view name used in the above context. Change the paragraph/label name. FIND-IIDM-POLICY. FIND FIND-IIDM WITH POLICY-NUMBER = #POL-NUM IF NO RECORDS FOUND ESCAPE BOTTOM(FIND-IIDM-POLICY.) END-NOREC | ||
|
NAT0229 |
UPDATE |
Invalid use of WITH clause in UPDATE or STORE statement. This was caused by a STORE statement that included a USING (nnnn) clause. Chris Brown simply removed it. | ||
|
NAT0273 |
DEFINE DATA |
Error É in line É of data area É processing É lda | ||
|
NAT0274 |
INCLUDE |
Error É in line É of copycode É processing É | ||
|
NAT0280 |
RESET |
Index entry incorrectly specified for field. An index was specified for a variable for which indexing is not permitted. IF #LAST-POS LT 19 THEN RESET #INPUT.#CHAR-ARRAY(#LAST-POS+1:19) DECIDE FOR EVERY CONDITION The problem encountered was #CHAR-ARRAY which was defined with only 10 occurrences. Applied the following changes: IF #LAST-POS LT 10 THEN /* 19 RESET #INPUT.#CHAR-ARRAY(#LAST-POS+1:10) /* 19) | ||
|
NAT0281 |
MOVE |
Index entry missing or invalid for an array. MOVE +USDIP TO #SDIP This was an attempt in Reporting Mode to load the first four occurrences of an array into a large field (actually 4 times the size of a single element); made sense in Natural 2 Reporting Mode. Natural 3 does not permit this type of statement. Either redefine the target field to be able to move on an "element" by element level or use a simple loop to process the data: DEFINE DATA LOCAL 1 #ARRAY(A10/8) INIT <'one','two','three','four'> 1 #FIELD(A40) 1 #I(I1) 1 #J(I1) INIT <1> END-DEFINE FOR #I 1 4 MOVE #ARRAY(#I) TO SUBSTRING(#FIELD,#J,10) COMPUTE #J = (#I * 10) + 1 END-FOR DISPLAY #ARRAY(*) #FIELD END | ||
|
NAT0285 |
Line References |
It seems that Natural 3 no longer permits programmers to code line reference numbers with Natural System Variables once permitted in Natural. WRITE 3x *TIME(0470) / 3x *TIMN(0470) / 3x *TIMD(0430) In this example, the line references to line 470 are no longer permitted. They never really did anything except provide a form of documentation. However, *TIMD has always required a reference to the SETTIME statement and that hasn't changed with Natural 3. | ||
|
NAT0291 |
DEFINE DATA |
The format used of a database field is not compatible with the format of the field as defined in the data dictionary. This is probably due to Y2K fixes where an N6 definition is used for an (originally) A6 definition. NAT0291 Format for database field incompatible. > > + Pro In the example above it might be more prudent to just leave off the format/length "assignments" letting the program take the definition from the DDM.
| ||
|
NAT0300 |
MOVE |
Operands are not data transfer compatible. 2 OCP-FIFTH-DIGITÉP 1.0 (1:2) /* FIELD IN PE 2 OCP-SIX-DIGIT ÉP 1.0 (1:2) /* FIELD IN PE 2 #OCP-SIXTH-DIGIT (P1/1:4) MOVE OCP-SIX-DIGIT (#VHCL-INDEX) TO #OCP-SIXTH-DIGIT (#VHCL-INDEX) Arrays should be equally dimensioned. | ||
|
NAT0384 |
RESET
|
You'll get this if a field has not been defined somewhere. More often as not you're got a field missing from an external view (GDA or LOCAL USING) or a redefine is trying to reference a field in an old version of the program (probably a candidate for "retirement"). | ||
|
NAT0472 |
DEFINE DATA |
Misuse of a reserved word, for example: 1 COUNT (P5) is incorrect under Version 3. | ||
|
NAT0918 |
ON ERROR |
ESCAPE (TOP) not allowed in ON ERROR or AT block. This error may be caused by one of the following: 1. An ESCAPE statement was used to exit from a currently active ON ERROR block. However, an ON ERROR block must be exited with a FETCH, STOP, TERMINATE or RETURN statement. 2. An ESCAPE TOP statement was used within one of the following conditions: 3. &endash; AT BREAK 4. &endash; AT START/END OF DATA 2120 ON ERROR DO 2130 IF *ERROR = 3166 OR = 3199 DO 2140 ** WRITE 'BAD RECORD, ISN =' +ISN1 2150 * FETCH 'P16AB72P' 2160 ESCAPE 2170 DOEND /*(2130) 2180 DOEND /*2120) The ESCAPE in the above example has no loop to exit. Removing the ESCAPE statement may not be the answer unless we can evaluate how the program was originally invoked. | ||
|
NAT1167 |
Windows |
Invalid window page size (:1:),(4<=ps<=screen) Minimum window depth is 4. Minimum window width is 9. This applies to DEFINE WINDOW statements as well as %W window definitions. | ||
|
NAT3144 |
|
The specified ISN was not in 'hold' status. GET RECORD UPDATE RECORD END TRANSACTION UPDATE RECORD END TRANSACTION In Natural 3.1.2, the second UPDATE abends with a NAT3144. In order to fix the problem, you must either remove the first ET or GET the record with hold a second time. (Note: I use get in my example, but this applies to any database access statement) | ||