ACCESS MODE IS DYNAMIC RECORD KEY IS EMPLOYEE-ID. DATA DIVISION. FILE SECTION. FD HR-DATA-FILE. 01 HR-RECORD. 05 EMPLOYEE-ID PIC 9(6). 05 OTHER-HR-DATA PIC X(100). PROCEDURE DIVISION. MAIN-ROUTINE. OPEN I-O HR-DATA-FILE MOVE "123456" TO EMPLOYEE-ID READ HR-DATA-FILE INVALID K...
ACCESS MODE IS DYNAMIC RECORD KEY IS AMT1-KEY FILE STATUS IS AMT1-STAT. *** DBFAMT2 FILE *** SELECT DBFAMT2 ASSIGN TO DBFAMT2 ORGANIZATION IS INDEXED ACCESS MODE IS SEQUENTIAL RECORD KEY IS AMT2-KEY FILE STATUS IS AMT2-STAT. DATA DIVISION. FILE SECTION. FD CMFACIF LABEL RECORDS ...
ACCESS MODE IS DYNAMIC RELATIVE KEY IS DAY–NUMBER FILE STATUS IS file–status 对于索引文件,还有声明如下: [ORGANIZATION IS INDEXED] 是索引文件必须的 [ACCESS MODE IS SEQUENTIAL/RANDOM/DYNAMIC] RECORD KEY IS data1 [AlterNATE RECORD KEY IS data2 [WITH DUPLICATES]] 访问方式有3种,缺省是SEQUENTIAL。
ACCESS MODE IS DYNAMIC RELATIVE KEY IS DAY-NUMBER FILE STATUS IS file-status 对于索引文件,还有声明如下: [ORGANIZATION IS INDEXED] 是索引文件必须的 [ACCESS MODE IS SEQUENTIAL/RANDOM/DYNAMIC] RECORD KEY IS data1 [ALTERNATE RECORD KEY IS data2 [WITH DUPLICATES]] 访问方式有3种,缺省是SEQUENTIAL。
INPUT-OUTPUTSECTION.FILE-CONTROL.SELECTBASSIGNTOCBCB*是外部文件名,其实是文件的外部地址FILESTATUSISSTATUS-CB*status-cb是文件状态字,打开成功的话这个值为00,这个字作为一个变量是需要在数据部的本地工作节中进行定义ACCESSMODEISDYNAMIC*文件的访问方式,顺序,随机和动态,顺序文件只允许顺序访问ORGANIZATIONISINDEXED...
[ACCESS MODE IS ... ] (SEQUENCIAL, RANDOM , DYNAMIC) [RECORD KEY IS ... ] [FILE STATUS IS ... ] CHAPTER 4数据部之一 一。数据部概述。 1。 数据部的作用是定义数据项属性,描述数据结构。所有在过程部中出现的数据项都必须在数据部中对它们的属性进行说明。包括数据项的类型,数据项间的关系,记录...
SELECT[OPTIONAL]file-nameASSIGNTOFILE_VMSORGANIZATIONISINDEXEDACCESSMODEISDYNAMICRECORDKEYISfile-prikeyFILESTATUSISfile-status.索引文件 数据部(FILESECTION)FDfile-name[LABELRECORDSARESTANDARD/OMITTED].01record-name.---recordname05PROD-CODEPIC9(04).05PROD-QUANTITYPIC9(05).05PROD-PRICEPIC9(06...
[ACCESS MODE IS ... ] (SEQUENCIAL, RANDOM , DYNAMIC) [RECORD KEY IS ... ] [FILE STATUS IS ... ] CHAPTER 4 数据部之一 一。数据部概述。 1。 数据部的作用是定义数据项属性,描述数据结构。所有在过程部中出现的数据项都必须在数据部中对它们的属性进行说明。包括数据项的类型,数据项间的关系,记...
ACCESS MODE IS DYNAMIC 在读取文件时应使用:READ文件名NEXT RECORD [INTO标识符] [; AT END强制语句] 例:MOVE 10 TO RE-KEY START DAFILE KEY > RE-KEY INVALID KEY GO TO ERR. READ DAFILE NEXT RECORD AT END GO TO TERM. 注意:(1)READ语句有两种形式,而对于WRITE,REWRITE和DELETE语句,没有NEXT可...
ACCESS [MODE] [IS] * RECORD/RELATIVE [KEY] [IS] * ALTERNATE [RECORD] [KEY] [IS] * [[WITH] DUPLICATES] [FILE] STATUS [IS] DATANAME1 DATANAME2. INFILE是程序中使用的逻辑文件名,它必须在数据部文件节的FD或SD条目中被描述。 FILE.DAT可以是操作系统下的物理文件,也可以是记号名(如DD名或环...