Previous Topic: ENTRY POINTNext Topic: FILE SYNONYM


FILE

FILE statements document card, tape, and other nondatabase 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 chapter for further details. Files are related to programs through the PROGRAM statement FILE clause; see PROGRAM later in this chapter 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:

If the SET OPTIONS statement specifies SECURITY FOR IDD IS ON, the user must be assigned the proper authority to issue FILE statements.

Syntax

FILE Statement

►►─┬─ ADD ─────┬─ FILe name is file-name ─────────────────────────────────────►
   ├─ MODify ──┤
   ├─ REPlace ─┤
   └─ DELete ──┘

 ►─┬───────────────────────────────────────┬──────────────────────────────────►
   └─ Version is ─┬─ version-number ─────┬─┘
                  └─ NEXt ─┬─ HIGhest ─┬─┘
                           └─ LOWest ──┘

 ►─┬────────────────────────────────────────────────────────┬─────────────────►
   └┬─ PREpared ─┬─ by user-id ──┬────────────────────────┬─┘
    └─ REVised ──┘               └─ PASsword is password ─┘
   ┌───────────────────────────────────────────────────────────────────────┐
 ►─▼─┬───────────────────────────────────────────────────────────────────┬─┴──►
     └─ SAMe AS FILe file-name ──┬─────────────────────────────────────┬─┘
                                 └─ Version is ─┬─ version-number ──┬──┘
                                                ├─ HIGhest ─────────┤
                                                └─ LOWest ──────────┘

   ┌──────────────────────────────────────────────────────────────────────────
 ►─▼─┬────────────────────────────────────────────────────────────────────────►─
     └─ COPy ─┬─ ALL COMments TYPes ─┬─ FROm file file-name ──────────────────
              ├─ COMments ───────────┤
              ├─ DEFinition ─────────┤
              ├─ ATTributes ─────────┤
              ├─ USErs ──────────────┤
              ├─ FILes ──────────────┤
              ├─ RELated FILes ──────┤
              ├─ comment-key ────────┤
              └─ relational-key ─────┘
  ─────────────────────────────────────────────┐
─►───────────────────────────────────────────┬─┴──────────────────────────────►
  ─┬───────────────────────────────────────┬─┘
   └─ Version is ─┬─ version-number ─────┬─┘
                  ├─ HIGhest ────────────┤
                  └─ LOWest ─────────────┘

 ►─┬────────────────────────────────────────────────────────────────────────┬─►
   └─ NEW NAMe is new-file-name ─┬────────────────────────────────────────┬─┘
                                 └─  Version is ─┬─ version-number ─────┬─┘
                                                 └─ NEXt ─┬─ HIGhest ─┬─┘
                                                          └─ LOWest ──┘

 ►─┬───────────────────────────────────────────┬──────────────────────────────►
   └─ NEW Version is ─┬─ new-version-number ─┬─┘
                      └─ NEXt ─┬─ HIGhest ─┬─┘
                               └─ LOWest ──┘
 ►─┬─────────────────────────────────────────┬────────────────────────────────►
   └─ file DEScription is description-text ──┘

 ►─┬─────────────────────────────────┬────────────────────────────────────────►
   └─ LABels are ─┬─ NULL ◄ ───────┬─┘
                  ├─ STAndard ─────┤
                  ├─ NON-standard ─┤
                  └─ OMItted ──────┘

 ►─┬───────────────────────────────────────┬──────────────────────────────────►
   └─ maximum RECord size is record-size ──┘
 ►─┬─────────────────────────────┬────────────────────────────────────────────►
   └─ BLOck size is block-size ──┘

 ►─┬──────────────────────────────────┬───────────────────────────────────────►
   └─ RECording MODe is ─┬─ NULl ◄ ─┬─┘
                         ├─ F ──────┤
                         ├─ U ──────┤
                         ├─ V ──────┤
                         └─ S ──────┘

 ►─┬────────────────────────────────────────────┬─────────────────────────────►
   └─ RECord DEScriptor is ─┬─ DEFined ───────┬─┘
                            └─ NOT DEFined ◄ ─┘
   ┌─────────────────────────────────────────────────────────────────┐
 ►─▼─┬─────────────────────────────────────────────────────────────┬─┴────────►
     └─┬─ INClude ◄ ─┬─ USEr is user-id ──┬──────────────────────┬─┘
       └─ EXClude ───┘                    └─ user-specification ─┘

(for complete user-specification syntax, see USER clause)

 ►─┬──────────────────────────────────────────────────────┬───────────────────►
   └─ PUBlic access is ─┬───────────┬─ for ─┬─ ALL ◄ ───┬─┘
                        └─ ALLOwed ─┘       ├─ NONe ────┤
                                            ├─ UPDate ──┤
                                            ├─ MODify ──┤
                                            ├─ REPlace ─┤
                                            ├─ DELete ──┤
                                            └─ DISplay ─┘
   ┌──────────────────────────────────────────────────────────────────────────
 ►─▼─┬────────────────────────────────────────────────────────────────────────►─
     └─┬─ INClude ◄ ─┬─ RELated FILe is related-file-name ────────────────────
       └─ EXClude ───┘

  ─────────────────────────────────────────────────────────────────────┐
