file status keys in mainframes

Upload: sxdasgu

Post on 10-Apr-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 File Status Keys in Mainframes

    1/6

    Fil-e Statustr******************** Text Bel_ow Copyright (c) 2009, IBM *********************Status keyIf the FILE STATUS clause is specified in the FILE-CONTROL entry, a valueis placed in the specified status key (the Z-character data item named inthe FILE STATUS clause) during execution of any request on that file; thevaLue indicates the status of that request. The val-ue is placed in thestatus key before execution of any EXCEPTION/ERROR declarative or fNVALIDKEY/AT END phrase associated wj-th the request.There are two status key data-names. One is described by data-name-1 inthe FILE STATUS clause of the FILE-CONTROL entry. This is a two characterdata item with the first character known as status key 1 and the secondcharacter known as status key 2. The combinations of possible values andtheir meanings are shown in Table 35.The other status key is described by data-name-8 in the FILE STATUS clauseof the FILE-CONTROL entry. Data-name-8 does not apply to QSAM files(oS/390 and VM only) or Co line-sequential- files (Workstation only) Formore informati-on on data-name-8, see "FILE STATUS clause" in item FILE-STATUS.I taute 35. status key values and meanings

    xXXX

    Meaning

    Successful I o I No further information 7completion +-------+- This file status val-ue only applies toindexed files with alternate keys thatal1ow duplicates.The input-output staLement wasThe input-output statement wassuccessfully executed, but a duplicate keywas detected. For a READ stat.ement thekey value for the current key of referencewas equal ath-e-- neTE- re cord wi thin@rffi REWRTTE or WRITE

    Hlgh-orderdigitMeaning orderdlglt

    statement, lhe record just written createda duplj-cate kealt.einate record key for whiCF-d-up-ITdatesare allowed.A READ statemenL was successfullyexecuted, but the length of the recordbeing processed did not conform to thefixed fil-e attributes for that file.An OPEN statement is successfully executedbut the referenced optional fi-le is notpresent at the tj-me the OPEN statement isexecuted. The file has been created ifthe open mode is I-O or EXTEND. This doesnot apply to OS/390 and VM VSAM sequential

    Page 1-

  • 8/8/2019 File Status Keys in Mainframes

    2/6

    lo At endcondition

    Invalid keycondition

    t-------f-| : I Permanentlltt

    -------+'7

    -------+0

    -------+4

    -------+1

    -------+t

    lo

    File Statusfiles.For a closE statement with the No REWIND,REEL/IINIT, or FoR REMOVAL phrase or for anOPEN statement with the NO REWIND phrase,the referenced file was on a non-ree1/unitmedium.A sequential RE4D statement was attemptedand no next logrcal recorct exlsteo ]-n trnefile because the end of the fil-e had beenr-eidfied7- or -the ffrst EEAII was a-Eempted-ffiGi-bpti-onal inpUt file that was not_tl?l?il _A sequential READ statement was attemptedfor a relative file and the number ofsignificant digits in the relative recordnumber was larger than the size of therelative key dat.a item described for thefile.A sequence error exists for -a sq-quentially@nged by the Programbetween the successful execution of a READstatemenL and the execution of the nextREWRITE statement for that file, or theascending requirements for successiverecord key values were violated.

    was made to write a record thatrewrite a record that would create aduplicate prime record key or a duplicatealLernate record key without theDUPLICATES phrase in an indexed fi1e.

    attempted on an optional input file thatwas not present.An attempt was made to write beyond theexternaLly defined boundaries of arelat.ive or indexed f ile. Or, arelative or indexed fi1e. or, asequentiaf WRITE statement was attemptedfor a relative flle and the number ofsignificant. digits in the relative recordnumber was larger than the size of therelative key data item described for thefi1e.

    I xo further information

    An attemptcrea ato write or

    attempt was made to randomly access a

    Page 2

  • 8/8/2019 File Status Keys in Mainframes

    3/6

    xxx4

    condition

    Logic errorcondition

    File StatusA permanent error exists because of aboundary violation,' an aLtempt was made towrite beyond the externally-definedboundarj-es of a sequential file.An OPEN statement with the INPUT, I-O, orEXTEND phrase was attempted on anon-optional fj-le that was not present.An OPEN staLement was attempted on a filethat woul-d not support the open modespecified in the OPEN statement. Possibleviolations are:

    The EXTEND or OUTPUT phrase wasspecified but the file would notsupport write operations.The I-O phrase was specified but thefile would not support the input andoutput operations permitted.3. The INPUT phrase was specified but thefil-e would not support readoperations.

    BB

    An OPEN statement was attempted on a fileAn OPEN statement was attempted on a filepreviously closed with lock.+-------+ ;;" ;;;-";;;";.;; ;;= ;;;.";;;;,because a conflict wal detected betweenthe fiattri e in the+proqrEft .*---TEese attributes include -EhE- -L-:_org-anTzation of the f i1e (sequent.ia1,relative, or indexed), the pri-me recordkey, the alternate record keys, the codeset, the maximum record size, the recordtype (fixed or variable), and the blockingfactor.Under AIX and Windows, file status 39 isnot supported for l-ine-sequent.ial fil-es orBtrieve files.

    z.

    I

    I+I

    I

    1

    2

    ; ;;; ;;;;";";; ;;; ;;;";n;"; ;;; ; ;;i"in the opeh mode.

    For a mass storage file in the sequenti-alaccess mode, the last. input-outputstatement executed for the associaLed fileprior to the execution of a REWRITEstatement was not a successfully executedREAD statement.For relative and i-ndexed files in the

    noF in tFe open mode

    Page 3

  • 8/8/2019 File Status Keys in Mainframes

    4/6

    414*4,1

    -------+9

    6

    4

    +-------'l

    +-------+8+-------+

    9

    lmplemenLor-definedcondition

    1

    Fife Statussequential access mode, the l-astinfut-output statement executed for theiniut-output statement executed for thefiie prioi to th" execution of a DELETE orREWRITE statement was noL a successfullyexecuted READ statement '+- A boundary violation exists because anattempt was made to rewrite a record to afile and the record was not the same sl-zeas the record being rePlaced, or anattempt was made to write or rewrite areco.-d Lhat was larger than the largest orsmaller than the smallest record allowedby the RECORD IS VARYING clause of theassociated file-name.+----1 a ""q.r"ntia1 READ statement was-attemptedon a file open in the input or I-O modeand no valid next record had beenestablished because:

    1-. The Precedingunsuccessfulend condition2. The Preceding READat end condition.

    Under AIX and Windows: No furtherinformation.

    READ statement wasbut did not cause an atstatement caused an

    The execution of a READ s-Eelement was- ' F- -Ene l-rtpu-Laor f-O mode.The executj-on of a WRILE" stateqlent was- - . ::a : - toutput, or extend mode.The CXCCUT1ON Of A DELETE OT REWRITE L oPenffiitE-e-d=-n- a TTTE not-OPenin the I-o mode.

    For VSAM only under OS/390 and Mvl: See theinformation on VSAM return codes in theIBM COBOL for oS/390 & VM ProgrammingGuide.For VSAM onIY undet aS/390 and vM:Password failure.Under AIX and Windows: Authorizationfailure.

    error.| 3 | ror a1f files, except QSAM: Resource not

    Page 4

  • 8/8/2019 File Status Keys in Mainframes

    5/6

    4b>

    -------+File Statusavailable.;;; ;il ;;;.; ;;7,;; ;;; ; ;,;; ;;;;;

    compiler-option only: No file positionindicator for sequential request.Under AIX and Windows: Concurrent openerror.For al-l f iles, excepL QSAM: Invalid orincomplete file information.;;; ;il ;;i" ;;;"; ;;t;;; ;;; ;, ;OPEN statement with the OUTPUT phrase wasattempted, or an OPEN statement with theattempted, or an OPEN statement with thef-O or EXTEND phrase was attempted for anoptional file, but no DD statement wasspecified for tffi

    accessVM: OPEN: Fil-e

    related to

    4

    5

    6

    ;7

    For QSAM file under OS/390 and VM: AnOPEN statement with the OUTPUT phrase wasattempted, or an OPEN statement with theI-O or EXTEND phrase was attempted for anoptional file, but no DD statement wasspecified for the file and the CBLQDA(OFF)run-time option was specified.Under AIX and Wj-ndows: Fil-e system notavailable.+-------+;;; ;il ;;i; ;;;;; ;;t;;; ;;; ;, ;;;;statement execution successful-: Fileintegrity verified.Under AIX and Windows: Errors re]ated toremote file access.+-------+ ;;;"; ";; ;;;;;;;;;;; ;;"; ;;rr.; ;;" ;;locked fi1e.

    +- +-

    Under OS/390: Open failed due to eitherthe invali-d contents of an environmentvariable specified in a SELECT ... ASSIGNclause, or failed dynamic allocatj-on. Formore information about the conditionsunder which this status can occur, see'ASSIGN clause" in item ASSIGN.Under AIX and Windows: Recordfailed due to locked record.For VSAM only under OS/390 andstatement execution successfulintegrit.y verif ied.Under AIX and Windows: Errorsremote file access.

    i-------f-I e I Under AIX and Wi-ndows: Open failed due toPage 5

  • 8/8/2019 File Status Keys in Mainframes

    6/6

    \

    File Statuslocked file.Under OS/390: Open failed due to eitherthe invalid contents of an environmentvariable specified in a SELECT ... ASSIGNclause, or faifed dynamic allocation. Formore information about the conditionsunder which this status can occur, see"ASSIGN clause" in item ASSIGN.+-------+-I S I Under AIX and Windows: Record accessI I failed due to locked record

    Page 5