Sunteți pe pagina 1din 6

Fil-e Status

tr******************** Text Bel_ow Copyright (c) 2009, IBM *********************


Status key
If the FILE STATUS clause is specified in the FILE-CONTROL entry, a value
is placed in the specified status key (the Z-character data item named in
the FILE STATUS clause) during execution of any request on that file; the
vaLue indicates the status of that request. The val-ue is placed in the
status key before execution of any EXCEPTION/ERROR declarative or fNVALID
KEY/AT END phrase associated wj-th the request.

There are two status key data-names. One is described by data-name-1 in


the FILE STATUS clause of the FILE-CONTROL entry. This is a two character
data item with the first character known as status key 1 and the second
character known as status key 2. The combinations of possible values and
their meanings are shown in Table 35.
x The other status key is described by data-name-8 in the FILE STATUS clause
X of the FILE-CONTROL entry. Data-name-8 does not apply to QSAM files
X (oS/390 and VM only) or Co line-sequential- files (Workstation only) For
X more informati-on on data-name-8, see "FILE STATUS clause" in item FILE-STATUS.

I taute 35. status key values and meanings


Hlgh- Meaning Meaning
order order
digit dlglt
o-? Successful I o I No further information 7
oL completion +-------+-
This file status val-ue only applies to
indexed files with alternate keys that
al1ow duplicates.
The input-output staLement was
The input-output statement was
successfully executed, but a duplicate key
was detected. For a READ stat.ement the
key value for the current key of reference
was equal a
cord wi thin@
th-e-- neTE- re
rffi REWRTTE or WRITE
statement, lhe record just written created
a duplj-cate ke
alt.einate record key for whiCF-d-up-ITdates
are allowed.
A READ statemenL was successfully
executed, but the length of the record
being processed did not conform to the
fixed fil-e attributes for that file.
An OPEN statement is successfully executed
but the referenced optional fi-le is not
present at the tj-me the OPEN statement is
executed. The file has been created if
the open mode is I-O or EXTEND. This does
not apply to OS/390 and VM VSAM sequential
Page 1-
File Status
files.
-------+
'7 For a closE statement with the No REWIND,
REEL/IINIT, or FoR REMOVAL phrase or for an
OPEN statement with the NO REWIND phrase,
the referenced file was on a non-ree1/unit
medium.
-------+
At end 0 A sequential RE4D statement was attempted
lo condition and no next logrcal recorct exlsteo ]-n trne
file because the end of the fil-e had been
r-eidfied7- or -the ffrst EEAII was a-Eempted-
ffiGi-bpti-onal inpUt file that was not
-------+ _tl?l?il _

4 A sequential READ statement was attempted


for a relative file and the number of
significant digits in the relative record
number was larger than the size of the
relative key dat.a item described for the
file.
-------+
2.r,
Invalid key 1 A sequence error exists for -a sq-quentially
condition
@nged by the Program
2L between the successful execution of a READ
statemenL and the execution of the next
Lb REWRITE statement for that file, or the
ascending requirements for successive
record key values were violated.
-------+
t An attempt was made to write a record that
crea a
to write or
rewrite a record that would create a
duplicate prime record key or a duplicate
alLernate record key without the
DUPLICATES phrase in an indexed fi1e.

attempt was made to randomly access a

attempted on an optional input file that


was not present.
An attempt was made to write beyond the
externaLly defined boundaries of a
relat.ive or indexed f ile. Or, a
relative or indexed fi1e. or, a
sequentiaf WRITE statement was attempted
for a relative flle and the number of
significant. digits in the relative record
number was larger than the size of the
relative key data item described for the
fi1e.
t-------f-

| : I Permanent lo I xo further information


lltt
Page 2
File Status
condition A permanent error exists because of a
boundary violation,' an aLtempt was made to
write beyond the externally-defined
boundarj-es of a sequential file.
An OPEN statement with the INPUT, I-O, or
EXTEND phrase was attempted on a
non-optional fj-le that was not present.
An OPEN staLement was attempted on a file
that woul-d not support the open mode
specified in the OPEN statement. Possible
violations are:
The EXTEND or OUTPUT phrase was
specified but the file would not
support write operations.
z. The I-O phrase was specified but the
file would not support the input and
output operations permitted.
3. The INPUT phrase was specified but the
fil-e would not support read
operations.
B An OPEN statement was attempted on a file
B An OPEN statement was attempted on a file
previously closed with lock.
+-------+
;;" ;;;-";;;";.;; ;;= ;;;.";;;;,
because a conflict wal detected between
the fi
attri e in the
proqrEft .*---TEese attributes include -EhE- -
+
L-:_
org-anTzation of the f i1e (sequent.ia1,
relative, or indexed), the pri-me record
key, the alternate record keys, the code
set, the maximum record size, the record
type (fixed or variable), and the blocking
factor.
x Under AIX and Windows, file status 39 is
x not supported for l-ine-sequent.ial fil-es or
x Btrieve files.
4t 4 Logic error
condition
I
1 ;in ;;; ;;;;";";; ;;; ;;;";n;"; ;;; ; ;;i"
the opeh mode.
I