─►──────────────────────────────────────────────────────────────────┬──┴──────►
  ──┬────────────────────────────────────┬─┬──────────────────────┬─┘
    └─ Version is ─┬─ version-number ─┬──┘ └─ TEXt is user-text ──┘
                   ├─ HIGhest ────────┤
                   └─ LOWest ─────────┘

   ┌──────────────────────────────────────────────────────────────────────────
 ►─▼─┬────────────────────────────────────────────────────────────────────────►─
     └─┬─ INClude ◄ ─┬─ FILe name SYNonym is file-synonym-name ───────────────
       └─ EXClude ───┘
  ─────────────────────────────────────────────────┐
─►───────────────────────────────────────────────┬─┴──────────────────────────►
  ─┬───────────────────────────────────────────┬─┘
   └─ Version is ─┬─ version-number ─────────┬─┘
                  └─┬────────┬─┬─ HIGhest ─┬─┘
                    └─ NEXt ─┘ └─ LOWest ──┘

 ►─┬─────────────────────────────────────────────────────────────────────┬────►
   └─┬─ INClude ◄ ─┬─ FILE-TYPE is ─┬─ PS ───┬──┬──────────────────────┬─┘
     └─ EXClude ───┘                ├─ IS ───┤  └─ TEXt is user-text ──┘
                                    ├─ CARD ─┤
                                    ├─ VS ───┤
                                    └─ UM ───┘
 ►─┬─────────────────────────────────────────────────────────────────────┬────►
   └─┬─ INClude ◄ ─┬─ VSAM-TYPE is ─┬─ KS ───┬──┬──────────────────────┬─┘
     └─ EXClude ───┘                ├─ ES ───┤  └─ TEXt is user-text ──┘
                                    └─ RS ───┘

 ►─┬────────────────────────────────────────────────────────────────────────┬─►
   └─┬─ INClude ◄ ─┬─ INPUT-MODULE is user-module ─┬──────────────────────┬─┘
     └─ EXClude ───┘                               └─ TEXt is user-text ──┘

 ►─┬────────────────────────────────────────────────────────────────────────┬─►
   └─┬─ INClude ◄ ─┬─ DEVICE-TYPE is ─┬─ 2311 ─┬──┬──────────────────────┬──┘
     └─ EXClude ───┘                  ├─ 2314 ─┤  └─ TEXt is user-text ──┘
                                      ├─ 3310 ─┤
                                      ├─ 3330 ─┤
                                      ├─ 3340 ─┤
                                      ├─ 3350 ─┤
                                      ├─ 3370 ─┤
                                      ├─ 3380 ─┤
                                      ├─ 3390 ─┤
                                      ├─ FBA ──┤
                                      └─ TAPE ─┘
   ┌────────────────────────────────────────────────────────────────────────┐
 ►─▼┬──────────────────────────────────────────────────────────────────────┬┴─►
    └┬─ INClude ◄ ─┬─ class-name is attribute-name ─┬─────────────────────┬┘
     └─ EXClude ───┘                                └─ TEXt is user-text ─┘

   ┌──────────────────────────────────────────────────────────────────────────
 ►─▼─┬────────────────────────────────────────────────────────────────────────►─
     └─┬─ INClude ◄ ─┬─ relational-key is file-name ──────────────────────────
       └─ EXClude ───┘

  ────────────────────────────────────────────────────────────────────┐
─►──────────────────────────────────────────────────────────────────┬─┴───────►
  ─┬────────────────────────────────────┬──┬──────────────────────┬─┘
   └─ Version is ─┬─ version-number ─┬──┘  └─ TEXt is user-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 is file-name ─────────────────────────────────────►
   └─ PUNch ───┘

 ►─┬───────────────────────────────────┬──────────────────────────────────────►
   └─ Version is ─┬─ version-number ─┬─┘
                  ├─ HIGhest ────────┤
                  └─ LOWest ─────────┘

 ►─┬───────────────────────────────────────────────────┬──────────────────────►
   └─ PREpared by user-id ─┬─────────────────────────┬─┘
                           └─ PASsword is password ──┘
   ┌────────────────────────────────────────────────────────────┐
 ►─▼─┬────────────────────────────────────────────────────────┬─┴─────────────►
     │                  ┌──────────────────────────────────┐  │
     └─┬─ 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 ──────────────────────────────────────────────────────────
          └─ MODule module-name ─┬───────────────────────────────────┬────────
                                 └─ Version is ─┬─ version-number ─┬─┘
                                                ├─ HIGhest ────────┤
                                                └─ LOWest ─────────┘

