IBM DOS/VS Error Codes

IBM DOS/VS COBOL has a form of the USE statement in the DECLARATIVES section that is not recognized by ACUCOBOL-GT:

USE AFTER STANDARD ERROR PROCEDURE ON file-name GIVING
       data-name-1 [data-name-2]

This form is accepted by ACUCOBOL-GT when the -Cv option is in effect.

When an error handler introduced by this statement is invoked, the runtime puts special error codes into the eight-byte data item data-name-1. Each byte is loaded with 1s if the corresponding error condition is true. If the corresponding error condition is false, ACUCOBOL-GT loads it with zeros.

Here are the IBM conditions:

byte indexed direct sequential
1 (leftmost) DASD error data check in count parity error
2 wrong record length wrong record length wrong record length
3 prime data full no room found
4 cylinder index too small data check in key or data  
5 master index too small    
6 overflow area full    
7 no EOF record written in prime data area    

This is how the preceding error conditions are mapped into the conditions detected by ACUCOBOL-GT:

85 74 Vax DG IBM data-name-1
00 00 00 00 00 10000000
48 91 48 92 13 10000000
49 91 49 92 13 10000000
47 91 47 92 13 10000000
42 91 94 91 92 10000000
38 93 38 92 93 10000000
41 92 41 91 93 10000000
37 95 37 91 93 10000000
93 93 91 94 93 10000000
94 94 97 97 93 01000000
48 90 48 92 13 10000000
24 24 24 24 24 00100000
22 22 22 22 22 00010000
24 24 24 24 24 00010000
34 34 34 34 34 00100000
30 30 30 30 30 10000000
48 90 48 92 13 10000000
49 90 49 92 13 10000000
23 23 23 23 23 01000000
99 99 92 94 23 10000000
44 97 44 92 21 01000000
43 90 43 92 23 01000000
47 90 47 92 13 10000000
10 10 10 10 10 01000000
42 91 42 92 92 10000000
05 00 05 00 10 10000000
39 94 39 9A 95 01000000
46 96 46 10 21 01000000
9A 9A 9A 9A 23 10000000
02 02 02 00 00 00010000
35 94 35 91 93 10000000
37 90 39 91 93 10000000
98 98 30 9B 93 01000000
94 94 39 92 93 01000000
9B 9B 9B 9B 23 10000000
02 02 00 00 00 00010000
07 00 07 00 00 10000000
14 00 14 00 00 01000000
24 00 24 00 24 10000000
21 21 21 21 21 00010000
9C 9C 9C 9C 23 10000000
0M 0M 0M 0M 00 10000000
9D 9D 9D 9D 92 10000000
9Z 9Z 9Z 9Z 92 10000000
9E 9E 9E 9E 92 10000000