FILE
FILE statements document card, tape, and other non-database files. A file can represent groups of records (and thus elements) if a RECORD statement includes the WITHIN FILE clause; see later in this section for further details. Files are related to programs through the PROGRAM statement FILE clause; see later in this section for further details. Specifications provided in the FILE statement are used by the CA IDMS DMLO precompiler for COBOL (IDMSDMLC) during the COBOL FD COPY function.
idmscu19
FILE statements document card, tape, and other non-database files. A file can represent groups of records (and thus elements) if a RECORD statement includes the WITHIN FILE clause; see RECORD (REPORT/TRANSACTION) later in this section for further details. Files are related to programs through the PROGRAM statement FILE clause; see PROGRAM later in this section for further details. Specifications provided in the FILE statement are used by the CA IDMS DMLO precompiler for COBOL (IDMSDMLC) during the COBOL FD COPY function.
Optional FILE statement clauses:
- Relate files to users and to other files
- Control the participation of file occurrences in attribute/entity relationships
- Maintain documentation entries and record information required in COBOL FD statements
- Support the definition of file synonyms
If the SET OPTIONS statement specifies SECURITY FOR IDD IS ON, the user must be assigned the proper authority to issue FILE statements.
Syntax
►►─┬─ ADD ─────┬─ FILe name isfile-name─────────────────────────────────────► ├─ MODify ──┤ ├─ REPlace ─┤ └─ DELete ──┘ ►─┬───────────────────────────────────────┬──────────────────────────────────► └─ Version is ─┬─version-number─────┬─┘ └─ NEXt ─┬─ HIGhest ─┬─┘ └─ LOWest ──┘ ►─┬────────────────────────────────────────────────────────┬─────────────────► └┬─ PREpared ─┬─ byuser-id──┬────────────────────────┬─┘ └─ REVised ──┘ └─ PASsword ispassword─┘ ┌───────────────────────────────────────────────────────────────────────┐ ►─▼─┬───────────────────────────────────────────────────────────────────┬─┴──► └─ SAMe AS FILefile-name──┬─────────────────────────────────────┬─┘ └─ Version is ─┬─version-number──┬──┘ ├─ HIGhest ─────────┤ └─ LOWest ──────────┘ ┌────────────────────────────────────────────────────────────────────────── ►─▼─┬────────────────────────────────────────────────────────────────────────►─ └─ COPy ─┬─ ALL COMments TYPes ─┬─ FROm filefile-name────────────────── ├─ COMments ───────────┤ ├─ DEFinition ─────────┤ ├─ ATTributes ─────────┤ ├─ USErs ──────────────┤ ├─ FILes ──────────────┤ ├─ RELated FILes ──────┤ ├─comment-key────────┤ └─relational-key─────┘ ─────────────────────────────────────────────┐ ─►───────────────────────────────────────────┬─┴──────────────────────────────► ─┬───────────────────────────────────────┬─┘ └─ Version is ─┬─version-number─────┬─┘ ├─ HIGhest ────────────┤ └─ LOWest ─────────────┘ ►─┬────────────────────────────────────────────────────────────────────────┬─► └─ NEW NAMe isnew-file-name─┬────────────────────────────────────────┬─┘ └─ Version is ─┬─version-number─────┬─┘ └─ NEXt ─┬─ HIGhest ─┬─┘ └─ LOWest ──┘ ►─┬───────────────────────────────────────────┬──────────────────────────────► └─ NEW Version is ─┬─new-version-number─┬─┘ └─ NEXt ─┬─ HIGhest ─┬─┘ └─ LOWest ──┘ ►─┬─────────────────────────────────────────┬────────────────────────────────► └─ file DEScription isdescription-text──┘ ►─┬─────────────────────────────────┬────────────────────────────────────────► └─ LABels are ─┬─ NULL ◄ ───────┬─┘ ├─ STAndard ─────┤ ├─ NON-standard ─┤ └─ OMItted ──────┘ ►─┬───────────────────────────────────────┬──────────────────────────────────► └─ maximum RECord size isrecord-size──┘ ►─┬─────────────────────────────┬────────────────────────────────────────────► └─ BLOck size isblock-size──┘ ►─┬──────────────────────────────────┬───────────────────────────────────────► └─ RECording MODe is ─┬─ NULl ◄ ─┬─┘ ├─ F ──────┤ ├─ U ──────┤ ├─ V ──────┤ └─ S ──────┘ ►─┬────────────────────────────────────────────┬─────────────────────────────► └─ RECord DEScriptor is ─┬─ DEFined ───────┬─┘ └─ NOT DEFined ◄ ─┘ ┌─────────────────────────────────────────────────────────────────┐ ►─▼─┬─────────────────────────────────────────────────────────────┬─┴────────► └─┬─ INClude ◄ ─┬─ USEr isuser-id──┬──────────────────────┬─┘ └─ EXClude ───┘ └─user-specification─┘ (for completeuser-specificationsyntax, see USER clause) ►─┬──────────────────────────────────────────────────────┬───────────────────► └─ PUBlic access is ─┬───────────┬─ for ─┬─ ALL ◄ ───┬─┘ └─ ALLOwed ─┘ ├─ NONe ────┤ ├─ UPDate ──┤ ├─ MODify ──┤ ├─ REPlace ─┤ ├─ DELete ──┤ └─ DISplay ─┘ ┌────────────────────────────────────────────────────────────────────────── ►─▼─┬────────────────────────────────────────────────────────────────────────►─ └─┬─ INClude ◄ ─┬─ RELated FILe isrelated-file-name──────────────────── └─ EXClude ───┘ ─────────────────────────────────────────────────────────────────────┐ ─►──────────────────────────────────────────────────────────────────┬──┴──────► ──┬────────────────────────────────────┬─┬──────────────────────┬─┘ └─ Version is ─┬─version-number─┬──┘ └─ TEXt isuser-text──┘ ├─ HIGhest ────────┤ └─ LOWest ─────────┘ ┌────────────────────────────────────────────────────────────────────────── ►─▼─┬────────────────────────────────────────────────────────────────────────►─ └─┬─ INClude ◄ ─┬─ FILe name SYNonym isfile-synonym-name─────────────── └─ EXClude ───┘ ─────────────────────────────────────────────────┐ ─►───────────────────────────────────────────────┬─┴──────────────────────────► ─┬───────────────────────────────────────────┬─┘ └─ Version is ─┬─version-number─────────┬─┘ └─┬────────┬─┬─ HIGhest ─┬─┘ └─ NEXt ─┘ └─ LOWest ──┘ ►─┬─────────────────────────────────────────────────────────────────────┬────► └─┬─ INClude ◄ ─┬─ FILE-TYPE is ─┬─ PS ───┬──┬──────────────────────┬─┘ └─ EXClude ───┘ ├─ IS ───┤ └─ TEXt isuser-text──┘ ├─ CARD ─┤ ├─ VS ───┤ └─ UM ───┘ ►─┬─────────────────────────────────────────────────────────────────────┬────► └─┬─ INClude ◄ ─┬─ VSAM-TYPE is ─┬─ KS ───┬──┬──────────────────────┬─┘ └─ EXClude ───┘ ├─ ES ───┤ └─ TEXt isuser-text──┘ └─ RS ───┘ ►─┬────────────────────────────────────────────────────────────────────────┬─► └─┬─ INClude ◄ ─┬─ INPUT-MODULE isuser-module─┬──────────────────────┬─┘ └─ EXClude ───┘ └─ TEXt isuser-text──┘ ►─┬────────────────────────────────────────────────────────────────────────┬─► └─┬─ INClude ◄ ─┬─ DEVICE-TYPE is ─┬─ 2311 ─┬──┬──────────────────────┬──┘ └─ EXClude ───┘ ├─ 2314 ─┤ └─ TEXt isuser-text──┘ ├─ 3310 ─┤ ├─ 3330 ─┤ ├─ 3340 ─┤ ├─ 3350 ─┤ ├─ 3370 ─┤ ├─ 3380 ─┤ ├─ 3390 ─┤ ├─ FBA ──┤ └─ TAPE ─┘ ┌────────────────────────────────────────────────────────────────────────┐ ►─▼┬──────────────────────────────────────────────────────────────────────┬┴─► └┬─ INClude ◄ ─┬─class-nameisattribute-name─┬─────────────────────┬┘ └─ EXClude ───┘ └─ TEXt isuser-text─┘ ┌────────────────────────────────────────────────────────────────────────── ►─▼─┬────────────────────────────────────────────────────────────────────────►─ └─┬─ INClude ◄ ─┬─relational-keyisfile-name────────────────────────── └─ EXClude ───┘ ────────────────────────────────────────────────────────────────────┐ ─►──────────────────────────────────────────────────────────────────┬─┴───────► ─┬────────────────────────────────────┬──┬──────────────────────┬─┘ └─ Version is ─┬─version-number─┬──┘ └─ TEXt isuser-text──┘ ├─ HIGhest ────────┤ └─ LOWest ─────────┘ ┌───────────────────────────────────────────────────────────────┐ ►─▼─┬───────────────────────────────────────────────────────────┬─┴──────────► │ ┌────────────────────┐ │ └─ EDIt ─┬─ COMments ────┬───▼─edit-instruction─┴─ QUIT ──┘ ├─ DEFinition ──┤ └─comment-key─┘ ┌──────────────────────────────────────────────────┐ ►─▼─┬─────────────────────────────────────────────┬──┴───────────────────────►◄ └─┬─ COMments ─────┬── is ─┬─ NULl ─────────┬─┘ ├─ DEFinition ───┤ └─comment-text─┘ └─comment-key──┘DISPLAY/PUNCH FILE Statement (for a single file)►►─┬─ DISplay ─┬─ FILe name isfile-name─────────────────────────────────────► └─ PUNch ───┘ ►─┬───────────────────────────────────┬──────────────────────────────────────► └─ Version is ─┬─version-number─┬─┘ ├─ HIGhest ────────┤ └─ LOWest ─────────┘ ►─┬───────────────────────────────────────────────────┬──────────────────────► └─ PREpared byuser-id─┬─────────────────────────┬─┘ └─ PASsword ispassword──┘ ┌────────────────────────────────────────────────────────────┐ ►─▼─┬────────────────────────────────────────────────────────┬─┴─────────────► │ ┌──────────────────────────────────┐ │ └─┬─ WITh ──────┬──▼──┬─ ALL ───────────────────────┬─┴──┘ ├─ ALSo WITh ─┤ ├─ ALL COMment TYPes ─────────┤ └─ WITHOut ───┘ ├─ ATTributes ────────────────┤ ├─ COMments ──────────────────┤ ├─ DEFinitions ───────────────┤ ├─ DETails ───────────────────┤ ├─ FILes ─────────────────────┤ ├─ HIStory ───────────────────┤ ├─ NONE ──────────────────────┤ ├─ PROgrams ──────────────────┤ ├─ RECords ───────────────────┤ ├─ RELated FILes ─────────────┤ ├─ REPorts ───────────────────┤ ├─ SAMe AS ───────────────────┤ ├─ SYNonyms ──────────────────┤ ├─ TRAnsactions ──────────────┤ ├─ USErs ─────────────────────┤ ├─┬─ USEr DEFINED COMments ─┬─┤ │ └─ UDCs ──────────────────┘ │ ├─┬─ USEr DEFINED NESts ─┬────┤ │ └─ UDNs ───────────────┘ │ └─ WHEre USED ────────────────┘ ►─┬──────────────────────────────────────────────────────────────────────────►─ └─ TO ─┬─ SYSpch ────────────────────────────────────────────────────────── └─ MODulemodule-name─┬───────────────────────────────────┬──────── └─ Version is ─┬─version-number─┬─┘ ├─ HIGhest ────────┤ └─ LOWest ─────────┘ ─►──────────────────────────────────────────────────────────────────────────┬─► ─────────────────────────────────────────────────────────────────────────┬┘ ─┬──────────────────────┬┬──────────────────────────────────────────────┬┘ └ LANguage islanguage┘└ PREpared byuser-id┬───────────────────────┬┘ └ PASsword ispassword─┘ ►─┬──────────────────────┬──┬─────────────────────┬──────────────────────────►◄ └─ VERB ─┬─ DISplay ─┬─┘ └─ AS ─┬─ SYNtax ───┬─┘ ├─ PUNch ───┤ └─ COMments ─┘ ├─ ADD ─────┤ ├─ MODify ──┤ ├─ REPlace ─┤ └─ DELete ──┘DISPLAY/PUNCH FILE Statement (for multiple files)►►─┬─ DISplay ─┬─┬─ ALL ──────────────────────────┬─ FILes ───────────────────► └─ PUNch ───┘ └─┬─ FIRst ─┬─┬─ 1 ◄ ──────────┬─┘ ├─ NEXt ──┤ └─entity-count─┘ ├─ LASt ──┤ └─ PRIor ─┘ ►─┬──────────────────────────────────────────────────┬───────────────────────► └─ PREpared byuser-id─┬────────────────────────┬─┘ └─ PASsword ispassword─┘ ►─┬─────────────────────────────────┬────────────────────────────────────────► └─ WHEreconditional-expression──┘ (for completeconditional-expressionsyntax, see WHERE clause) ►─┬──────────────────┬───────────────────────────────────────────────────────► └─ BY ─┬─ SET ◄ ─┬─┘ └─ AREa ──┘ ►─┬──────────────────────────────────────────────────────────────────────────►─ └─ TO ─┬─ SYSpch ────────────────────────────────────────────────────────── └─ MODulemodule-name─┬───────────────────────────────────┬──────── └─ Version is ─┬─version-number─┬─┘ ├─ HIGhest ────────┤ └─ LOWest ─────────┘ ─►──────────────────────────────────────────────────────────────────────────┬─► ─────────────────────────────────────────────────────────────────────────┬┘ ─┬──────────────────────┬┬──────────────────────────────────────────────┬┘ └ LANguage islanguage┘└ PREpared byuser-id┬───────────────────────┬┘ └ PASsword ispassword─┘ ►─┬──────────────────────┬──┬──────────────────────────────────────┬─────────►◄ └─ VERB ─┬─ DISplay ─┬─┘ └─ AS ─┬─ SYNtax ───┬──┬─────────────┬─┘ ├─ PUNch ───┤ └─ COMments ─┘ └─ RECursive ─┘ ├─ ADD ─────┤ ├─ MODify ──┤ ├─ REPlace ─┤ └─ DELete ──┘
Parameters
- FILe name isfile-nameIdentifies a new file to be established in the dictionary, or an existing file to be modified, replaced, deleted, displayed, or punched.File-namemust be a 1- through 32-character alphanumeric value. The file name and version must not duplicate that of an existing file or file synonym.
- NEW NAMe isnew-file-nameSpecifies a new 1- through 32-character name for the requested file. This clause changes only the name of the file occurrence; it does not alter or delete previously defined relationships in which the file participates. Subsequent references to the file occurrence must specify the new name. If the VERSION clause is not specified, the version number defaults to the version associated with the original file name. The new file name and version number must not duplicate that of an established file or file synonym.
- NEW Version isnew-version-number/NEXt HIGhest/NEXt LOWestSpecifies a new version number for the named file. The file name and new version number must not duplicate that of an existing file or file synonym.
- LABels areDesignates a label-processing specification for the named file for use by the IDMSDMLC precompiler during COBOL FD COPY functions. This clause is used only by CA Culprit.
- NULlSpecifies no labeling (the default); NULL produces no COBOL FD COPY specification.
- STAndardSpecifies standard format file labels; STANDARD produces the LABELS ARE STANDARD COBOL FD COPY specification.
- NON-standardSpecifies nonstandard format file labels; NON-STANDARD produces the LABELS ARE NON-STANDARD COBOL FD COPY specification.
- OMIttedSpecifies unlabeled files; OMITTED produces the LABELS ARE OMITTED COBOL FD COPY specification.
- maximum RECord size isrecord-size(used by CULPRIT)Defines a maximum record size for the named file for use by the IDMSDMLC precompiler during COBOL FD COPY functions.Record-sizemust be an integer in the range 0 through 32,767 and must be equivalent in bytes to the largest record in the file.
- BLOck size isblock-sizeDefines a block size for the file for use by the IDMSDMLC precompiler during COBOL FD COPY functions.Block-sizemust be an integer in the range 0 through 32,767 and must represent the number of bytes in each block in the file. This clause is used only by CA Culprit.
- RECording MODe isDefines a recording mode for the file for use by the IDMSDMLC precompiler during COBOL FD COPY functions. This clause is used by CA Culprit only.
- NULlRemoves an existing RECORDING MODE clause. NULL is the default.
- FIndicates fixed-length records.
- UIndicates undefined recording mode.
- VIndicates variable-length records.
- SIndicates variable-length spanned records.
- RECord DEScriptor isSpecifies whether a 4-byte prefix for variable-length files to be processed by CA Culprit is already defined in the record or whether CA Culprit must generate the prefix. This clause is used by CA Culprit only.
- DEFinedSpecifies that the record descriptor is to be defined in the record description in the dictionary.
- NOT DEFinedSpecifies that the record descriptor is not to be defined in the record and must be added by CA Culprit. NOT DEFINED is the default.
- RELated FILe isrelated-file-nameAssociates (INCLUDE) the named file with or disassociates (EXCLUDE) it from a previously defined file.Related-file-namemust be a 1- through 32-character alphanumeric value. If the VERSION clause is not specified, the DDDL compiler uses the default version number specified in the SET OPTIONS statement. The file name and version number must reference the primary name of an existing file.
- FILe name SYNonym isfile-synonymAssociates (INCLUDE) an alternative name with the named file or disassociates (EXCLUDE) an existing alternative name from the named file.File-synonymis the 1- through 32-character synonym name; the specified synonym can be referenced in an IDMSDMLC COBOL FD COPY function. If no version number is indicated in the FILE NAME SYNONYM clause, yet the FILE NAME clause includes a version number, the version number of the synonym name defaults to the version specified in the FILE NAME clause. The concatenation of the synonym name and version number must not duplicate that of an existing file or file synonym.All files have at least one synonym, known as the primary synonym, with the same name and version as the file itself.
- FILE-TYPE isAssociates (INCLUDE) a file-type with or disassociates it from (EXCLUDE) a file. This clause is used by CA Culprit only.
- PSSpecifies a sequential file as the file type.
- ISSpecifies ISAM as the file type.
- CARDSpecifies a card file as the file type.
- VSSpecifies VSAM as the file type; if VS is specified, VSAM-TYPE (described below) must also be specified.
- UMSpecifies the CA Culprit user module as the file type; if UM is specified, INPUT-MODULE (described below) must also be specified.
- VSAM-TYPE isAssociates (INCLUDE) a VSAM-type with or disassociates (EXCLUDE) it from a file. This clause is used by CA Culprit only.
- KSSpecifies a key-sequenced data set (KSDS) as the VSAM file type.
- ESSpecifies an entry-sequenced data set (ESDS) as the VSAM file type.
- RSSpecifies a relative-record data set (RRDS) as the VSAM file type.
- INPUT-MODULE isuser-moduleAssociates (INCLUDE) or disassociates (EXCLUDE) the name of the CA Culprit user module as it will appear on a CULPRIT INPUT parameter. This clause is used by CA Culprit only.
- DEVICE-TYPE is 2311/2314/3310/3330/3340/3350/3370/3380/3390/FBA/TAPEAssociates (INCLUDE) a device type with or disassociates (EXCLUDE) it from a file. This clause is used by CA Culprit, only in VSE/ESA environments.
- WITh/ALSo WITh/WITHOutIncludes or excludes the specified options when the named file is displayed or punched. Detailed information for each DISPLAY/PUNCH option is under SET OPTIONS Syntax. The options that are listed below present special considerations for this entity type.
- DETailsIncludes the DESCRIPTION, LABELS, RECORD SIZE, BLOCK SIZE, RECORDING MODE, and RECORD DESCRIPTOR specifications.
- FILesIncludes the SAME AS and RELATED FILES specifications.
Usage
If the REPLACE verb is specified, the DDDL compiler initializes to defaults and/or excludes the following options:
- DESCRIPTION
- RELATED FILE
- LABELS
- FILE-TYPE
- MAXIMUM RECORD SIZE
- VSAM-TYPE
- BLOCK SIZE
- INPUT-MODULE
- RECORDING MODE
- DEVICE-TYPE
- RECORD DESCRIPTOR
- Related attributes
- PUBLIC ACCESS
- COMMENTS/DEFINITION/comment-key
- USER REGISTERED FOR
- FILE SYNONYM (unless the named file synonym is related to a record)
The following relationships are not affected:
- Files to which the named file is a related file
- Programs that access the named file
Example
In the following example, the ADD statement defines the file STOCKFILE and relates it to the attribute STOCK-UPDATE within the class APPLICATION and to the file CRT-TRANFILE. The MODIFY statement adds the synonym STK3FILE to the definition.
add file stockfile block size 510 record size 30 labels standard recording mode f application is stock-update related file is crt-tranfile text 'receives application output'. modify file stockfile file name synonym stk3fil.