─►──────────────────────────────────────────────────────────────────────────┬─►
  ─────────────────────────────────────────────────────────────────────────┬┘
  ─┬──────────────────────┬┬──────────────────────────────────────────────┬┘
   └ LANguage is language ┘└ PREpared by user-id ┬───────────────────────┬┘
                                                 └ PASsword is password ─┘

►─┬──────────────────────┬──┬─────────────────────┬──────────────────────────►◄
  └─ 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 by user-id ─┬────────────────────────┬─┘
                           └─ PASsword is password ─┘

 ►─┬─────────────────────────────────┬────────────────────────────────────────►
   └─ WHEre conditional-expression ──┘

(for complete conditional-expression syntax, see WHERE clause)
 ►─┬──────────────────┬───────────────────────────────────────────────────────►
   └─ BY ─┬─ SET ◄ ─┬─┘
          └─ AREa ──┘

 ►─┬──────────────────────────────────────────────────────────────────────────►─
   └─ TO ─┬─ SYSpch ──────────────────────────────────────────────────────────
          └─ MODule module-name ─┬───────────────────────────────────┬────────
                                 └─ Version is ─┬─ version-number ─┬─┘
                                                ├─ HIGhest ────────┤
                                                └─ LOWest ─────────┘
─►──────────────────────────────────────────────────────────────────────────┬─►
  ─────────────────────────────────────────────────────────────────────────┬┘
  ─┬──────────────────────┬┬──────────────────────────────────────────────┬┘
   └ LANguage is language ┘└ PREpared by user-id ┬───────────────────────┬┘
                                                 └ PASsword is password ─┘

 ►─┬──────────────────────┬──┬──────────────────────────────────────┬─────────►◄
   └─ VERB ─┬─ DISplay ─┬─┘  └─ AS ─┬─ SYNtax ───┬──┬─────────────┬─┘
            ├─ PUNch ───┤           └─ COMments ─┘  └─ RECursive ─┘
            ├─ ADD ─────┤
            ├─ MODify ──┤
            ├─ REPlace ─┤
            └─ DELete ──┘

Parameters

FILe name is file-name

Identifies a new file to be established in the dictionary, or an existing file to be modified, replaced, deleted, displayed, or punched. File-name must 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 is new-file-name

Specifies 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 is new-version-number/NEXt HIGhest/NEXt LOWest

Specifies 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 are

Designates 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.

NULl

Specifies no labeling (the default); NULL produces no COBOL FD COPY specification.

STAndard

Specifies standard format file labels; STANDARD produces the LABELS ARE STANDARD COBOL FD COPY specification.

NON-standard

Specifies nonstandard format file labels; NON-STANDARD produces the LABELS ARE NON-STANDARD COBOL FD COPY specification.

OMItted

Specifies unlabeled files; OMITTED produces the LABELS ARE OMITTED COBOL FD COPY specification.

maximum RECord size is record-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-size must 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 is block-size

Defines a block size for the file for use by the IDMSDMLC precompiler during COBOL FD COPY functions. Block-size must 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 is

Defines 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.

NULl

Removes an existing RECORDING MODE clause. NULL is the default.

F

Indicates fixed-length records.

U

Indicates undefined recording mode.

V

Indicates variable-length records.

S

Indicates variable-length spanned records.

RECord DEScriptor is

Specifies 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.

DEFined

Specifies that the record descriptor is to be defined in the record description in the dictionary.

NOT DEFined

Specifies 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 is related-file-name

Associates (INCLUDE) the named file with or disassociates (EXCLUDE) it from a previously defined file. Related-file-name must 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 is file-synonym

Associates (INCLUDE) an alternative name with the named file or disassociates (EXCLUDE) an existing alternative name from the named file. File-synonym is 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 is

Associates (INCLUDE) a file-type with or disassociates it from (EXCLUDE) a file. This clause is used by CA Culprit only.

PS

Specifies a sequential file as the file type.

IS

Specifies ISAM as the file type.

CARD

Specifies a card file as the file type.

VS

Specifies VSAM as the file type; if VS is specified, VSAM-TYPE (described below) must also be specified.

UM

Specifies the CA Culprit user module as the file type; if UM is specified, INPUT-MODULE (described below) must also be specified.

VSAM-TYPE is

Associates (INCLUDE) a VSAM-type with or disassociates (EXCLUDE) it from a file. This clause is used by CA Culprit only.

KS

Specifies a key-sequenced data set (KSDS) as the VSAM file type.

ES

Specifies an entry-sequenced data set (ESDS) as the VSAM file type.

RS

Specifies a relative-record data set (RRDS) as the VSAM file type.

INPUT-MODULE is user-module

Associates (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/TAPE

Associates (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/WITHOut

Includes 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.

DETails

Includes the DESCRIPTION, LABELS, RECORD SIZE, BLOCK SIZE, RECORDING MODE, and RECORD DESCRIPTOR specifications.

FILes

Includes the SAME AS and RELATED FILES specifications.

Usage

If you specify REPLACE

If the REPLACE verb is specified, the DDDL compiler initializes to defaults and/or excludes the following options:

The following relationships are not affected:

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.