1#[derive(Clone, Copy, Debug, PartialEq, Eq)]
2pub enum Oracle {
3 Hercules,
5 EnterpriseCobol,
7 Db2,
9}
10
11#[derive(Clone, Copy, Debug, PartialEq, Eq)]
12pub enum Basis {
13 Documented,
15 Recalled,
17 Chosen,
19 Observed,
22}
23
24#[derive(Clone, Copy, Debug)]
25pub struct Assumption {
26 pub id: &'static str,
27 pub claim: &'static str,
28 pub basis: Basis,
29 pub oracle: Oracle,
30}
31
32pub const HFP_EXTENDED_LOW_HALF: &str = "M1";
33pub const HFP_FROM_FIXED_TRUNCATES: &str = "M2";
34pub const INTERMEDIATE_TABLE: &str = "C1";
35pub const TRUNC_OPT_IS_BINARY: &str = "C2";
36pub const PFD_MOVES_BYTES: &str = "C3";
37pub const PFD_COMPARES_LOGICALLY: &str = "C4";
38pub const FLOAT_FROM_DECIMAL: &str = "C5";
39pub const FLOAT_TO_DECIMAL: &str = "C6";
40pub const FLOAT_NARROWING_TRUNCATES: &str = "C7";
41pub const LE_MASKS_UNDERFLOW: &str = "C8";
42pub const PREFERRED_RESULT_SIGNS: &str = "C9";
43pub const ZONED_BY_PACK: &str = "C10";
44pub const CCSID_TABLES: &str = "C11";
45pub const WORKING_STORAGE_LAYOUT: &str = "C12";
46pub const NOPFD_REPAIRS_UNSIGNED_INPUT: &str = "C13";
47pub const DISPLAY_OF_NONDISPLAY_NUMERIC: &str = "C14";
48pub const ACCEPT_AT_END: &str = "C15";
49pub const CONTENT_LITERAL_ZONED: &str = "C16";
50pub const KEYED_FILE_STATUS: &str = "C17";
51pub const ALTERNATE_KEY_ORDER: &str = "C18";
52pub const FAILED_READ_LOSES_POSITION: &str = "C19";
53pub const START_COMPARES_SHORTER: &str = "C20";
54pub const REWRITE_SHARED_ALTERNATE: &str = "C21";
55pub const CICS_FRESH_STORAGE: &str = "C22";
56pub const CICS_CALEN_RESTORED: &str = "C23";
57pub const CICS_HANDLE_ABEND_CATCHES_CONDITIONS: &str = "C24";
58pub const CICS_LENGTH_DEFAULTS_TO_INTO: &str = "C25";
59pub const CICS_PROGRAM_CHECK_IS_ASRA: &str = "C26";
60pub const CICS_BROWSE_SKIP: &str = "C27";
61pub const BMS_RECEIVE_NULLS: &str = "C28";
62pub const BMS_INPUT_JUSTIFY: &str = "C29";
63pub const BMS_EXTENDED_ORDER: &str = "C30";
64pub const BMS_CONSTANTS_UNVERIFIED: &str = "C31";
65pub const BMS_SEND_DATA_CHOICE: &str = "C32";
66pub const CICS_INITIAL_AID: &str = "C33";
67pub const LONG_ZONED_BY_PACKS: &str = "C34";
68pub const ASCII_COLLATION: &str = "C35";
69pub const TABLE_SORT_COLLATION: &str = "C36";
70pub const ALPHABET_LITERALS: &str = "C37";
71pub const LE_SERVICE_AFTER_PROGRAMS: &str = "L1";
72pub const LE_ARGUMENTS_BY_ADDRESS: &str = "L2";
73pub const LE_FEEDBACK_TOKEN: &str = "L3";
74pub const LE_FEEDBACK_NO_INSTANCE_INFO: &str = "L4";
75pub const LE_OMITTED_FC_ABENDS: &str = "L5";
76pub const LE_CEE3ABD: &str = "L6";
77pub const LE_LOCAL_TIME_IS_UTC: &str = "L7";
78pub const LE_SECONDS_HFP: &str = "L8";
79pub const LE_PICTURE_OUTPUT: &str = "L9";
80pub const LE_PICTURE_INPUT: &str = "L10";
81pub const LE_CENTURY_WINDOW: &str = "L11";
82pub const LE_RETURN_CODE_UNCHANGED: &str = "L12";
83pub const LE_MESSAGE_AND_DUMP_FILES: &str = "L13";
84pub const LE_HEAP: &str = "L14";
85pub const LE_UNDER_CICS: &str = "L15";
86pub const LE_CEEIGZCT: &str = "L16";
87pub const LE_CEEIGZCT_DISAGREEMENTS: &str = "L17";
88pub const LE_SHORT_ARGUMENT_LIST: &str = "L18";
89pub const REPORT_WRITER_PRECOMPILER: &str = "RW1";
90pub const REPORT_TOTALS_BEFORE_PAGE_FIT: &str = "RW2";
91pub const REPORT_SOURCE_SUM_CORRELATION: &str = "RW3";
92pub const REPORT_PAGE_REGION_DEFAULTS: &str = "RW4";
93pub const REPORT_LINE_WRITES: &str = "RW5";
94pub const REPORT_CARRIAGE_CONTROL: &str = "RW6";
95pub const REPORT_RECORD_LENGTH: &str = "RW7";
96pub const REPORT_SUM_OVERFLOW: &str = "RW8";
97pub const REPORT_SOURCE_OVERFLOW: &str = "RW9";
98pub const REPORT_SUPPRESS_PRINTING: &str = "RW10";
99pub const REPORT_NEW_PAGES: &str = "RW11";
100pub const REPORT_OUT_OF_ORDER: &str = "RW12";
101pub const REPORT_CONTROL_AREA: &str = "RW13";
102pub const OBJECT_REFERENCE_VALUE: &str = "J1";
103pub const LOCAL_REFERENCES_EXPIRE: &str = "J2";
104pub const OBJECTS_NEVER_FREED: &str = "J3";
105pub const INSTANCE_DATA_START: &str = "J4";
106pub const FACTORY_DATA_START: &str = "J5";
107pub const METHOD_LOOKUP: &str = "J6";
108pub const METHOD_NAME_ITEM: &str = "J7";
109pub const INVOKE_NULL: &str = "J8";
110pub const NO_METHOD_ABEND: &str = "J9";
111pub const FACTORY_SELF: &str = "J10";
112pub const CLASS_SEARCH: &str = "J11";
113pub const INVOKE_KEEPS_RETURN_CODE: &str = "J12";
114pub const OO_OPTIONS_REQUIRED: &str = "J13";
115pub const CHAR_FROM_DISPLAY: &str = "J14";
116pub const LOCAL_REFERENCES_OUTSIDE_METHODS: &str = "J15";
117pub const SELF_IS_LOCAL: &str = "J16";
118pub const EXPIRED_REFERENCE_ABENDS: &str = "J17";
119pub const LOCAL_FRAMES: &str = "J18";
120pub const OO_OPTIONS_SEVERITY: &str = "J19";
121pub const REFERENCES_KEPT: &str = "J20";
122pub const SQL_COMMIT_AT_NORMAL_END: &str = "SQ1";
123pub const SQL_WHENEVER_ORDER: &str = "SQ2";
124pub const SQL_TRUNCATED_INDICATOR: &str = "SQ3";
125pub const SQL_POSTGRES_ERRORS: &str = "SQ4";
126pub const SQL_DIALECT_REWRITES: &str = "SQ5";
127pub const SQL_INTO_WITHOUT_COLONS: &str = "SQ7";
128pub const SQL_DECLARATIONS_CROSS_NESTED_PROGRAMS: &str = "SQ8";
129pub const SQL_DOUBLE_TO_HFP_TRUNCATES: &str = "SQ9";
130pub const SQL_ZONED_IS_DECIMAL: &str = "SQ10";
131pub const SQL_ISO_DATETIME: &str = "SQ11";
132pub const SQL_TRAILING_BLANKS_SENT: &str = "SQ12";
133pub const SQL_FETCH_ROW_COUNT: &str = "SQ13";
134pub const SORT_EQUAL_KEYS_IN_ORDER: &str = "S1";
135pub const MERGE_EQUAL_KEYS_BY_FILE: &str = "S2";
136pub const MERGE_OUT_OF_SEQUENCE_FAILS: &str = "S3";
137pub const SORT_FILE_FAILURE: &str = "S4";
138pub const SORT_DECIMAL_KEYS: &str = "S5";
139pub const SORT_RECORD_LENGTHS: &str = "S6";
140pub const SORT_RETURN_STOPS: &str = "S7";
141pub const RETURN_AFTER_END: &str = "S8";
142pub const SORT_KEY_INVALID_DIGITS: &str = "S9";
143pub const SORT_NEGATIVE_ZERO: &str = "S10";
144pub const FASTSRT_FILES: &str = "S11";
145pub const FASTSRT_STATUS: &str = "S12";
146pub const FASTSRT_FAILURE: &str = "S13";
147pub const SAME_AREA_VSAM: &str = "S14";
148pub const FASTSRT_PRINT_RECORDS: &str = "S15";
149pub const FASTSRT_RECORD_LENGTHS: &str = "S16";
150pub const FASTSRT_ADV_PRINT: &str = "S17";
151pub const PRINT_CONTROL_CHARACTER: &str = "C40";
152pub const PRINT_SPACING_RECORDS: &str = "C41";
153pub const PRINT_CONTROL_RUN_TIME: &str = "C42";
154pub const TEXT_PRINT_LINES: &str = "C43";
155pub const COMPILER_SEVERITIES: &str = "C44";
156pub const REFUSALS_ARE_SEVERE: &str = "C45";
157pub const REFUSED_FROM_S: &str = "C46";
158pub const NOCOMPILE: &str = "C47";
159pub const COMMENT_ENTRY_EXTENT: &str = "C80";
160pub const COMMENT_ENTRY_HEADERS: &str = "C81";
161pub const COMMENT_ENTRY_REMARKS: &str = "C82";
162pub const CONTINUED_LITERAL_QUOTES: &str = "C83";
163pub const COPY_SEARCH_ROUNDS: &str = "C85";
164pub const COPY_NOT_THE_PROGRAM: &str = "C86";
165pub const COPY_LITERAL_AS_WRITTEN: &str = "C87";
166pub const COPY_DOUBLED_PERIOD: &str = "C88";
167pub const LINAGE_COUNTER: &str = "C70";
168pub const LINAGE_PAGE_MOVEMENT: &str = "C71";
169pub const LINAGE_END_OF_PAGE: &str = "C72";
170pub const LINAGE_VALUES: &str = "C73";
171pub const LINAGE_EXTEND: &str = "C74";
172pub const LINAGE_COUNTER_BETWEEN_WRITES: &str = "C75";
173pub const PRINT_FILE_UPDATE: &str = "C76";
174pub const ENTRY_IN_SEQUENCE: &str = "C50";
175pub const ENTRY_CALLS: &str = "C51";
176pub const ALTERED_GO_TO_RESET: &str = "C52";
177pub const DISPLAY_STREAM: &str = "C53";
178pub const RANDOM_GENERATOR: &str = "C54";
179pub const ZERO_DIVISOR_CHECK: &str = "C55";
180pub const ERROR_DECLARATIVE_MODE: &str = "C60";
181pub const ERROR_DECLARATIVE_STATUSES: &str = "C61";
182pub const SORT_FILE_DECLARATIVE: &str = "C62";
183pub const DEBUG_RUNTIME_OPTION: &str = "C63";
184pub const DEBUG_LINE_NUMBER: &str = "C64";
185pub const DEBUG_LINE_STATEMENT: &str = "C65";
186pub const DEBUG_CONTENTS_LENGTH: &str = "C66";
187pub const DEBUG_NAME_FORM: &str = "C67";
188pub const DEBUGGING_SECTION_REFERENCES: &str = "C68";
189pub const GLOBAL_DECLARATIVES: &str = "C69";
190pub const SYNC_SUBORDINATE_GROUP: &str = "C90";
191pub const SYNC_ONLY_WHEN_WRITTEN: &str = "C91";
192pub const SYNC_SLACK_OWNER: &str = "C92";
193pub const SYNC_REDEFINES_REFUSED: &str = "C93";
194pub const DECIMAL_COMMA_SEPARATOR: &str = "C94";
195pub const DECIMAL_COMMA_DISPLAY_LITERAL: &str = "C95";
196pub const ARITH_DIGIT_LIMITS: &str = "C96";
197pub const MULTIPLE_RESULTS: &str = "C97";
198pub const ALTER_DEBUGGING: &str = "C98";
199pub const PERFORM_RETURN_POINTS: &str = "C99";
200pub const FLOAT_FUNCTION_ARGUMENTS: &str = "C100";
201
202pub const ASSUMPTIONS: &[Assumption] = &[
203 Assumption {
204 id: HFP_EXTENDED_LOW_HALF,
205 claim: "An extended HFP result's low half carries the high characteristic minus 14, modulo 128, and is all zero when the value is all zero bits (SA22-7832-14, HFP extended format, p. 18-4)",
206 basis: Basis::Documented,
207 oracle: Oracle::Hercules,
208 },
209 Assumption {
210 id: HFP_FROM_FIXED_TRUNCATES,
211 claim: "CONVERT FROM FIXED to HFP truncates the hexadecimal digits the precision cannot hold",
212 basis: Basis::Recalled,
213 oracle: Oracle::Hercules,
214 },
215 Assumption {
216 id: INTERMEDIATE_TABLE,
217 claim: "Intermediate results carry i and d places up to 30 digits (31 under ARITH(EXTEND)); beyond that, N-d and d when d <= dmax, else i and N-i when i+dmax <= N, else N-dmax and dmax; digits beyond are truncated",
218 basis: Basis::Recalled,
219 oracle: Oracle::EnterpriseCobol,
220 },
221 Assumption {
222 id: TRUNC_OPT_IS_BINARY,
223 claim: "Under TRUNC(OPT) a binary receiver whose value exceeds its PICTURE is truncated at the halfword, fullword or doubleword, as under TRUNC(BIN)",
224 basis: Basis::Chosen,
225 oracle: Oracle::EnterpriseCobol,
226 },
227 Assumption {
228 id: PFD_MOVES_BYTES,
229 claim: "Under NUMPROC(PFD) a MOVE between packed items of the same length and scale copies the bytes, so a non-preferred sign passes through; under NOPFD the receiver gets the preferred sign",
230 basis: Basis::Chosen,
231 oracle: Oracle::EnterpriseCobol,
232 },
233 Assumption {
234 id: PFD_COMPARES_LOGICALLY,
235 claim: "Under NUMPROC(PFD) two packed items of the same length and scale compare byte by byte, so X'1F' and X'1C' differ",
236 basis: Basis::Chosen,
237 oracle: Oracle::EnterpriseCobol,
238 },
239 Assumption {
240 id: FLOAT_FROM_DECIMAL,
241 claim: "A fixed-point decimal m with s decimal places becomes HFP as CONVERT FROM FIXED of m, then an HFP divide by 10^s",
242 basis: Basis::Chosen,
243 oracle: Oracle::EnterpriseCobol,
244 },
245 Assumption {
246 id: FLOAT_TO_DECIMAL,
247 claim: "An HFP value moved to a fixed-point receiver is its exact value truncated at the receiver's scale, or rounded half away from zero under ROUNDED",
248 basis: Basis::Chosen,
249 oracle: Oracle::EnterpriseCobol,
250 },
251 Assumption {
252 id: FLOAT_NARROWING_TRUNCATES,
253 claim: "A floating-point intermediate stored into a narrower COMP-1 or COMP-2 keeps its high-order part (truncation), not LOAD ROUNDED",
254 basis: Basis::Chosen,
255 oracle: Oracle::EnterpriseCobol,
256 },
257 Assumption {
258 id: LE_MASKS_UNDERFLOW,
259 claim: "Language Environment runs COBOL with the HFP exponent-underflow and significance masks off, so both yield a true zero",
260 basis: Basis::Chosen,
261 oracle: Oracle::EnterpriseCobol,
262 },
263 Assumption {
264 id: PREFERRED_RESULT_SIGNS,
265 claim: "Arithmetic results take the preferred sign under either NUMPROC setting: C or D for a signed item, F for an unsigned one",
266 basis: Basis::Recalled,
267 oracle: Oracle::EnterpriseCobol,
268 },
269 Assumption {
270 id: ZONED_BY_PACK,
271 claim: "A zoned operand enters arithmetic as PACK leaves it: zones other than the sign's are discarded, so an embedded space is a zero digit",
272 basis: Basis::Chosen,
273 oracle: Oracle::EnterpriseCobol,
274 },
275 Assumption {
276 id: CCSID_TABLES,
277 claim: "The compiler's conversion to UTF-16 for each carried CCSID is ICU's ibm-* table for it, byte for byte",
278 basis: Basis::Chosen,
279 oracle: Oracle::EnterpriseCobol,
280 },
281 Assumption {
282 id: WORKING_STORAGE_LAYOUT,
283 claim: "Each 01 and 77 item of WORKING-STORAGE starts on an 8-byte boundary in source order, and storage without a VALUE starts as X'00'",
284 basis: Basis::Chosen,
285 oracle: Oracle::EnterpriseCobol,
286 },
287 Assumption {
288 id: NOPFD_REPAIRS_UNSIGNED_INPUT,
289 claim: "Under NUMPROC(NOPFD) an unsigned packed or zoned operand's sign is forced to X'F' before use, so no sign makes it a data exception; under PFD it is used as it stands",
290 basis: Basis::Chosen,
291 oracle: Oracle::EnterpriseCobol,
292 },
293 Assumption {
294 id: DISPLAY_OF_NONDISPLAY_NUMERIC,
295 claim: "DISPLAY shows a packed or binary item as zoned digits of its PICTURE, with the sign overpunched on the last digit when the item is signed; a COMP-5 item, or any binary item under TRUNC(BIN), shows its whole binary value in 5, 10, or 19 (signed) or 20 digits for a halfword, fullword or doubleword",
296 basis: Basis::Chosen,
297 oracle: Oracle::EnterpriseCobol,
298 },
299 Assumption {
300 id: ACCEPT_AT_END,
301 claim: "ACCEPT from SYSIN at its end leaves the receiving item unchanged and the run continues",
302 basis: Basis::Chosen,
303 oracle: Oracle::EnterpriseCobol,
304 },
305 Assumption {
306 id: CONTENT_LITERAL_ZONED,
307 claim: "A numeric literal passed BY CONTENT arrives as zoned decimal of its own digits, the sign overpunched when negative",
308 basis: Basis::Chosen,
309 oracle: Oracle::EnterpriseCobol,
310 },
311 Assumption {
312 id: KEYED_FILE_STATUS,
313 claim: "Indexed and relative files report 02 for a shared alternate key, 14 for a record number too long for the RELATIVE KEY on sequential READ, 21 for a sequential WRITE whose key is not above the last (equal included) or a REWRITE that changed the key, 22 duplicate, 23 not found, 24 a record number below 1 or too long for the RELATIVE KEY on WRITE, 43 REWRITE or DELETE with no READ just before, 46 READ NEXT with no next record, and 47, 48, 49 for the wrong open mode",
314 basis: Basis::Recalled,
315 oracle: Oracle::EnterpriseCobol,
316 },
317 Assumption {
318 id: ALTERNATE_KEY_ORDER,
319 claim: "Records sharing an alternate key come back in the order they were written; a record REWRITTEN with a new alternate key goes after the others with it",
320 basis: Basis::Recalled,
321 oracle: Oracle::EnterpriseCobol,
322 },
323 Assumption {
324 id: FAILED_READ_LOSES_POSITION,
325 claim: "A random READ that finds no record leaves no next record, so READ NEXT then gives 46",
326 basis: Basis::Chosen,
327 oracle: Oracle::EnterpriseCobol,
328 },
329 Assumption {
330 id: START_COMPARES_SHORTER,
331 claim: "START compares the key with its operand over the shorter of the two, left to right, as bytes",
332 basis: Basis::Recalled,
333 oracle: Oracle::EnterpriseCobol,
334 },
335 Assumption {
336 id: CICS_FRESH_STORAGE,
337 claim: "A COBOL program reached by EXEC CICS LINK or XCTL starts with fresh WORKING-STORAGE each time, unlike one reached by CALL",
338 basis: Basis::Recalled,
339 oracle: Oracle::EnterpriseCobol,
340 },
341 Assumption {
342 id: CICS_CALEN_RESTORED,
343 claim: "EIBCALEN is the linked program's COMMAREA length while it runs and the caller's again after the LINK returns",
344 basis: Basis::Chosen,
345 oracle: Oracle::EnterpriseCobol,
346 },
347 Assumption {
348 id: CICS_HANDLE_ABEND_CATCHES_CONDITIONS,
349 claim: "HANDLE ABEND LABEL receives control when a condition nothing handles would abend the task (AEIx), and is cancelled by being taken",
350 basis: Basis::Recalled,
351 oracle: Oracle::EnterpriseCobol,
352 },
353 Assumption {
354 id: CICS_LENGTH_DEFAULTS_TO_INTO,
355 claim: "READ, READNEXT, READPREV, READQ TS and READQ TD without LENGTH take the INTO item's length as the limit, so a longer record raises LENGERR",
356 basis: Basis::Recalled,
357 oracle: Oracle::EnterpriseCobol,
358 },
359 Assumption {
360 id: CICS_PROGRAM_CHECK_IS_ASRA,
361 claim: "A program check (S0C4, S0C7 and the like) in a CICS task ends it with transaction abend ASRA",
362 basis: Basis::Recalled,
363 oracle: Oracle::EnterpriseCobol,
364 },
365 Assumption {
366 id: CICS_BROWSE_SKIP,
367 claim: "READNEXT after the program changed RIDFLD to a key the browse is not at continues from the first record at or after the new RIDFLD (skip-sequential)",
368 basis: Basis::Recalled,
369 oracle: Oracle::EnterpriseCobol,
370 },
371 Assumption {
372 id: BMS_RECEIVE_NULLS,
373 claim: "RECEIVE MAP sets the input map to nulls, then fills only the fields the operator modified; a field erased to empty gets F = X'80' and L = 0",
374 basis: Basis::Recalled,
375 oracle: Oracle::EnterpriseCobol,
376 },
377 Assumption {
378 id: BMS_INPUT_JUSTIFY,
379 claim: "Input data lands left-justified and blank-filled unless JUSTIFY says otherwise, and a NUM field right-justified and zero-filled, the defaults IBM documents for JUSTIFY",
380 basis: Basis::Recalled,
381 oracle: Oracle::EnterpriseCobol,
382 },
383 Assumption {
384 id: BMS_EXTENDED_ORDER,
385 claim: "A field's extended attribute bytes in the symbolic map follow its A byte in the order COLOR, PS, HILIGHT, VALIDN, OUTLINE, SOSI, TRANSP",
386 basis: Basis::Chosen,
387 oracle: Oracle::EnterpriseCobol,
388 },
389 Assumption {
390 id: BMS_CONSTANTS_UNVERIFIED,
391 claim: "DFHNULL is X'00', and DFHBMPEM, DFHBMPNL, DFHBMPFF and DFHBMPCR are X'19', X'15', X'0C' and X'0D'",
392 basis: Basis::Recalled,
393 oracle: Oracle::EnterpriseCobol,
394 },
395 Assumption {
396 id: BMS_SEND_DATA_CHOICE,
397 claim: "SEND MAP without MAPONLY or DATAONLY sends a field's symbolic data when its first byte is not X'00', else the map's INITIAL, and a non-null A byte replaces ATTRB",
398 basis: Basis::Recalled,
399 oracle: Oracle::EnterpriseCobol,
400 },
401 Assumption {
402 id: CICS_INITIAL_AID,
403 claim: "A task started by terminal input sees that input's AID in EIBAID before any RECEIVE",
404 basis: Basis::Recalled,
405 oracle: Oracle::EnterpriseCobol,
406 },
407 Assumption {
408 id: REWRITE_SHARED_ALTERNATE,
409 claim: "REWRITE gives 02 whenever another record shares one of the record's alternate keys that allow duplicates, whether or not that key changed",
410 basis: Basis::Chosen,
411 oracle: Oracle::EnterpriseCobol,
412 },
413 Assumption {
414 id: LE_SERVICE_AFTER_PROGRAMS,
415 claim: "A CALL that finds no program of its name in the run unit or its program libraries reaches the Language Environment callable service of that name, as a link-edit that finds the name in no user library resolves it from SCEELKED; a user program of the same name comes first",
416 basis: Basis::Chosen,
417 oracle: Oracle::EnterpriseCobol,
418 },
419 Assumption {
420 id: LE_ARGUMENTS_BY_ADDRESS,
421 claim: "A callable service reads and stores each parameter at its argument's address for the length SA38-0683-60 gives it (fullword, halfword-prefixed string, 8-byte COMP-2, 17- or 80-byte string, 12-byte feedback code), whatever the argument's own length; an OMITTED parameter other than fc is a protection exception (S0C4), and a store past the end of the run unit's storage is lost",
422 basis: Basis::Chosen,
423 oracle: Oracle::EnterpriseCobol,
424 },
425 Assumption {
426 id: LE_FEEDBACK_TOKEN,
427 claim: "A feedback code is 12 bytes: severity and message number as halfwords, a byte of case 1, severity and control 001 (X'59' at severity 3), the facility CEE in EBCDIC, then the instance-specific word; twelve zero bytes are CEE000, success (SA38-0683-60, _FEEDBACK in Table 20; so CEE2EB, severity 3 and message 2507, is X'000309CB59C3C5C5')",
428 basis: Basis::Documented,
429 oracle: Oracle::EnterpriseCobol,
430 },
431 Assumption {
432 id: LE_FEEDBACK_NO_INSTANCE_INFO,
433 claim: "The instance-specific word of every feedback code the provided services return is zero",
434 basis: Basis::Chosen,
435 oracle: Oracle::EnterpriseCobol,
436 },
437 Assumption {
438 id: LE_OMITTED_FC_ABENDS,
439 claim: "With fc OMITTED a failing service signals its condition (SA38-0683-60, Invoking callable services); nothing handles it, so one of severity 2 or more ends the run as the default ABTERMENC(ABEND) does, with user abend U4038, and one of severity 1 lets the run continue",
440 basis: Basis::Recalled,
441 oracle: Oracle::EnterpriseCobol,
442 },
443 Assumption {
444 id: LE_CEE3ABD,
445 claim: "CEE3ABD ends the run with user abend abcode modulo 4096, the ABEND macro's user completion code, to which SA38-0683-60 says abcode passes unchecked; every clean-up value ends it alike: open files are closed as at any ironwork abend, and neither a CEEDUMP nor a system dump is written",
446 basis: Basis::Chosen,
447 oracle: Oracle::EnterpriseCobol,
448 },
449 Assumption {
450 id: LE_LOCAL_TIME_IS_UTC,
451 claim: "Local time is UTC: CEELOCT and CEEGMT read the clock that ACCEPT FROM DATE and TIME and CURRENT-DATE read, and CEEGMTO reports a zero offset, as CURRENT-DATE reports +0000",
452 basis: Basis::Chosen,
453 oracle: Oracle::EnterpriseCobol,
454 },
455 Assumption {
456 id: LE_SECONDS_HFP,
457 claim: "Lilian seconds are the whole number of milliseconds converted to long HFP and divided by 1000, truncating as FLOAT_FROM_DECIMAL does, so a MOVE of CEESECS's result to a decimal item can show a millisecond less; seconds given to CEEDATM are taken to the nearest millisecond",
458 basis: Basis::Chosen,
459 oracle: Oracle::EnterpriseCobol,
460 },
461 Assumption {
462 id: LE_PICTURE_OUTPUT,
463 claim: "CEEDATE and CEEDATM write the terms of SA38-0683-60 Table 34 and copy anything else as it stands, with English month and day names; MM after an hour term is minutes (Table 28); CEEDATE writes time terms as zero and AP as AM (Table 27, where Table 35 says blank); the eras <JJJJ>, <CCCC> and YYY are not provided and give CEE2EM; a null or blank picture is the COUNTRY(US) default of Table 33",
464 basis: Basis::Chosen,
465 oracle: Oracle::EnterpriseCobol,
466 },
467 Assumption {
468 id: LE_PICTURE_INPUT,
469 claim: "CEEDAYS and CEESECS read a numeric term followed by a delimiter as up to its width of digits (6/2/88 for MM/DD/YY) and any other as exactly its width, leading blanks allowed; a delimiter takes one character, whatever it is; a month name is three or more of its letters; input that ends before the date is complete is CEE2EB, before the time is complete, zeros; a non-digit is CEE2EO (CEE2ET for CEESECS)",
470 basis: Basis::Chosen,
471 oracle: Oracle::EnterpriseCobol,
472 },
473 Assumption {
474 id: LE_CENTURY_WINDOW,
475 claim: "A two-digit year falls in the hundred years starting 80 years before the current year (SA38-0683-60, CEEDAYS and CEESECS); CEESCEN, which moves the window, is not provided",
476 basis: Basis::Documented,
477 oracle: Oracle::EnterpriseCobol,
478 },
479 Assumption {
480 id: LE_RETURN_CODE_UNCHANGED,
481 claim: "A CALL of a callable service leaves RETURN-CODE as it was; SA38-0683-60 leaves register 15 undefined on return",
482 basis: Basis::Chosen,
483 oracle: Oracle::EnterpriseCobol,
484 },
485 Assumption {
486 id: LE_MESSAGE_AND_DUMP_FILES,
487 claim: "CEEMOUT writes to DD SYSOUT, MSGFILE's default ddname, and CEE3DMP to DD CEEDUMP or the ddname FNAME gives, as UTF-8 text lines, the run's first write replacing the file, or to standard error without the DD; CEE3DMP writes its title, date and time, options and the active programs, not storage or control blocks",
488 basis: Basis::Chosen,
489 oracle: Oracle::EnterpriseCobol,
490 },
491 Assumption {
492 id: LE_HEAP,
493 claim: "CEEGTST gives zeroed run-unit storage on a doubleword from heap 0 only, refuses a request above 256 MiB with CEE0PD, and keeps the storage until the run ends; CEEFRST marks it free, and it is not reused",
494 basis: Basis::Chosen,
495 oracle: Oracle::EnterpriseCobol,
496 },
497 Assumption {
498 id: LE_UNDER_CICS,
499 claim: "In a CICS task, CEE3ABD ends the task as EXEC CICS ABEND CANCEL would, with abcode modulo 4096 as a four-digit decimal ABCODE, so HANDLE ABEND does not catch it; CEEMOUT and CEE3DMP write each line as one item on transient data queue CESE, as MSGFILE and any DD are ignored under CICS (SA38-0683-60), without the terminal, transaction and time prefix CICS may put on a CESE record",
500 basis: Basis::Chosen,
501 oracle: Oracle::EnterpriseCobol,
502 },
503 Assumption {
504 id: REPORT_WRITER_PRECOMPILER,
505 claim: "Enterprise COBOL takes the REPORT SECTION, the FD REPORT clause, INITIATE, GENERATE, TERMINATE, PAGE-COUNTER, LINE-COUNTER, PRINT-SWITCH and USE BEFORE REPORTING only through the COBOL Report Writer Precompiler, 5798-DYR (Migration Guide GC27-8715-04, pp. 69-70); a Report Writer program runs as the precompiler's generated COBOL runs, with the precompiler as supplied, option OSVS on (SC26-4301-04, 1.1.3)",
506 basis: Basis::Documented,
507 oracle: Oracle::EnterpriseCobol,
508 },
509 Assumption {
510 id: REPORT_TOTALS_BEFORE_PAGE_FIT,
511 claim: "Under OSVS a report group's totalling (cross-footing, subtotalling, rolling forward) comes before its USE BEFORE REPORTING procedure and its page-fit test, so a group that forces a new page is already in the totals the PAGE FOOTING shows (SC26-4301-04, 4.2.4)",
512 basis: Basis::Documented,
513 oracle: Oracle::EnterpriseCobol,
514 },
515 Assumption {
516 id: REPORT_SOURCE_SUM_CORRELATION,
517 claim: "Under OSVS a SUM of an item outside the REPORT SECTION that a DETAIL group has as a SOURCE is added only when such a DETAIL is generated, and once for each such DETAIL on GENERATE report-name; UPON names the DETAILs outright; any other such operand is added on every GENERATE (SC26-4301-04, 3.23.5 and 4.2.3)",
518 basis: Basis::Documented,
519 oracle: Oracle::EnterpriseCobol,
520 },
521 Assumption {
522 id: REPORT_PAGE_REGION_DEFAULTS,
523 claim: "With no FOOTING, LAST CONTROL FOOTING is LAST DETAIL when that is written, else the line before the PAGE FOOTING (for a relative PAGE FOOTING, the line that puts its last line on PAGE LIMIT), else PAGE LIMIT; the standard would take PAGE LIMIT. With no LAST DETAIL it is FOOTING; a PAGE LIMIT below either is raised to it (SC26-4301-04, 2.9.3 and message RW-031)",
524 basis: Basis::Documented,
525 oracle: Oracle::EnterpriseCobol,
526 },
527 Assumption {
528 id: REPORT_LINE_WRITES,
529 claim: "Each report line is one WRITE AFTER ADVANCING: the first line of a page AFTER ADVANCING PAGE when it is line 1, otherwise after a record of spaces, with no CODE, written AFTER ADVANCING PAGE; every other line after the distance from the last; a report with no PAGE LIMIT never skips to a new page. The manual shows this for its file handlers and says the direct output also writes line 1 at the top of the page (SC26-4301-04, 5.3.8 and 6.3)",
530 basis: Basis::Chosen,
531 oracle: Oracle::EnterpriseCobol,
532 },
533 Assumption {
534 id: REPORT_CARRIAGE_CONTROL,
535 claim: "A report file is written AFTER ADVANCING, so each report record carries an ASA control character (PRINT_CONTROL_CHARACTER): under ADV a byte before the record, under NOADV the record's first byte, which the precompiler leaves for it (SC26-4301-04, 2.2.3 rules 7 to 9, 2.7.2 rule 3). The CODE comes after the control character, as 5.3.2 says of the PRNT handler, which prints as no handler does, though 2.5.3 rule 2 puts it before",
536 basis: Basis::Chosen,
537 oracle: Oracle::EnterpriseCobol,
538 },
539 Assumption {
540 id: REPORT_RECORD_LENGTH,
541 claim: "A report file whose FD has no RECORD CONTAINS has records as long as the longest line of its reports, rounded up to a multiple of 4, plus the CODE and the control character (SC26-4301-04, 2.2.3 rule 7), the FD's record holding the control character only under NOADV (rule 8, 2.7.2 rule 3), so that under ADV a RECORD CONTAINS length is the line and CODE alone; under RECORDING MODE V each record ends after its last printed field (rule 9)",
542 basis: Basis::Documented,
543 oracle: Oracle::EnterpriseCobol,
544 },
545 Assumption {
546 id: REPORT_SUM_OVERFLOW,
547 claim: "A SUM total is a signed binary item with the integer and decimal places of its SUM entry, widened to those of a REPORT SECTION item it totals, and packed decimal beyond 18 digits (SC26-4301-04, 3.23.4); an addition that would overflow it is not made and run-time error 11 is logged, as 2.8.3 says for SUM OVERFLOW STANDARD, though 3.23.8 says the field then prints blank",
548 basis: Basis::Chosen,
549 oracle: Oracle::EnterpriseCobol,
550 },
551 Assumption {
552 id: REPORT_SOURCE_OVERFLOW,
553 claim: "A SOURCE arithmetic expression that overflows its field or divides by zero leaves the field blank and logs run-time error 10, OVERFLOW PROCEDURE IS STANDARD being the default (SC26-4301-04, 2.8.3)",
554 basis: Basis::Documented,
555 oracle: Oracle::EnterpriseCobol,
556 },
557 Assumption {
558 id: REPORT_SUPPRESS_PRINTING,
559 claim: "SUPPRESS PRINTING, or PRINT-SWITCH left non-zero by a USE BEFORE REPORTING procedure, stops the group's lines, page-fit test and NEXT GROUP, but its totals are still reset; 4.5.3 and 4.7.3 of SC26-4301-04 say so, while 4.2.4 step 9 says no further action is taken",
560 basis: Basis::Chosen,
561 oracle: Oracle::EnterpriseCobol,
562 },
563 Assumption {
564 id: REPORT_NEW_PAGES,
565 claim: "LINE ... NEXT PAGE skips to a new page only when a body group is already on the page; a REPORT FOOTING on a page of its own gets no PAGE HEADING or PAGE FOOTING; a page holding the REPORT HEADING alone gets no PAGE FOOTING (SC26-4301-04, 3.24.3)",
566 basis: Basis::Chosen,
567 oracle: Oracle::EnterpriseCobol,
568 },
569 Assumption {
570 id: REPORT_OUT_OF_ORDER,
571 claim: "GENERATE for a report not initiated logs run-time error 14 and initiates it (SC26-4301-04, message RW-142); INITIATE of an active report starts it afresh; TERMINATE of an inactive report does nothing",
572 basis: Basis::Chosen,
573 oracle: Oracle::EnterpriseCobol,
574 },
575 Assumption {
576 id: REPORT_CONTROL_AREA,
577 claim: "PAGE-COUNTER, LINE-COUNTER and PRINT-SWITCH are S9(9) COMP items (PAGE-COUNTER's PICTURE is in SC26-4301-04, 3.15.2); each report's control area, fields and totals are WORKING-STORAGE after the program's own items, so CANCEL and IS INITIAL start the report afresh",
578 basis: Basis::Chosen,
579 oracle: Oracle::EnterpriseCobol,
580 },
581 Assumption {
582 id: OBJECT_REFERENCE_VALUE,
583 claim: "An object reference is four bytes, as under LP(32): zero for NULL, otherwise the number of the local or global reference it holds, never reused in the run unit; each NEW, RETURNING value, argument received, SELF and reference a JNI service makes is a new number, so two references to one object can differ byte for byte, and = compares the objects they identify (Language Reference SC27-8713-03, p. 282)",
584 basis: Basis::Chosen,
585 oracle: Oracle::EnterpriseCobol,
586 },
587 Assumption {
588 id: LOCAL_REFERENCES_EXPIRE,
589 claim: "The object references a method receives as arguments, gets back as INVOKE RETURNING values or from JNI services, and makes with INVOKE ... NEW are local references, valid until the method returns, whatever kind the invoked method returned; NewGlobalRef makes a global reference, valid until DeleteGlobalRef, and DeleteLocalRef frees a local reference at once (Programming Guide SC27-8714-03, pp. 702-703 and 721-723; Language Reference SC27-8713-03, p. 365). SET copies a reference and converts nothing (Language Reference p. 451), so the Guide's 'use a SET statement to convert' (p. 722) is read as the CALL of NewGlobalRef it shows on p. 702, and a local reference kept in OBJECT, FACTORY or method WORKING-STORAGE expires, which p. 722 calls an error",
590 basis: Basis::Documented,
591 oracle: Oracle::EnterpriseCobol,
592 },
593 Assumption {
594 id: OBJECTS_NEVER_FREED,
595 claim: "Objects are never freed, and a run unit that creates more than 1,000,000 of them abends, where Java's garbage collector reclaims objects no longer referred to",
596 basis: Basis::Chosen,
597 oracle: Oracle::EnterpriseCobol,
598 },
599 Assumption {
600 id: INSTANCE_DATA_START,
601 claim: "INVOKE class NEW gives each COBOL class in the new object's hierarchy its own copy of its OBJECT WORKING-STORAGE, set to X'00' and then to its VALUE clauses; IBM documents only the VALUE clauses",
602 basis: Basis::Chosen,
603 oracle: Oracle::EnterpriseCobol,
604 },
605 Assumption {
606 id: FACTORY_DATA_START,
607 claim: "A class's FACTORY WORKING-STORAGE is set to X'00' and then to its VALUE clauses when the run unit first uses the class, and its one copy serves every INVOKE of the class's factory methods, through a subclass too",
608 basis: Basis::Chosen,
609 oracle: Oracle::EnterpriseCobol,
610 },
611 Assumption {
612 id: METHOD_LOOKUP,
613 claim: "INVOKE selects the method by its name, case kept, and the Java types of its arguments and RETURNING item (void without one), a universal object reference counting as java.lang.Object; the search starts at the class of the object itself, not the class its reference is typed with, and goes up the INHERITS chain; SUPER starts at the parent of the class that defines the running method",
614 basis: Basis::Chosen,
615 oracle: Oracle::EnterpriseCobol,
616 },
617 Assumption {
618 id: METHOD_NAME_ITEM,
619 claim: "A method name held in a data item is the item's content without its trailing spaces",
620 basis: Basis::Chosen,
621 oracle: Oracle::EnterpriseCobol,
622 },
623 Assumption {
624 id: INVOKE_NULL,
625 claim: "INVOKE on a NULL object reference, or on four bytes that name no object, ends the run with an abend; IBM leaves the result undefined",
626 basis: Basis::Chosen,
627 oracle: Oracle::EnterpriseCobol,
628 },
629 Assumption {
630 id: NO_METHOD_ABEND,
631 claim: "An INVOKE without ON EXCEPTION that finds no method raises IBM's severity-3 Language Environment condition, which ends the run with abend U4038",
632 basis: Basis::Chosen,
633 oracle: Oracle::EnterpriseCobol,
634 },
635 Assumption {
636 id: FACTORY_SELF,
637 claim: "SELF in a factory method is the factory object of the class that defines the method, and INVOKE on a reference to a factory object runs factory methods",
638 basis: Basis::Chosen,
639 oracle: Oracle::EnterpriseCobol,
640 },
641 Assumption {
642 id: CLASS_SEARCH,
643 claim: "A class is a COBOL class when a class definition with its external name is among the programs read or in the program libraries, as a member named with its simple name or its full name with periods as underscores, as IBM names the class's DLL; any other class is a Java class",
644 basis: Basis::Chosen,
645 oracle: Oracle::EnterpriseCobol,
646 },
647 Assumption {
648 id: INVOKE_KEEPS_RETURN_CODE,
649 claim: "INVOKE leaves the invoking program's RETURN-CODE as it was (Language Reference, INVOKE statement, RETURNING phrase)",
650 basis: Basis::Documented,
651 oracle: Oracle::EnterpriseCobol,
652 },
653 Assumption {
654 id: OO_OPTIONS_REQUIRED,
655 claim: "A class definition, and a program with INVOKE or an object reference, is compiled with THREAD, DLL, RENT and DBCS (Programming Guide SC27-8714-03, pp. 291, 295, 363, 588, 591, 694; Language Reference SC27-8713-03, p. 89), and NORENT with THREAD or DLL is a conflict IBM resolves as RENT (Guide pp. 344-345). Under THREAD a program is RECURSIVE ('an error will occur', Guide p. 591; Language Reference p. 103), and INITIAL, nested programs, SORT of a file and MERGE are diagnosed as errors (Guide p. 418; Language Reference pp. 85, 103, 400, 452); a table SORT is allowed (p. 453), and a method is recursive without it (p. 94). The options are the CBL and PROCESS cards' over IBM's defaults NOTHREAD, NODLL, RENT and DBCS",
656 basis: Basis::Documented,
657 oracle: Oracle::EnterpriseCobol,
658 },
659 Assumption {
660 id: CHAR_FROM_DISPLAY,
661 claim: "A one-byte reference modification of a display item passed to INVOKE becomes a Java char through the program's code page",
662 basis: Basis::Chosen,
663 oracle: Oracle::EnterpriseCobol,
664 },
665 Assumption {
666 id: SORT_EQUAL_KEYS_IN_ORDER,
667 claim: "Records with equal keys leave a SORT in the order they entered it whether or not WITH DUPLICATES IN ORDER is written, as under DFSORT's EQUALS; a table SORT keeps equal elements in their order too",
668 basis: Basis::Chosen,
669 oracle: Oracle::EnterpriseCobol,
670 },
671 Assumption {
672 id: MERGE_EQUAL_KEYS_BY_FILE,
673 claim: "Records with equal keys leave a MERGE in the order of the USING files, and each file's in its own order",
674 basis: Basis::Chosen,
675 oracle: Oracle::EnterpriseCobol,
676 },
677 Assumption {
678 id: MERGE_OUT_OF_SEQUENCE_FAILS,
679 claim: "A MERGE input file whose records are out of the merge order makes the MERGE fail with SORT-RETURN 16 before any record is output, as DFSORT's ICE068A ends a merge",
680 basis: Basis::Recalled,
681 oracle: Oracle::EnterpriseCobol,
682 },
683 Assumption {
684 id: SORT_FILE_FAILURE,
685 claim: "An I/O failure on a USING or GIVING file with a FILE STATUS sets the status and makes the SORT or MERGE fail with SORT-RETURN 16, leaving the rest undone; without a FILE STATUS it ends the run as the same failure on OPEN, READ, WRITE or CLOSE does",
686 basis: Basis::Chosen,
687 oracle: Oracle::EnterpriseCobol,
688 },
689 Assumption {
690 id: SORT_DECIMAL_KEYS,
691 claim: "A file SORT or MERGE compares a zoned or packed key as DFSORT compares ZD, PD, CLO, CSL and CST fields (z/OS DFSORT Application Programming Guide SC23-6878-50, Appendix C, pp. 825-828): sign nibbles F, E, C, A, 8, 6, 4, 2 and 0 are positive and D, B, 9, 7, 5, 3 and 1 negative, a separate sign is negative only when it is '-', the zones of the other digits are ignored, and no key is a data exception; a binary key compares at its full width (BI, FI) and a floating-point one by value (FL). -strict-sort-keys reads the key as the program would, so an invalid one is S0C7; a table SORT always compares as a relation condition does",
692 basis: Basis::Documented,
693 oracle: Oracle::EnterpriseCobol,
694 },
695 Assumption {
696 id: SORT_RECORD_LENGTHS,
697 claim: "A record shorter than a fixed-length SD or GIVING record is padded with spaces and a longer one cut to that length; a variable-length record that ends inside a key makes the SORT or MERGE fail with SORT-RETURN 16, as DFSORT does without VLSHRT",
698 basis: Basis::Chosen,
699 oracle: Oracle::EnterpriseCobol,
700 },
701 Assumption {
702 id: SORT_RETURN_STOPS,
703 claim: "SORT-RETURN is 0 when a SORT or MERGE starts; 16 moved to it in an input or output procedure stops the operation at the next RELEASE or RETURN, which does nothing, or when the input procedure ends",
704 basis: Basis::Chosen,
705 oracle: Oracle::EnterpriseCobol,
706 },
707 Assumption {
708 id: RETURN_AFTER_END,
709 claim: "A RETURN after the AT END condition takes the AT END phrase again",
710 basis: Basis::Chosen,
711 oracle: Oracle::EnterpriseCobol,
712 },
713 Assumption {
714 id: SORT_KEY_INVALID_DIGITS,
715 claim: "A digit nibble A to F in a zoned or packed sort key collates above 9 in its place; DFSORT does not say where such a key collates",
716 basis: Basis::Chosen,
717 oracle: Oracle::EnterpriseCobol,
718 },
719 Assumption {
720 id: SORT_NEGATIVE_ZERO,
721 claim: "A zoned or packed sort key of -0 collates before +0 in ascending order, as under DFSORT's SZERO=YES (Installation and Customization SC23-6881-70, p. 99), the IBM-supplied default",
722 basis: Basis::Recalled,
723 oracle: Oracle::EnterpriseCobol,
724 },
725 Assumption {
726 id: FASTSRT_FILES,
727 claim: "Under FASTSRT DFSORT does the I/O of a SORT's only USING file and its only GIVING file, except a MERGE's, a line-sequential or variable-length relative file, a GIVING file whose FD has LINAGE (p. 233), a print file under ADV unless --fastsrt-adv-print=include, one whose records differ from the SD's in format (fixed or variable) or largest length, and a GIVING file that is also the USING file; COBOL does the rest as under NOFASTSRT (Programming Guide SC27-8714-03, pp. 232-233, 369). The Guide does not name a print file under ADV. By default, --fastsrt-adv-print=exclude, it is left to COBOL, because ADV adds a byte to its record length for the printer control character (p. 346), which the DD's LRECL counts (p. 185): p. 233 wants the SD's and the FD's largest records the same length and p. 232 the DD to match the FD, so with the FD's record as long as the SD's the data set's records are a byte longer than DFSORT's, and with it a byte shorter the FD's and the SD's differ. --fastsrt-adv-print=include reads p. 233 as the FD's length alone and gives the file to DFSORT, as FASTSRT_ADV_PRINT says. Under NOADV the character is inside the FD's record and the lengths rule alone applies",
728 basis: Basis::Documented,
729 oracle: Oracle::EnterpriseCobol,
730 },
731 Assumption {
732 id: FASTSRT_STATUS,
733 claim: "A file whose I/O DFSORT does keeps the FILE STATUS it had through the SORT, and a GIVING relative file's RELATIVE KEY is not set (Programming Guide SC27-8714-03, pp. 232-233)",
734 basis: Basis::Documented,
735 oracle: Oracle::EnterpriseCobol,
736 },
737 Assumption {
738 id: FASTSRT_FAILURE,
739 claim: "A failure on a file whose I/O DFSORT does, including an empty VSAM input file, fails the SORT with SORT-RETURN 16 and the run goes on, with or without a FILE STATUS",
740 basis: Basis::Chosen,
741 oracle: Oracle::EnterpriseCobol,
742 },
743 Assumption {
744 id: SAME_AREA_VSAM,
745 claim: "SAME AREA makes the VSAM (indexed and relative) files it names share one record area, as SAME RECORD AREA does, and is documentation for the others (Language Reference SC27-8713-03, p. 156)",
746 basis: Basis::Documented,
747 oracle: Oracle::EnterpriseCobol,
748 },
749 Assumption {
750 id: LONG_ZONED_BY_PACKS,
751 claim: "A zoned item of more than 16 digits, too long for one PACK (SA22-7832-14: each operand at most 16 bytes), enters arithmetic through two or three PACKs, the high-order part first and each lower PACK overwriting the byte the part above it ended in, so it packs as ZONED_BY_PACK says one PACK would: every zone but the sign's discarded and no digit checked until the arithmetic uses it. An alphanumeric sender longer than 31 characters moved to a numeric item is packed from its rightmost 31, the most any receiver holds",
752 basis: Basis::Chosen,
753 oracle: Oracle::EnterpriseCobol,
754 },
755 Assumption {
756 id: ASCII_COLLATION,
757 claim: "STANDARD-1 and STANDARD-2 put the characters of 7-bit ASCII in its order (Language Reference SC27-8713-03, Table 82, p. 754; Programming Guide SC27-8714-03, p. 7), each found in the program's code page; the characters that are not 7-bit ASCII follow them in EBCDIC order, as the characters an ALPHABET literal leaves out do",
758 basis: Basis::Chosen,
759 oracle: Oracle::EnterpriseCobol,
760 },
761 Assumption {
762 id: TABLE_SORT_COLLATION,
763 claim: "A table SORT without a COLLATING SEQUENCE phrase orders alphanumeric keys in EBCDIC, as the SORT statement's format 2 rules say (SC27-8713-03, p. 450), though its rules for the phrase in both formats put the PROGRAM COLLATING SEQUENCE in the phrase's place (p. 451)",
764 basis: Basis::Chosen,
765 oracle: Oracle::EnterpriseCobol,
766 },
767 Assumption {
768 id: ALPHABET_LITERALS,
769 claim: "Among an ALPHABET clause's literals HIGH-VALUE, LOW-VALUE, SPACE, ZERO and QUOTE are the EBCDIC characters X'FF', X'00', X'40', X'F0' and X'7F', whatever the alphabet makes HIGH-VALUE and LOW-VALUE, and a numeric literal n is the character at ordinal n of EBCDIC, whose ordinals SC27-8713-03 points to (p. 128)",
770 basis: Basis::Chosen,
771 oracle: Oracle::EnterpriseCobol,
772 },
773 Assumption {
774 id: LE_CEEIGZCT,
775 claim: "A COPY CEEIGZCT that no library answers gives a level-88 condition name for each of the 723 conditions whose entry in the Language Environment Runtime Messages (SA38-0686-60, chapter 1) shows a symbolic feedback code, severity from its message's I, W, E, S or C; the name is CEE and the message number in base 32 (Programming Guide SA38-0682-60, CEEBLDTX :msgname.), the value the token's first 8 bytes as LE_FEEDBACK_TOKEN lays them out (Programming Reference SA38-0683-60, CEENCOD), and CEE000 is all zeros (SA38-0682-60, testing a condition token for success); it is meant to follow the 8-byte group the token starts with (SA38-0682-60, Figure 76). It is written from those manuals alone, not from IBM's CEEIGZCT",
776 basis: Basis::Documented,
777 oracle: Oracle::EnterpriseCobol,
778 },
779 Assumption {
780 id: LE_CEEIGZCT_DISAGREEMENTS,
781 claim: "Where the manuals disagree CEEIGZCT follows the message: its severity letter over a service's table in SA38-0683-60 (CEE07V, CEE317, CEE35S, CEE36V to CEE374), and its number over the code SA38-0686-60 prints beside it (CEE0356C shows CEE0BA, CEE5722I CEE5IP, CEE5771S CEE5KC); the eight messages printed with no code (CEE3252E, CEE3257E to CEE3259E, CEE3596S, CEE3796I to CEE3798I) have no name",
782 basis: Basis::Chosen,
783 oracle: Oracle::EnterpriseCobol,
784 },
785 Assumption {
786 id: LE_SHORT_ARGUMENT_LIST,
787 claim: "A CALL of a service with fewer arguments than its syntax lists, CEE3ABD with no USING among them, ends the run with ironwork's own abend, not a modelled one: IBM calls a short list invalid with unpredictable results (SA38-0683-60, General usage notes for callable services) and says nothing of register 1 at a CALL without USING, whose own CALL and CEEPCALL macros leave it unaltered when no parameter is coded (MVS Assembler Services Reference SA22-7606-13, CALL; SA38-0682-60, CEEPCALL); the service then reads its arguments through whatever register 1 and the storage past the list hold, so neither S0C4 nor any other result follows. A missing fc is not taken as OMITTED, nor a missing clean-up as none",
788 basis: Basis::Chosen,
789 oracle: Oracle::EnterpriseCobol,
790 },
791 Assumption {
792 id: PRINT_CONTROL_CHARACTER,
793 claim: "A sequential file that a WRITE with ADVANCING in the program names, or whose FD has LINAGE, is a print file: every record written to it carries a printer control character, a WRITE without ADVANCING being AFTER ADVANCING 1 LINE; ASA characters when every WRITE ... ADVANCING of the file says AFTER, machine codes when any says BEFORE (Language Reference SC27-8713-03, p. 479). Under ADV, the default, the character is a byte before the record; under NOADV it is the record's own first byte; a LINAGE file is ADV whatever the option (p. 480; Programming Guide SC27-8714-03, pp. 178-179, 346). ASA ' ', '0' and '-' space 1 to 3 lines before printing, '+' none, '1' to '9' and 'A' to 'C' skip to channels 1 to 12, PAGE and C01 being channel 1, except that PAGE moves a LINAGE file's paper in lines (LINAGE_PAGE_MOVEMENT), and CSP '+'; machine codes print then space, X'01', X'09', X'11', X'19', or skip, X'89' + 8(n-1) for channel n; AFP-5A is X'5A' (z/OS DFSMS Macro Instructions for Data Sets SC23-6852-60, pp. 397-398; Language Reference pp. 126-127, 483). SPECIAL-NAMES of a program apply to the programs it contains (p. 13)",
794 basis: Basis::Documented,
795 oracle: Oracle::EnterpriseCobol,
796 },
797 Assumption {
798 id: PRINT_SPACING_RECORDS,
799 claim: "A movement one control character cannot give is made with records that only move the paper, each as long as the line's record and blank after its control character: in an ASA file AFTER ADVANCING n lines above 3 is preceded by (n-1)/3 records with '-', the line taking the rest; in a machine-code file BEFORE ADVANCING n above 3 prints with X'19' and is followed by records spacing the rest without printing, three lines at a time (X'1B', then X'0B' or X'13'), and AFTER ADVANCING is such records, or X'8B' + 8(n-1) for channel n, then the line with X'01'",
800 basis: Basis::Chosen,
801 oracle: Oracle::EnterpriseCobol,
802 },
803 Assumption {
804 id: PRINT_CONTROL_RUN_TIME,
805 claim: "Under NOADV the control character is stored in the first byte of the record area, where the program sees it after the WRITE; an ADVANCING count below zero spaces no lines; under ADV a READ of a print file in the program that writes it skips the added byte",
806 basis: Basis::Chosen,
807 oracle: Oracle::EnterpriseCobol,
808 },
809 Assumption {
810 id: TEXT_PRINT_LINES,
811 claim: "A text DD shows a print file's records without the control character, which it reads as line spacing, as the POSIX asa utility does: ' ', '0' and '-' put the line one, two or three lines below the last, the DD's first line starting on its first; '+' and X'01' overprint, after a carriage return when both lines show something; a skip to channel 1 is a form feed before the line; a skip to channels 2 to 12, or AFP-5A page mode data, is one line, a text DD having no forms control buffer; a machine code moves the paper after its line. Any other file's records are a line each",
812 basis: Basis::Chosen,
813 oracle: Oracle::EnterpriseCobol,
814 },
815 Assumption {
816 id: LOCAL_REFERENCES_OUTSIDE_METHODS,
817 claim: "A local reference made by a program that is not a method belongs to the method running when it runs, freed when that method returns; with no method running it belongs to the run unit and stays valid until the run ends, as the JNI keeps a thread's local references outside any native method, and the Guide asks for NewGlobalRef only 'if the client code is within a method' (Programming Guide SC27-8714-03, p. 703)",
818 basis: Basis::Chosen,
819 oracle: Oracle::EnterpriseCobol,
820 },
821 Assumption {
822 id: SELF_IS_LOCAL,
823 claim: "SELF is a local reference of the method's own frame, made with the invocation, as the JNI passes a native method its object, and it expires when the method returns; the Guide's list of local references names arguments, RETURNING values, JNI results and NEW only (Programming Guide SC27-8714-03, p. 721)",
824 basis: Basis::Recalled,
825 oracle: Oracle::EnterpriseCobol,
826 },
827 Assumption {
828 id: EXPIRED_REFERENCE_ABENDS,
829 claim: "Using a reference after it was freed ends the run with abend IRONWORK naming the item that holds it, how the reference was made and where it was freed: INVOKE on it, passing it to INVOKE or a JNI service, a method's RETURNING it, and comparing it with another object reference or SELF use it; SET, MOVE and CALL between programs copy its bytes without looking, and a comparison with NULL tests only its bytes. On z/OS a freed reference's slot is reused, and the Guide says only that 'an error occurs' (Programming Guide SC27-8714-03, p. 722)",
830 basis: Basis::Chosen,
831 oracle: Oracle::EnterpriseCobol,
832 },
833 Assumption {
834 id: LOCAL_FRAMES,
835 claim: "The JNI reference services run as the JNI specification defines them: NewLocalRef and NewGlobalRef make a new reference to the object, NULL for NULL; DeleteLocalRef and DeleteGlobalRef free one and ignore NULL, and one given the other kind of reference ends the run; IsSameObject compares objects; GetObjectRefType answers 0 for NULL, 1 for local and 2 for global; PushLocalFrame opens a frame whose local references PopLocalFrame frees, giving back a local reference in the frame below to its argument's object, and EnsureLocalCapacity succeeds. PopLocalFrame with no frame of PushLocalFrame's open ends the run, and a method's return frees the frames it left open. The Guide documents NewGlobalRef, DeleteGlobalRef and DeleteLocalRef only (Programming Guide SC27-8714-03, pp. 722-723)",
836 basis: Basis::Recalled,
837 oracle: Oracle::EnterpriseCobol,
838 },
839 Assumption {
840 id: OO_OPTIONS_SEVERITY,
841 claim: "IBM names no message for object-oriented syntax compiled without THREAD, DLL, RENT or DBCS, nor for THREAD without RECURSIVE, which it calls an error (Messages and Codes SC27-4648-02, p. v, lists only some messages), so the severity of each rule of J13 is chosen. A missing option is a warning (W, return code 4), and the program runs as if compiled with it. NORENT with THREAD or DLL is a warning too: IBM forces RENT and 'generates an error message' (Programming Guide SC27-8714-03, p. 344), and the message it gives for an option dropped in conflict resolution is W, IGYOS4020-W, return code 4, in Enterprise COBOL job output quoted in the corpus (Delvoie_Mainframe, A5 instructions). THREAD without RECURSIVE, and INITIAL, a nested program, SORT of a file or MERGE under THREAD, are errors (S), as IBM diagnoses them as errors (J13). A program that reaches Java through JNIENVPTR alone, with no INVOKE or object reference, is held to none of them, as IBM builds its Bank-of-Z IBTRAN with DLL and without THREAD",
842 basis: Basis::Chosen,
843 oracle: Oracle::EnterpriseCobol,
844 },
845 Assumption {
846 id: REFERENCES_KEPT,
847 claim: "Every reference made is kept for the rest of the run, so that an expired one can say where it expired, and a run unit that makes more than 8,388,608 of them abends; the JVM reuses a freed reference's slot",
848 basis: Basis::Chosen,
849 oracle: Oracle::EnterpriseCobol,
850 },
851 Assumption {
852 id: SQL_COMMIT_AT_NORMAL_END,
853 claim: "A batch run unit commits at a normal end and rolls back at an abend: \"In all Db2 environments, the normal termination of a process is an implicit commit operation\" (Db2 12 for z/OS SQL Reference, COMMIT). Db2 for Linux rolls back instead",
854 basis: Basis::Documented,
855 oracle: Oracle::Db2,
856 },
857 Assumption {
858 id: SQL_WHENEVER_ORDER,
859 claim: "WHENEVER tests SQLERROR (SQLCODE < 0), NOT FOUND (100) and SQLWARNING (SQLWARN0 W, or > 0 and not 100); the precompiler tests warning before not-found, and the three exclude one another (Db2 12.1.5 for Linux, tools/db2-probe)",
860 basis: Basis::Observed,
861 oracle: Oracle::Db2,
862 },
863 Assumption {
864 id: SQL_TRUNCATED_INDICATOR,
865 claim: "A string cut to fit its host variable sets the indicator to its original length, SQLWARN0 and SQLWARN1, and SQLSTATE 01004; trailing blanks cut from a CHAR count (Db2 12.1.5 for Linux, tools/db2-probe)",
866 basis: Basis::Observed,
867 oracle: Oracle::Db2,
868 },
869 Assumption {
870 id: SQL_POSTGRES_ERRORS,
871 claim: "PostgreSQL's SQLSTATEs map to Db2 SQLCODEs as sql-runtime.md §9 tabulates; Db2 for Linux agrees except -433 for -404 and -801 for -802, where the table keeps z/OS's documented codes (Db2 12.1.5 for Linux, tools/db2-probe)",
872 basis: Basis::Observed,
873 oracle: Oracle::Db2,
874 },
875 Assumption {
876 id: SQL_DIALECT_REWRITES,
877 claim: "Db2 SQL is rewritten for PostgreSQL by the table in sql-runtime.md §9, and any other text runs unchanged",
878 basis: Basis::Chosen,
879 oracle: Oracle::Db2,
880 },
881 Assumption {
882 id: SQL_INTO_WITHOUT_COLONS,
883 claim: "A name in an INTO list written without its colon is a host variable, as older precompilers read it",
884 basis: Basis::Recalled,
885 oracle: Oracle::Db2,
886 },
887 Assumption {
888 id: SQL_DECLARATIONS_CROSS_NESTED_PROGRAMS,
889 claim: "WHENEVER and cursor declarations carry on in listing order across nested programs, as the precompiler reads the source in order",
890 basis: Basis::Chosen,
891 oracle: Oracle::Db2,
892 },
893 Assumption {
894 id: SQL_DOUBLE_TO_HFP_TRUNCATES,
895 claim: "An IEEE double stored into COMP-1 or COMP-2 drops the low-order bits that do not fit, rather than rounding",
896 basis: Basis::Chosen,
897 oracle: Oracle::Db2,
898 },
899 Assumption {
900 id: SQL_ZONED_IS_DECIMAL,
901 claim: "A zoned DISPLAY host variable without SIGN SEPARATE is DECIMAL to Db2, as SIGN LEADING SEPARATE is",
902 basis: Basis::Chosen,
903 oracle: Oracle::Db2,
904 },
905 Assumption {
906 id: SQL_ISO_DATETIME,
907 claim: "Dates and times reach character host variables as YYYY-MM-DD, HH.MM.SS and YYYY-MM-DD-HH.MM.SS.NNNNNN, DSNHDECP's DATE(ISO) and TIME(ISO); the forms are as seen under DATETIME(ISO), and the default is an installation's (Db2 12.1.5 for Linux, tools/db2-probe)",
908 basis: Basis::Observed,
909 oracle: Oracle::Db2,
910 },
911 Assumption {
912 id: SQL_TRAILING_BLANKS_SENT,
913 claim: "Character inputs are sent with their trailing blanks, since Db2 compares strings as if blank-padded (Db2 12.1.5 for Linux, tools/db2-probe)",
914 basis: Basis::Observed,
915 oracle: Oracle::Db2,
916 },
917 Assumption {
918 id: SQL_FETCH_ROW_COUNT,
919 claim: "A single-row FETCH that returns a row sets SQLERRD(3) to 1; Db2 for z/OS documents SQLERRD(3) for a rowset FETCH only (Db2 12.1.5 for Linux, tools/db2-probe)",
920 basis: Basis::Observed,
921 oracle: Oracle::Db2,
922 },
923 Assumption {
924 id: FASTSRT_PRINT_RECORDS,
925 claim: "Under FASTSRT DFSORT, not COBOL, does the I/O of the USING and GIVING files (Programming Guide SC27-8714-03, p. 232), and DFSORT adds a printer control character only to the lines of an OUTFIL report (DFSORT Application Programming Guide SC23-6878-50, p. 225), which needs control statements ironwork does not read. So DFSORT writes a GIVING print file's records as the SD holds them, with no control character, where COBOL writes each as a WRITE without phrases (Language Reference SC27-8713-03, p. 453), which for a print file is AFTER ADVANCING 1 LINE (Programming Guide pp. 178-179), the character over the record's first byte under NOADV; and DFSORT reads a USING print file's records as its data set holds them, where COBOL's READ skips the byte ADV adds (PRINT_CONTROL_RUN_TIME). Under NOADV the two read a USING print file alike",
926 basis: Basis::Documented,
927 oracle: Oracle::EnterpriseCobol,
928 },
929 Assumption {
930 id: FASTSRT_RECORD_LENGTHS,
931 claim: "DFSORT takes the length of the records it sorts from the SORTIN data set, not from the RECORD statement (DFSORT Application Programming Guide SC23-6878-50, p. 420). A fixed-length record shorter than SORTOUT's LRECL is padded on the right with X'00', and a longer one cut on the right, with message ICE171I and return code 0 (pp. 14-15, 200, 209) under PAD=RC0 and TRUNC=RC0, the IBM-supplied defaults (DFSORT Installation and Customization SC23-6881-70, pp. 91, 102); padding needs the Blockset technique and a sort or copy, DFSORT checks neither padding nor truncation without both a SORTIN and a SORTOUT data set (pp. 200, 209), and it neither pads nor cuts the records an E15 or E35 exit returns (p. 15). A variable-length record longer than SORTOUT's LRECL ends DFSORT with ICE217A under NOVLLONG (p. 210), the IBM-supplied default (Installation and Customization p. 103; DFSORT Messages, Codes and Diagnosis SC23-6879-50, p. 76)",
932 basis: Basis::Documented,
933 oracle: Oracle::EnterpriseCobol,
934 },
935 Assumption {
936 id: FASTSRT_ADV_PRINT,
937 claim: "With --fastsrt-adv-print=include a print file under ADV is FASTSRT's as any other file is, and DFSORT meets its data set's records, a byte longer than the FD's. A USING file's data set stands as DFSORT's SORTIN and a GIVING file's as its SORTOUT, as the Programming Guide implies by keeping DFSORT's SORTIN and SORTOUT options from a FASTSRT program (SC27-8714-03, p. 232) without saying so, and COBOL gives DFSORT each key's place in the SD's record; so, by FASTSRT_PRINT_RECORDS and FASTSRT_RECORD_LENGTHS, a USING print file's records keep the control character as their first byte, each key being read a byte before where the FD has it, and a GIVING file's fixed-length records are padded with X'00' or cut to its data set's length. With no USING data set of DFSORT's own, as with an INPUT PROCEDURE or a USING file COBOL reads, a GIVING print file's longer fixed-length records fail the SORT before its input phase, as ICE043A reason 9 says of fixed-length output records longer than the input's (DFSORT Messages, Codes and Diagnosis SC23-6879-50, pp. 29-30). COBOL takes a record from DFSORT, for an OUTPUT PROCEDURE or a GIVING file it writes, at the SD's length at most, and a VSAM GIVING file takes it at its own. A text DD holds no control character, so on it a print file's records are the FD's length, and each record DFSORT writes is a line",
938 basis: Basis::Chosen,
939 oracle: Oracle::EnterpriseCobol,
940 },
941 Assumption {
942 id: COMPILER_SEVERITIES,
943 claim: "A compiler message has one of five severities, each with a return code: I (informational) 0, the program runs correctly; W (warning) 4, a possible error; E (error) 8, an error the compiler attempted to correct; S (severe) 12, one it could not, and the program should not be run; U (unrecoverable) 16, the compilation ended. A compilation's return code is generally the highest of its messages' (Programming Guide SC27-8714-03, Table 38, p. 282), and the letter ends each message's identifier, as in IGYPS2121-S (p. 281). ironwork check exits with that return code, 0 when there is no message",
944 basis: Basis::Documented,
945 oracle: Oracle::EnterpriseCobol,
946 },
947 Assumption {
948 id: REFUSALS_ARE_SEVERE,
949 claim: "Every refusal ironwork made before its messages had severities is S, return code 12, and none is E: IBM's E is an error the compiler corrects, still producing object code under the default NOCOMPILE(S) (Programming Guide SC27-8714-03, pp. 282, 355), and ironwork corrects nothing, so a program it refuses has no code to run. Some it refuses IBM documents below S: NUMPROC(MIG) gets a warning and the default NUMPROC (Migration Guide GC27-8715-03, Table 18, p. 96); a TEST suboption IBM removed is an invalid-option error and the option is discarded (Table 29, p. 151), as a suboption ironwork refuses, such as TRUNC(FAST), may be; a non-COBOL character is accepted with IGYLI0163-E (p. 111). These stay S until ironwork does what IBM does with them. U is not used: ironwork's reader stops at the first syntax error, which IBM reports and reads past",
950 basis: Basis::Chosen,
951 oracle: Oracle::EnterpriseCobol,
952 },
953 Assumption {
954 id: REFUSED_FROM_S,
955 claim: "ironwork run and cics run a program whose compile's return code is 0, 4 or 8, printing its messages first, and refuse one at 12 or more, exiting with that return code, as IBM's IGYWCLG procedure runs one: its GO step is bypassed only when 8 is less than the compile step's return code, COND=((8,LT,COBOL),(4,LT,LKED)) (Programming Guide SC27-8714-03, pp. 259-260), and the default NOCOMPILE(S) produces object code after E-level messages, stopping it at the first S-level one (p. 355). A card's COMPILE or NOCOMPILE, or -warnings-block, moves the refusal (NOCOMPILE). No message of ironwork's is E yet (REFUSALS_ARE_SEVERE)",
956 basis: Basis::Documented,
957 oracle: Oracle::EnterpriseCobol,
958 },
959 Assumption {
960 id: NOCOMPILE,
961 claim: "COMPILE, abbreviated C, produces object code whatever the messages; NOCOMPILE(W), NOCOMPILE(E) or NOCOMPILE(S), abbreviated NOC, stops it at the first message of that severity or higher, NOCOMPILE(S) being the default; and NOCOMPILE alone is a syntax check with no object code (Programming Guide SC27-8714-03, p. 355). ironwork reads them from a CBL or PROCESS card, the last one given winning (p. 344): run and cics refuse a program with a message at or above the level, under NOCOMPILE whatever its messages, and under COMPILE from S as under NOCOMPILE(S): COMPILE's object code after an S-level message runs with results IBM calls unpredictable (p. 355), and IGYWCLG's COND bypasses its GO step above 8 whatever the object code (REFUSED_FROM_S). A program ironwork cannot parse or lay out is refused under any of them. -warnings-block is ironwork's command-line NOCOMPILE(W), and a card's COMPILE or NOCOMPILE wins over it, as options on a PROCESS or CBL statement take precedence over the compiler invocation's (p. 273). None of them changes the return code, the highest of the messages' (p. 282), so check exits as it would without them. IBM has no option that turns a warning into an error: FLAG(x,y) chooses only which messages are listed (pp. 369-370), and a MSGEXIT user exit of the EXIT option can raise a W or I message to any severity up to S, one message at a time, which changes the return code (pp. 836-837)",
962 basis: Basis::Chosen,
963 oracle: Oracle::EnterpriseCobol,
964 },
965 Assumption {
966 id: COMMENT_ENTRY_EXTENT,
967 claim: "The comment-entry of AUTHOR, INSTALLATION, DATE-WRITTEN, DATE-COMPILED or SECURITY is any characters at all, written in Area B on one or more lines and never in Area A (Language Reference SC27-8713-03, p. 117), and a COPY or REPLACE in it, or where it can appear, is part of it (pp. 700, 708). So a comment-entry runs from its paragraph header's period to the next line, not a comment or blank line, with a character in Area A, whatever the lines between hold; NIST's OBNC1M tests this with a whole program written in Area B inside a SECURITY comment-entry",
968 basis: Basis::Documented,
969 oracle: Oracle::EnterpriseCobol,
970 },
971 Assumption {
972 id: COMMENT_ENTRY_HEADERS,
973 claim: "ironwork takes a line in an IDENTIFICATION DIVISION as a comment-entry paragraph's header when its first word is the paragraph's name and a period follows, in whatever column the name starts, though a paragraph header belongs in Area A (Language Reference SC27-8713-03, p. 55); with no period the paragraph's text is read as program text. A line with a hyphen in column 7 inside a comment-entry, which p. 117 does not permit, is taken as more of the comment-entry rather than refused: the manual does not say how severe Enterprise COBOL's message for either is",
974 basis: Basis::Chosen,
975 oracle: Oracle::EnterpriseCobol,
976 },
977 Assumption {
978 id: COMMENT_ENTRY_REMARKS,
979 claim: "Enterprise COBOL has no REMARKS paragraph: the Language Reference SC27-8713-03 names neither the paragraph (pp. 101, 117) nor the word anywhere. ironwork reads a REMARKS paragraph in an IDENTIFICATION DIVISION as it reads a comment-entry paragraph, as OS/VS COBOL did, where Enterprise COBOL presumably refuses the program",
980 basis: Basis::Chosen,
981 oracle: Oracle::EnterpriseCobol,
982 },
983 Assumption {
984 id: CONTINUED_LITERAL_QUOTES,
985 claim: "A continuation line of an alphanumeric or national literal left open at column 72 has a hyphen in column 7 and a quotation mark as its first nonblank character, and the literal resumes after that mark. When a literal's closing quotation mark is in column 72 and the continuation line starts with two, the pair stands for one quotation mark in one literal; otherwise, a quotation mark that starts a continuation line after a closed literal starts a second literal (Language Reference SC27-8713-03, p. 58). The rules hold for apostrophes alike, and ironwork gives the pair precedence where both could apply",
986 basis: Basis::Documented,
987 oracle: Oracle::EnterpriseCobol,
988 },
989 Assumption {
990 id: COPY_SEARCH_ROUNDS,
991 claim: "A COPY member is looked for in three rounds, each through every copy library in order (the program's own directory, then each -I directory) before the next begins: as NAME.cpy, .CPY, .copy and .COPY; then as .cbl, .CBL, .cob and .COB; then as the name alone; each extension with the name as written, then upper-cased, then lower-cased. In one z/OS UNIX directory IBM tries .cpy, .CPY, .cbl, .CBL, .cob and .COB, each with the name upper- and lower-cased (Language Reference SC27-8713-03, p. 705), and the name alone last (Programming Guide SC27-8714-03, p. 440), searching the current directory, the -I directories and SYSLIB's in turn (LR p. 705, PG p. 441); it does not say whether an earlier directory's .cbl comes before a later one's .cpy. A compile from JCL searches SYSLIB's data sets, then COPYLOC's (LR p. 705), which hold copybooks and not the library the program is read from, so the rounds take a copybook in any library before a program source. .copy is not IBM's, and the name as written, which IBM folds to upper case (PG p. 440), comes first, so that on a file system that ignores case a message names the member as the program spells it; the order differs from IBM's only where two files' names differ only in case",
992 basis: Basis::Chosen,
993 oracle: Oracle::EnterpriseCobol,
994 },
995 Assumption {
996 id: COPY_NOT_THE_PROGRAM,
997 claim: "The file being compiled is never a COPY member of its own compilation, at any depth of nesting: a compile from JCL reads the program from SYSIN and looks for members in SYSLIB and COPYLOC (Language Reference SC27-8713-03, p. 705), so a member named as the program comes from another file or is not found. The program's own directory is a copy library only as ironwork's stand-in for the current directory cob2 searches first (p. 705). Any other member a chain of COPY statements reaches while it is still being copied is refused, as a nested COPY cannot cause recursion (p. 697)",
998 basis: Basis::Chosen,
999 oracle: Oracle::EnterpriseCobol,
1000 },
1001 Assumption {
1002 id: COPY_LITERAL_AS_WRITTEN,
1003 claim: "A text-name written as a literal is looked for as written first, through every library, and then with extensions as a user-defined word is (COPY_SEARCH_ROUNDS). IBM takes a literal as the file name, relative path or absolute path it spells (Programming Guide SC27-8714-03, p. 440) and adds extensions only to a name that is not a literal (Language Reference SC27-8713-03, p. 705); the extensions are ironwork's, for sources written for compilers that add them",
1004 basis: Basis::Chosen,
1005 oracle: Oracle::EnterpriseCobol,
1006 },
1007 Assumption {
1008 id: COPY_DOUBLED_PERIOD,
1009 claim: "COPY X.. is refused, naming X.: a COPY statement ends with a separator period (Language Reference SC27-8713-03, p. 697), which is a period followed by a space (pp. 49-50), so the name is X., not X. A text-name or library-name for a data set holds only letters, digits and hyphens (p. 696); in z/OS UNIX directories any COBOL character may appear (p. 697), and X. would then name X..cpy and the like, not X's file. The manuals do not say whether Enterprise COBOL instead reads X and a separator period, leaving the second period in the text, as GnuCOBOL 3.2 does",
1010 basis: Basis::Chosen,
1011 oracle: Oracle::EnterpriseCobol,
1012 },
1013 Assumption {
1014 id: LINAGE_COUNTER,
1015 claim: "LINAGE IS n LINES [WITH FOOTING AT f] [LINES AT TOP t] [LINES AT BOTTOM b] describes a logical page of t + n + b lines, each page following the last with no spacing; TOP and BOTTOM default to 0, and each value is an unsigned integer, at most 99,999,999, or an unsigned integer data item (Language Reference SC27-8713-03, pp. 189-190, 747). OPEN OUTPUT or EXTEND takes all four for the first page, and a WRITE ... ADVANCING PAGE or a page overflow takes the data items' values again for the next page (p. 190). LINAGE-COUNTER, one for each LINAGE file and qualified by its file-name when there are two, has the PICTURE and USAGE of the page body's data item, or is binary with as many digits as its integer; OPEN sets it to 1, it is the line of the page body the printer is at, and no statement may change it (pp. 23-24, 70). A WRITE adds its ADVANCING lines to it, 1 without ADVANCING; a WRITE that would take it past the page body puts its line on the next page's first line, after the printer moves there (AFTER) or before (BEFORE), as ADVANCING PAGE does, and sets it to 1 (pp. 474-475). END-OF-PAGE, which needs LINAGE, runs once the line is written when LINAGE-COUNTER has reached the footing line or the page overflowed, only an overflow counting when FOOTING is not given, and NOT END-OF-PAGE otherwise, neither after a WRITE that failed (p. 475; Programming Guide SC27-8714-03, p. 178). LINAGE takes effect only for a file opened OUTPUT or EXTEND (p. 189), and an SD's does nothing (p. 190)",
1016 basis: Basis::Documented,
1017 oracle: Oracle::EnterpriseCobol,
1018 },
1019 Assumption {
1020 id: LINAGE_PAGE_MOVEMENT,
1021 claim: "A WRITE to a LINAGE file moves the paper in lines, never by a skip to a channel, the logical page not being the printer's form (Language Reference SC27-8713-03, p. 190). When OPEN ends the printer is at the first page's first line, t lines of top margin above line 1 of its page body, so the first WRITE moves those t lines besides its own; a WRITE that starts a new page, by overflow or ADVANCING PAGE, moves the lines left in the page body, the bottom margin, the next page's top margin and one line more, to that page's line 1. The lines are written as any WRITE ... ADVANCING writes them, as control characters and spacing records (PRINT_CONTROL_CHARACTER, PRINT_SPACING_RECORDS), so the margins are blank lines, and a text DD shows them as line feeds (TEXT_PRINT_LINES). OPEN and CLOSE write nothing: a file closed with no WRITE is empty, and the last page is not spaced out",
1022 basis: Basis::Chosen,
1023 oracle: Oracle::EnterpriseCobol,
1024 },
1025 Assumption {
1026 id: LINAGE_END_OF_PAGE,
1027 claim: "The end-of-page condition is judged by LINAGE-COUNTER once the WRITE is done, as the Language Reference words it (SC27-8713-03, p. 475): a WRITE ... ADVANCING PAGE, which leaves LINAGE-COUNTER at 1, raises it only when the next page's FOOTING is 1, whatever line it printed on, and a WRITE ... ADVANCING 0 LINES in the footing area raises it again",
1028 basis: Basis::Chosen,
1029 oracle: Oracle::EnterpriseCobol,
1030 },
1031 Assumption {
1032 id: LINAGE_VALUES,
1033 claim: "A page body under 1 line, a footing line outside the page body or a margin below 0 that data items give at OPEN or at a new page ends the run with ironwork's own abend naming the file: the Language Reference states the rule (SC27-8713-03, p. 189) but no file status for breaking it (Table 34, pp. 300-303), and the Language Environment Runtime Messages (SA38-0686-60) have no message for it. Integers that break it are compile errors",
1034 basis: Basis::Chosen,
1035 oracle: Oracle::EnterpriseCobol,
1036 },
1037 Assumption {
1038 id: LINAGE_EXTEND,
1039 claim: "OPEN EXTEND of a LINAGE file starts a new logical page as OPEN OUTPUT does, top margin first and LINAGE-COUNTER at 1 (Language Reference SC27-8713-03, p. 24), whatever line the data set's last page ended on",
1040 basis: Basis::Chosen,
1041 oracle: Oracle::EnterpriseCobol,
1042 },
1043 Assumption {
1044 id: LINAGE_COUNTER_BETWEEN_WRITES,
1045 claim: "LINAGE-COUNTER is zero until the file is first opened and keeps its value after CLOSE; a WRITE that fails leaves it and the page where they were; OPEN INPUT and I-O set it to 1 as OPEN OUTPUT does, since the Language Reference says so of any OPEN (SC27-8713-03, p. 24)",
1046 basis: Basis::Chosen,
1047 oracle: Oracle::EnterpriseCobol,
1048 },
1049 Assumption {
1050 id: PRINT_FILE_UPDATE,
1051 claim: "A print file opened I-O under ADV holds the control character a byte before each FD record, as it was written (PRINT_CONTROL_CHARACTER): READ skips the byte as PRINT_CONTROL_RUN_TIME says, REWRITE writes the record behind the byte it was read with, REWRITE having no ADVANCING phrase, and WRITE, with or without ADVANCING, fails with file status 48, a sequential file's WRITE needing OUTPUT or EXTEND (Language Reference SC27-8713-03, pp. 471, 476; Table 34, p. 302); LINAGE has no effect on it (p. 189). IBM does not say what REWRITE does with the byte",
1052 basis: Basis::Chosen,
1053 oracle: Oracle::EnterpriseCobol,
1054 },
1055 Assumption {
1056 id: ENTRY_IN_SEQUENCE,
1057 claim: "Control that reaches an ENTRY statement in the program's own sequence passes it as it passes CONTINUE: nothing is bound and no storage changes. The Language Reference says only where a CALL of the entry begins, at the first executable statement after it (SC27-8713-03, pp. 339-340)",
1058 basis: Basis::Chosen,
1059 oracle: Oracle::EnterpriseCobol,
1060 },
1061 Assumption {
1062 id: ENTRY_CALLS,
1063 claim: "A CALL of an ENTRY name begins at the statement after the ENTRY and binds the entry's USING list alone, so a LINKAGE item only the PROCEDURE DIVISION USING names has no address (Language Reference SC27-8713-03, pp. 264, 320, 339-340). A static CALL, of a literal under NODYNAM, enters the one copy of the program that its PROGRAM-ID enters, in its last-used state (Programming Guide SC27-8714-03, pp. 548, 553-554); a dynamic CALL, of an identifier or of a literal under DYNAM, gets for each entry name a copy of the program with WORKING-STORAGE of its own, as if a separate compile unit were called (p. 560), which a CANCEL of that name resets, where p. 549 says only that a second entry point must not be called dynamically without a CANCEL between. CALL finds an entry name among the programs of the source and those already loaded, then in a program library as a member of that name, an alias, as NAME(ALIAS) or binder ALIAS statements make one (pp. 548, 560)",
1064 basis: Basis::Chosen,
1065 oracle: Oracle::EnterpriseCobol,
1066 },
1067 Assumption {
1068 id: ALTERED_GO_TO_RESET,
1069 claim: "Altered GO TOs are put back as written whenever the program's WORKING-STORAGE is initialized: its first CALL, the first after a CANCEL of it, and every CALL of an INITIAL program (Language Reference SC27-8713-03, pp. 103, 318), and not on another CALL (Programming Guide SC27-8714-03, p. 548). Those of an independent segment, priority 50 to 99, are put back when control reaches the segment from a paragraph of another priority by falling into it, GO TO, PERFORM or a SORT or MERGE procedure, but not when a PERFORM made from it returns, nor when a CALL of the program begins in it: p. 265 says 'from a segment with a different priority-number', p. 318 'from another independent segment', and neither names a PERFORM's return",
1070 basis: Basis::Chosen,
1071 oracle: Oracle::EnterpriseCobol,
1072 },
1073 Assumption {
1074 id: DISPLAY_STREAM,
1075 claim: "DISPLAY writes to standard output as a program under z/OS UNIX does with its OUTDD ddname unallocated and _IGZ_SYSOUT unset: one stream of characters, a newline after each DISPLAY except one WITH NO ADVANCING (Programming Guide SC27-8714-03, pp. 36-37; Language Reference SC27-8713-03, pp. 333-335), and UPON any device writes to the same stream. To a ddname IBM writes a record for each DISPLAY, whose first byte is ' ', or '+' after one WITH NO ADVANCING (Programming Guide p. 37); that route is not modelled",
1076 basis: Basis::Chosen,
1077 oracle: Oracle::EnterpriseCobol,
1078 },
1079 Assumption {
1080 id: RANDOM_GENERATOR,
1081 claim: "FUNCTION RANDOM is Park and Miller's minimal standard generator. An argument n starts a sequence at state n mod 2147483646 + 1, a first reference without one starts it as 0 does, and each reference sets the state s to 16807 s mod 2147483647 and returns the new state divided by 2147483647 in long HFP, which is exclusively between zero and one; so the arguments 0 to 2,147,483,645 give distinct sequences and larger ones repeat them. IBM documents the interface (Language Reference SC27-8713-03, p. 629), a long floating-point result under either ARITH (Programming Guide SC27-8714-03, p. 58), and that its generator is not CEERAN0's, 950706376 s mod 2147483647 (Programming Reference SA38-0683-60, pp. 343-344), but not the generator. A fractional argument is truncated to an integer, and a negative one ends the run with abend IRONWORK",
1082 basis: Basis::Chosen,
1083 oracle: Oracle::EnterpriseCobol,
1084 },
1085 Assumption {
1086 id: ZERO_DIVISOR_CHECK,
1087 claim: "A zero divisor that no ON SIZE ERROR phrase takes, in an arithmetic statement without one or in an expression outside an arithmetic statement (a condition, a subscript, a reference modifier), is the program check of the instruction the compiler divides with: HFP divide, S0CF, when the expression is evaluated in floating point; fixed-point divide, S0C9, when the dividend and the divisor are made only of integer binary items and integer literals, at least one an item; decimal divide, S0CB, otherwise. The size error condition belongs to the arithmetic statements alone, and with ON SIZE ERROR any zero divisor, floating-point too, is one (Language Reference SC27-8713-03, p. 296; Programming Guide SC27-8714-03, p. 242); the manuals do not say which instructions the compiler divides with",
1088 basis: Basis::Chosen,
1089 oracle: Oracle::EnterpriseCobol,
1090 },
1091 Assumption {
1092 id: ERROR_DECLARATIVE_MODE,
1093 claim: "An EXCEPTION/ERROR procedure for an open mode serves a file open in that mode, and for OPEN one being opened in it, an OPEN of a file already open included (Language Reference SC27-8713-03, pp. 417, 714). A file that is not open, as for a READ, WRITE or CLOSE before its OPEN, is in no mode, so only a procedure that names it serves it. A procedure that names the file comes first (p. 714), and two procedures for one file, or for one open mode, are refused, as p. 714 forbids simultaneous requests for two",
1094 basis: Basis::Chosen,
1095 oracle: Oracle::EnterpriseCobol,
1096 },
1097 Assumption {
1098 id: ERROR_DECLARATIVE_STATUSES,
1099 claim: "Every I/O status whose first digit is not 0 runs the file's EXCEPTION/ERROR procedure once FILE STATUS holds it, unless the statement's AT END or INVALID KEY phrase takes a 1x or 2x status, and then no procedure runs (Language Reference SC27-8713-03, pp. 299, 303-304, 432, 714); a 0x status runs none. The procedure returns control to the end of the statement, and NOT AT END and NOT INVALID KEY are not run: none of ironwork's statuses is a critical error, after which p. 714 says control does not return. The implicit CLOSE at the end of the run or at CANCEL runs no procedure (Programming Guide SC27-8714-03, pp. 179, 204, 219)",
1100 basis: Basis::Chosen,
1101 oracle: Oracle::EnterpriseCobol,
1102 },
1103 Assumption {
1104 id: SORT_FILE_DECLARATIVE,
1105 claim: "An EXCEPTION/ERROR procedure serves the OPEN, READ, WRITE and CLOSE a SORT or MERGE does of its USING and GIVING files (Language Reference SC27-8713-03, pp. 457-458); the end of a USING file runs none. After it, that file's processing ends: a USING file gives the records read before the failure and is closed, a GIVING file is closed, and the operation goes on with SORT-RETURN 0, unless the procedure moved 16 to SORT-RETURN, which stops it at once with SORT-RETURN 16, as the Programming Guide has the procedure do to report the failure (SC27-8714-03, pp. 232, 234-235). A file with no procedure fails as SORT_FILE_FAILURE says. Under FASTSRT a USING or GIVING file that an INPUT, OUTPUT or file-specific procedure serves is COBOL's (p. 233), which FASTSRT_FILES does not list",
1106 basis: Basis::Chosen,
1107 oracle: Oracle::EnterpriseCobol,
1108 },
1109 Assumption {
1110 id: DEBUG_RUNTIME_OPTION,
1111 claim: "USE FOR DEBUGGING procedures run only in a program compiled WITH DEBUGGING MODE and run under the Language Environment runtime option DEBUG, which -debug stands for; NODEBUG, the default, keeps them from running, and debugging lines, once compiled, run under either (Language Reference SC27-8713-03, pp. 771-772; Programming Guide SC27-8714-03, pp. 431, 446). Without WITH DEBUGGING MODE both are comments, and a contained program has the mode of the program containing it (LR pp. 121, 772)",
1112 basis: Basis::Documented,
1113 oracle: Oracle::EnterpriseCobol,
1114 },
1115 Assumption {
1116 id: DEBUG_LINE_NUMBER,
1117 claim: "DEBUG-LINE holds, in six digits with leading zeros, the number of the line the statement starts on in its own source file. Under NONUMBER, the default, IBM puts the compiler-generated number there (Language Reference SC27-8713-03, p. 19), the listing's line number, which counts the lines of COPY members too: a statement after a COPY, or in a member, is numbered otherwise by IBM",
1118 basis: Basis::Chosen,
1119 oracle: Oracle::EnterpriseCobol,
1120 },
1121 Assumption {
1122 id: DEBUG_LINE_STATEMENT,
1123 claim: "The statement DEBUG-LINE names is the one that sent control to the procedure (Language Reference SC27-8713-03, p. 20): the PERFORM on each repetition, the GO TO, the SORT or MERGE, the input-output statement whose condition ran a USE procedure; for fall through, the statement last started in the procedure before, or the section header control passed through. CONTINUE, EXIT, NEXT SENTENCE and a separator period carry no position in ironwork, so after one of them DEBUG-LINE names the statement before it",
1124 basis: Basis::Chosen,
1125 oracle: Oracle::EnterpriseCobol,
1126 },
1127 Assumption {
1128 id: DEBUG_CONTENTS_LENGTH,
1129 claim: "DEBUG-CONTENTS is 30 characters, so DEBUG-ITEM is 86 bytes. The Language Reference gives it as PICTURE X(n) (SC27-8713-03, p. 19), and the procedures Enterprise COBOL debugs put at most 13 characters in it (p. 20)",
1130 basis: Basis::Chosen,
1131 oracle: Oracle::EnterpriseCobol,
1132 },
1133 Assumption {
1134 id: DEBUG_NAME_FORM,
1135 claim: "DEBUG-NAME is the procedure-name as the USE FOR DEBUGGING sentence writes it, a section that qualifies it joined by OF (Language Reference SC27-8713-03, p. 19); under ALL PROCEDURES it is the procedure's own name, unqualified. Control entering a section runs the section's debugging procedure, then, by fall through, that of its first paragraph",
1136 basis: Basis::Chosen,
1137 oracle: Oracle::EnterpriseCobol,
1138 },
1139 Assumption {
1140 id: DEBUGGING_SECTION_REFERENCES,
1141 claim: "A debugging section may PERFORM or GO TO a procedure of another debugging section, and of an EXCEPTION/ERROR section: p. 771 of the Language Reference (SC27-8713-03) forbids referring to a procedure in a debugging section from a statement outside of the debugging section, read here as outside every debugging section, as the CCVS85 DB tests assume, and p. 716 forbids references to nondeclarative procedures only. Without WITH DEBUGGING MODE a debugging section is a comment in full, header and USE sentence included, so its names are not defined and its text is not checked (p. 772)",
1142 basis: Basis::Chosen,
1143 oracle: Oracle::EnterpriseCobol,
1144 },
1145 Assumption {
1146 id: GLOBAL_DECLARATIVES,
1147 claim: "A program's declaratives run for its own statements only. USE GLOBAL AFTER EXCEPTION/ERROR for an open mode, and USE GLOBAL BEFORE REPORTING for a report group of a contained program without its own procedure for it, would serve another program's statements (Language Reference SC27-8713-03, p. 715; Report Writer Precompiler SC26-4301-04, 4.7.2 rule 5 and 4.7.3 rule 4), and are refused in a program that contains others; elsewhere GLOBAL changes nothing. A GLOBAL procedure for a named file is kept, since a contained program cannot name another program's file in ironwork, which has no GLOBAL files",
1148 basis: Basis::Chosen,
1149 oracle: Oracle::EnterpriseCobol,
1150 },
1151 Assumption {
1152 id: SYNC_SUBORDINATE_GROUP,
1153 claim: "SYNCHRONIZED on a group at level 02 to 49 synchronizes each elementary item within it, as the clause does on a level-01 group; the Language Reference allows it on elementary items and level-01 groups (SC27-8713-03, p. 231) and says nothing of other groups",
1154 basis: Basis::Chosen,
1155 oracle: Oracle::EnterpriseCobol,
1156 },
1157 Assumption {
1158 id: SYNC_ONLY_WHEN_WRITTEN,
1159 claim: "A binary, COMP-1, COMP-2, POINTER or INDEX item is aligned only when SYNCHRONIZED applies to it. Table 15 of the Language Reference says a subordinate binary item is aligned on 2 or 4 bytes 'when the synchronized clause is not specified', and in the same row that 'when SYNCHRONIZED is not specified for binary items, no space is reserved for slack bytes' (SC27-8713-03, p. 232); ironwork takes the second, and the first as a slip for 'specified'. A synchronized binary item of 10 to 18 digits is aligned on 4 bytes, as the slack-byte algorithm gives (p. 233), not on 8",
1160 basis: Basis::Chosen,
1161 oracle: Oracle::EnterpriseCobol,
1162 },
1163 Assumption {
1164 id: SYNC_SLACK_OWNER,
1165 claim: "Slack bytes before a synchronized item belong to the group of the elementary item before it (Language Reference SC27-8713-03, p. 234), so a group that ended just before them grows by them; but when that group is a table or a redefinition, or ends earlier than the slack begins, the slack bytes stay in the group that holds it and the table's occurrences keep their length",
1166 basis: Basis::Chosen,
1167 oracle: Oracle::EnterpriseCobol,
1168 },
1169 Assumption {
1170 id: SYNC_REDEFINES_REFUSED,
1171 claim: "A synchronized item that starts a redefinition where its boundary would need slack bytes stops the compile. The Language Reference says such an item must not need them and that the redefined item must be aligned for it (SC27-8713-03, pp. 232-233), but not what the compiler does when a program breaks the rule",
1172 basis: Basis::Chosen,
1173 oracle: Oracle::EnterpriseCobol,
1174 },
1175 Assumption {
1176 id: DECIMAL_COMMA_SEPARATOR,
1177 claim: "Under DECIMAL-POINT IS COMMA a comma between digits, or after a space, parenthesis or sign and before a digit, is a numeric literal's decimal point, and a comma after any other word is a separator even with a digit after it, so T(1,2) has the one subscript 1,2 and T(I,2) has two. The Language Reference says only that a separator comma is a comma followed by a space (SC27-8713-03, p. 49) and that the clause exchanges the comma's and the period's functions in numeric literals (p. 131); a period before a digit is then an error",
1178 basis: Basis::Chosen,
1179 oracle: Oracle::EnterpriseCobol,
1180 },
1181 Assumption {
1182 id: DECIMAL_COMMA_DISPLAY_LITERAL,
1183 claim: "DISPLAY of a numeric literal writes it as the program wrote it, so under DECIMAL-POINT IS COMMA its decimal point is a comma; the Language Reference says nothing of how DISPLAY shows a numeric literal (SC27-8713-03, pp. 333-334)",
1184 basis: Basis::Chosen,
1185 oracle: Oracle::EnterpriseCobol,
1186 },
1187 Assumption {
1188 id: ARITH_DIGIT_LIMITS,
1189 claim: "A numeric or numeric-edited PICTURE whose digit positions, scaling positions P included, exceed 18 under ARITH(COMPAT) or 31 under ARITH(EXTEND), and a numeric literal with more digits than that, stop the compile (Language Reference SC27-8713-03, pp. 45, 209, 217-218; Programming Guide SC27-8714-03, p. 349). Neither manual gives the diagnostic's severity, and P is counted for every numeric item, where the Language Reference counts it for numeric-edited items and arithmetic operands (p. 209)",
1190 basis: Basis::Chosen,
1191 oracle: Oracle::EnterpriseCobol,
1192 },
1193 Assumption {
1194 id: MULTIPLE_RESULTS,
1195 claim: "An arithmetic statement with several receivers computes what they share once, before any is stored, and each receiver in turn then takes it or combines it with its own current value, its subscripts evaluated then (Language Reference SC27-8713-03, p. 298). For ADD, SUBTRACT, MULTIPLY and DIVIDE without GIVING the shared part is the operands other than the receiver; for COMPUTE and the GIVING forms it is the whole expression, so a receiver that COMPUTE names twice gets the same result twice",
1196 basis: Basis::Chosen,
1197 oracle: Oracle::EnterpriseCobol,
1198 },
1199 Assumption {
1200 id: ALTER_DEBUGGING,
1201 claim: "Once an ALTER has run, the debugging section that serves each paragraph it alters runs, once for each TO [PROCEED TO] phrase in the order written, with DEBUG-LINE the ALTER, DEBUG-NAME the altered paragraph as DEBUG_NAME_FORM gives it, and DEBUG-CONTENTS the procedure-name after TO PROCEED TO, a qualifier after OF (Language Reference SC27-8713-03, pp. 19-20, 716). A procedure named only after TO PROCEED TO gets no debugging section from the ALTER: p. 716 says an ALTER 'referring to the named procedure', and Table 2 on p. 20 has an ALTER row for procedure-name-1 alone, as CCVS85 DB105A expects under ALL PROCEDURES. Under ALL PROCEDURES an ALTER in the declaratives runs none, as p. 716 says; there an ALTER of a paragraph that a USE FOR DEBUGGING names still runs its section, as p. 716 makes no exception for it",
1202 basis: Basis::Chosen,
1203 oracle: Oracle::EnterpriseCobol,
1204 },
1205 Assumption {
1206 id: PERFORM_RETURN_POINTS,
1207 claim: "An out-of-line PERFORM arms a return point at the end of its range's last paragraph (Language Reference SC27-8713-03, p. 419), one per activation, since a CALL resets return points (Programming Guide SC27-8714-03, p. 547). Control that passes that end by any path, falling through or by GO TO, returns to the PERFORM, so PERFORM B THRU A with A before B returns when control reaches the end of A, and a range that passes the end of another active PERFORM's range returns there to that PERFORM. Neither manual says what a PERFORM that control leaves by GO TO leaves behind: its return point stays armed, as the Programming Guide's warning against ranges that keep control from the end implies (p. 772), until control passes it and returns after that PERFORM, which then puts back the point it displaced; ironwork refuses at run time to return so into a PERFORM that repeats or is inside another statement. EXIT SECTION goes to the end of the section, past the return point of a performed paragraph in it (LR p. 345)",
1208 basis: Basis::Chosen,
1209 oracle: Oracle::EnterpriseCobol,
1210 },
1211 Assumption {
1212 id: FLOAT_FUNCTION_ARGUMENTS,
1213 claim: "A floating-point argument, item or expression, is allowed wherever a function takes a numeric argument and refused where it takes an integer (Language Reference SC27-8713-03, p. 507). INTEGER and INTEGER-PART of one return an integer of 30 digits, 31 under ARITH(EXTEND), and ABS, MAX, MIN and REM with one are evaluated in floating point and return it (Programming Guide SC27-8714-03, pp. 799 and 801). The guide names REM a mixed function where the Language Reference types it numeric (p. 633), and gives the precision only of floating-point functions: a mixed function is evaluated here in long floating point, extended under ARITH(EXTEND), as they are",
1214 basis: Basis::Chosen,
1215 oracle: Oracle::EnterpriseCobol,
1216 },
1217];
1218
1219pub fn get(id: &str) -> &'static Assumption {
1220 ASSUMPTIONS.iter().find(|a| a.id == id).unwrap_or_else(|| panic!("no assumption {id}"))
1221}
1222
1223pub fn c_series() -> impl Iterator<Item = (usize, &'static Assumption)> {
1226 ASSUMPTIONS.iter().enumerate().map(|(i, a)| (i + 1, a))
1227}
1228
1229#[cfg(test)]
1230mod tests {
1231 use super::*;
1232
1233 #[test]
1234 fn ids_are_unique() {
1235 let mut ids: Vec<_> = ASSUMPTIONS.iter().map(|a| a.id).collect();
1236 ids.sort();
1237 ids.dedup();
1238 assert_eq!(ids.len(), ASSUMPTIONS.len());
1239 }
1240
1241 #[test]
1242 fn c_series_numbers_run_from_one_without_gaps() {
1243 let numbers: Vec<usize> = c_series().map(|(n, _)| n).collect();
1244 assert_eq!(numbers, (1..=ASSUMPTIONS.len()).collect::<Vec<_>>());
1245 }
1246
1247 #[test]
1248 fn c_series_keeps_every_id_once_and_leaves_the_register_alone() {
1249 let before: Vec<&str> = ASSUMPTIONS.iter().map(|a| a.id).collect();
1250 let seen: Vec<&str> = c_series().map(|(_, a)| a.id).collect();
1251 assert_eq!(seen, before);
1252 assert_eq!(ASSUMPTIONS.iter().map(|a| a.id).collect::<Vec<_>>(), before);
1253 }
1254}