狀態(tài)碼(FILE STATUS).docx_第1頁
狀態(tài)碼(FILE STATUS).docx_第2頁
狀態(tài)碼(FILE STATUS).docx_第3頁
狀態(tài)碼(FILE STATUS).docx_第4頁
狀態(tài)碼(FILE STATUS).docx_第5頁
已閱讀5頁,還剩4頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

狀態(tài)碼 在FILE-CONTROL節(jié)采用了FILE STATUS子句,則由其指定的2字節(jié)的字符型數(shù)據(jù)項(xiàng)記錄文件操作的狀態(tài)碼,該狀態(tài)碼在執(zhí)行EXCEPTION/ERROR聲明或INVALID KEY/AT END子句前填寫。其他狀態(tài)由FILE STATUS從句中的data-name-8描述,它不能用于QSAM文件(OS/390、VM)以及行順序文件(Workstation)。+-+|Table 32. 狀態(tài)碼碼值和含義 |+-+-+|高位數(shù)字含義 | 低位數(shù)字含義 |+-+-+-+-+| 0 |成功結(jié)束 | 0 |無更多信息 | | +-+-+| | | 2 |僅適用于有允許重復(fù)值的替換索引的索引文件 | | | | | | | |輸入輸出語句正確執(zhí)行,但發(fā)現(xiàn)了重復(fù)值. | | | |-對于READ語句,當(dāng)前讀出的關(guān)鍵字和下一個(gè)記錄關(guān)鍵字 | | | | 相同. | | | |-對于REWRITE或WRITE語句,當(dāng)前寫入的記錄與現(xiàn)有記錄 | | | | 關(guān)鍵字重復(fù). | | +-+| | | 4 |READ語句成功執(zhí)行,但是讀出的記錄長度與文件描述不 | | | |一致. | | +-+| | | 5 |OPEN語句成功執(zhí)行,但是用optional引用的文件不存在, | | | |文件模式為I-O或者EXTEND時(shí),成功地建立了文件. | | | |對OS/390和VM VSAM順序文件不適用. | | +-+-+| | | 7 |帶NO REWIND,REEL/UNIT或FOR REMOVAL子句的CLOSE語句| | | |或帶NO REWINDI子句的OPEN語句,引用的文件不在可反轉(zhuǎn)| | | |媒介上. |+-+-+-+-+| 1 |讀寫文件結(jié)束| 0 |順序讀文件遇到文件結(jié)束,沒有邏輯記錄. | |condition | |首次讀optional文件,但是文件不存在. | | +-+-+| | | 4 |順序讀相對文件,但是相對記錄號的標(biāo)志數(shù)字大于相對碼| | | |數(shù)據(jù)項(xiàng)的尺寸. |+-+-+-+-+| 2 |無效碼 | 1 |順序存取索引文件存在次序(sequence)錯. | | | |在一次READ成功后,REWRITE執(zhí)行前,記錄的主碼被改變| | | |了,或者是下一個(gè)記錄的主碼不滿足升序限制 | | | | | | | |對于OS/2 for Btrieve索引文件,狀態(tài)21不可用。此時(shí) | | | |可以碼的任意次序順序創(chuàng)建記錄 | | +-+-+| | | 2 |寫入記錄將引起碼值重復(fù)(相對文件) | | | |寫入或者重寫記錄將導(dǎo)致主碼或附屬碼重復(fù),但在索引 | | | |文件中并沒有DUPLICATES子句 | | +-+-+| | | 3 |試圖隨機(jī)訪問文件中并不存在的記錄,或試圖對一個(gè)設(shè) | | | |成optinal而不存在的輸入文件進(jìn)行START或READ | | +-+-+| | | 4 |寫相對文件活或索引文件超出了外部定義的邊界 | | | |或者試圖對相對文件進(jìn)行WRITE,但相對記錄號中的 | | | |significant digits超過了定義的最大長度 |+-+-+-+-+| 3 |Permanent | 0 | | |錯誤條件 +-+-+| | | 4 |邊界沖突 | | | |寫超出了外部定義的順序文件邊界 | | +-+-+| | | 5 |帶有INPUT、I-O或EXTEND子句的OPEN語句試圖訪問一個(gè) | | | |不存在的文件,而該文件沒有設(shè)成optinal | | +-+-+| | | 7 |文件不支持OPEN語句指定的打開方式: | | | | | | | |1. 指定了EXTEND或OUTPUT子句,但文件不支持寫操作 | | | |2. 指定了I-O子句,但文件不支持I-O操作 | | | |3. 指定了INPUT子句,但文件不允許讀 | | +-+-+| | | 8 |試圖OPEN一個(gè)已經(jīng)帶鎖關(guān)閉的文件 | | +-+-+| | | 9 |OPEN語句失敗程序指定的文件屬性與文件屬性不同 | | | |這些屬性包括:文件組織方式(順序、相對、索引), | | | |主碼,次碼,字符集,最大紀(jì)錄長度,記錄類型(定長 | | | |或變長),塊填充度等。 | | | | | | | |對于AIX、OS/2和Windows,狀態(tài)39不適用于行順序文件 | | | |或B樹文件(line sequential files、Btrievefiles. |+-+-+-+-+| 4 |邏輯錯誤 | 1 |試圖打開已經(jīng)打開的文件 | |condition | | | | +-+-+| | | 2 |試圖關(guān)閉一個(gè)未打開的文件 | | | | | | +-+-+| | | 3 |對于大規(guī)模存儲器上以順序存取方式打開的文件來說, | | | |在執(zhí)行REWRITE語句之前的IO語句不是一個(gè)成功的READ | | | |語句 | | | | | | | |對于以順序存取方式打開的相對、索引文件來說, | | | |在執(zhí)行REWRITE或DELETE語句之前的IO語句不是一個(gè) | | | |成功的READ語句 | | +-+-+| | | 4 |邊界沖突試圖重寫REWRITE一個(gè)記錄,但是記錄長度| | | |不匹配。對于變長記錄,可能是記錄長度超過最小或最 | | | |大允許的長度。 | | | |RECORD IS VARYING | | +-+-+| | | 6 |順序讀取一個(gè)以INPUT或I-O方式打開的文件,但是沒有 | | | |下一個(gè)有效記錄: | | | |1. 前一個(gè)READ語句失敗,但是沒有產(chǎn)生結(jié)束條件 | | | |2. 前一個(gè)READ語句產(chǎn)生了AT END條件 | | +-+-+| | | 7 |試圖讀取一個(gè)不是以INPUT或者I-O方式打開的文件 | | | | | | +-+-+| | | 8 |試圖寫一個(gè)不是以I-O、OUTPUT或EXTEND方式打開的文件| | | | | | +-+-+| | | 9 |試圖刪除或重寫(DELETE or REWRITE)一個(gè)不是以I-O | | | |方式打開的文件 |+-+-+-+-+|9 |實(shí)現(xiàn)者定義 | 0 | | |的條件 +-+-+| | | 1 |對VSAM文件(OS/390和VM): 文件口令錯 | | | | | | | |在AIX、OS/2和Windows中: 權(quán)限不夠 | | +-+-+| | | 2 |邏輯錯誤 | | +-+-+| | | 3 |除了QSAM文件外: 資源不可用 | | +-+-+| | | 4 |對VSAM文件(OS/390和VM下,帶CMPR2編譯選項(xiàng)): | | | |以順序方式存取文件而沒有文件位置指示 | | | | | | | |在AIX、OS/2和Windows中: 并發(fā)打開錯誤 | | +-+-+| | | 5 |除了QSAM文件以外: 無效或不完全的文件信息 | | +-+-+| | | 6 |對VSAM文件(限于OS/390和VM): 沒有DD語句 | | | | | | | |對QSAM文件(限于OS/390和VM): 沒有DD語句,并且 | | | |設(shè)置了CBLQDA(OFF) | | | | | | | |在AIX、OS/2和Windows中: 文件名錯 | | +-+-+| | | 7 |對VSAM文件(限于OS/390和VM): OPEN執(zhí)行成功,并 | | | |驗(yàn)證了文件完整性 | | | | | | | |在AIX、OS/2和Windows中: 訪問遠(yuǎn)程文件出錯 | | +-+-+| | | 8 |在AIX、OS/2和Windows中: 打開已經(jīng)封鎖的文件失敗 | | | | | | +-+-+| | | 9 |在AIX、OS/2和Windows中: 訪問已經(jīng)封鎖的記錄失敗 | | | | |+-+-+-+-+StatusKey-1ConditionStatusKey-2Description0SuccessfulCompletion0No further information2The input-output statement was successfully executed, but a duplicate key was detected. For a READ statement the key value for the current key of reference was equal to the value of the same key in the next record within the current key of reference. For a REWRITE or WRITE statement, the record just written created a duplicate key value for at least one alternate record key for which duplicates are allowed.4A READ statement was successfully executed, but the length of the record being processed did not conform to the fixed file attributes for that file.5An OPEN statement is successfully executed but the referenced optional file is not present at the time the OPEN statement is executed. If the open mode is I-O, the file has been created. Under MVS, the file has been created if the open mode is I-O or EXTEND. This does not apply to VSAM sequential files. File status 0 is returned.7For a CLOSE statement with the NO REWIND, REEL/UNIT, or FOR REMOVAL phrase or for an OPEN statement with the NO REWIND phrase, the referenced file was on a non-reel/unit medium.1At END0A sequential READ statement was attempted and no next logical record existed in the file because the end of the file had been reached, or the first READ was attempted on an optional input file that was not present.4A 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 data item described for the file.2Invalid key1A sequence error exists for a sequentially accessed indexed file. The prime record key value has been changed by the program between the successful execution of a READ statement and the execution of the next REWRITE statement for that file, or the ascending requirements for successive record key values were violated.2An attempt was made to write a record that would create a duplicate key in a relative file; or an attempt was made to write or rewrite a record that would create a duplicate prime record key or a duplicate alternate record key without the DUPLICATES phrase in an indexed file. This key value applies to an indexed file in which the alternate key has been declared UNIQUE.3An attempt was made to randomly access a record that does not exist in the file, or a START or random READ statement was attempted on an optional input file that was not present.4An attempt was made to write beyond the externally defined boundaries of a relative or indexed file. Or, a sequential WRITE 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 data item described for the file.3Permanent error0No further information.4A permanent error exists because of a boundary violation; an attempt was made to write beyond the externally-defined boundaries of a sequential file.5An OPEN statement with the INPUT, I-O, or EXTEND phrase was attempted on a non-optional file that was not present.7An OPEN statement was attempted on a file that would not support the open mode specified in the OPEN statement. Possible violations are:1. The EXTEND or OUTPUT phrase was specified but the file would not support write operations.2. 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 file would not support read operations.4. Under VSE, the EXTEND phrase was specified for a SAM file.8An OPEN statement was attempted on a file previously closed with lock.9The OPEN statement was unsuccessful because a conflict was detected between the fixed file attributes and the attributes specified for that file in the program. These attributes include the organization of the file (sequential, relative, or indexed), the prime record key, the alternate record keys, the code set, the maximum record size, the record type (fixed or variable), and the blocking factor.4Logic error1An OPEN statement was attempted for a file in the open mode.2A CLOSE statement was attempted for a file not in the open mode.3For a mass storage file in the sequential access mode, the last input-output statement executed for the associated file prior to the execution of a REWRITE statement was not a successfully executed READ statement.For relative and indexed files in the sequential access mode, the last input-output statement executed for the file prior to the execution of a DELETE or REWRITE statement was not a successfully executed READ statement.4A boundary violation exists because an attempt was made to rewrite a record to a file and the record was not the same size as the record being replaced, or an attempt was made to write or rewrite a record that was larger than the largest or smaller than the smallest record allowed by the RECORD IS VARYING clause of the associated file-name.5An attempt has been made to REWRITE a record to a file, and the record is not the same size as the record being replaced.(Micro Focus) For line sequential files this refers to the physical size of the record, that is after space removal, tab compression and null insertion. In this case, the physical size of the new record is allowed to be smaller than that of the record being replaced.6A sequential READ statement was attempted on a file open in the input or I-O mode and no

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論