4z +
I

I
noF in tFe open mode

2 For a mass storage file in the sequenti-al


access mode, the last. input-output
statement executed for the associaLed file
prior to the execution of a REWRITE
statement was not a successfully executed
READ statement.

For relative and i-ndexed files in the


Page 3
Fife Status
sequential access mode, the l-ast for the
infut-output statement executed for the
iniut-output statement executed DELETE or
fiie prioi to th" execution of a
REWRITE statement was noL a successfully
executed READ statement '
+-
4 A boundary violation exists because an a
attempt was made to rewrite a record to
file and the record was not the same sl-ze
as the record being rePlaced, or an
attempt was made to write or rewrite a or
reco.-d Lhat was larger than the largest
smaller than the smallest record allowed
by the RECORD IS VARYING clause of the
associated file-name.
+----
6 1a READ statement was-attempted
a file open in the input or I-O mode
on""q.r"ntia1
and no valid next record had been
established because:
1-. The Preceding READ statement was at
unsuccessful but did not cause an
end condition
2. The Preceding READ statement caused an
at end condition.
+-------
'l The
- execution ofF-a READ s-Eelement was
41 a ' l-rtpu-L
-Ene
or f-O mode.
4* +-------+
The -executj-on of::aa WRILE" stateqlent
: was
8 .
- t

output, or extend mode. -


4,1 +-------+
9 The CXCCUT1ON Of A DELETE OT REWRITE
L oPen
ffiitE-e-d=-n- a TTTE not-OPen
in the I-o mode.
-------+
9 lmplemenLor- Under AIX and Windows: No further
defined information.
condition
For VSAM only under OS/390 and Mvl: See the
information on VSAM return codes in the
IBM COBOL for oS/390 & VM Programming
Guide.

1 For VSAM onIY undet aS/390 and vM:


Password failure.
Under AIX and Windows: Authorization
failure.
error.

QSAM: Resource not


| 3 | ror a1f files, except
Page 4
File Status
available.
-------+
4 ;;; ;il ;;;.; ;;7,;; ;;; ; ;,;; ;;;;;
compiler-option only: No file position
indicator for sequential request.
Under AIX and Windows: Concurrent open
error.
5 For al-l f iles, excepL QSAM: Invalid or
incomplete file information.

4b
.>
6 ;;;
OPEN
;ilstatement
;;i" ;;;"; ;;t;;; ;;; ;,
with the
OUTPUT
;
phrase was
attempted, or an OPEN statement with the
attempted, or an OPEN statement with the
f-O or EXTEND phrase was attempted for an
optional file, but no DD statement was
specified for tffi
For QSAMfile under OS/390 and VM: An
OPEN statement with the OUTPUT phrase was
attempted, or an OPEN statement with the
I-O or EXTEND phrase was attempted for an
optional file, but no DD statement was
specified for the file and the CBLQDA(OFF)
run-time option was specified.
Under AIX and Wj-ndows: Fil-e system not
available.
+-------+
;;; ;il ;;i; ;;;;; ;;t;;; ;;; ;,
statement execution successful-: File
;;;;
integrity verified.
Under AIX and Windows: Errors re]ated to
remote file access.
+-------+
;;;"; ";; ;;;;;;;;;;; ;;"; ;;rr.; ;;" ;;
locked fi1e.
Under OS/390: Open failed due to either
the invali-d contents of an environment
variable specified in a SELECT ... ASSIGN
clause, or failed dynamic allocatj-on. For
more information about the conditions
under which this status can occur, see
'ASSIGN clause" in item ASSIGN.
+- +-
; Under AIX and Windows: Record access
failed due to locked record.
7 For VSAM only under OS/390 and VM: OPEN
statement execution successful : Fil-e
integrit.y verif ied.
Under AIX and Windows: Errors related to
remote file access.
i-------f-

I e I Under AIX and Wi-ndows: Open failed due to


Page 5
\

File Status
locked file.
Under OS/390: Open failed due to either
the invalid contents of an environment
variable specified in a SELECT ... ASSIGN
clause, or faifed dynamic allocation. For
more information about the conditions
under which this status can occur, see
"ASSIGN clause" in item ASSIGN.
+-------+-
I S I Under AIX and Windows: Record access
I I failed due to locked record

Page 5

S-ar putea să vă placă și