Previous Topic: SET OPTIONS StatementNext Topic: ACCEPT CHARACTERISTICS statement


DEFINE CHARACTERISTICS Statement

The DEFINE CHARACTERISTICS statement enables you to describe the characteristics of a file. File characteristics include block size, record length, record format, tape label format, device type, data set organization, logical unit assignment, and printer control character format. Multiple DEFINE CHARACTERISTICS statements can be coded to describe several files.

Syntax for the DEFINE CHARACTERISTICS statement is shown below:

►►── DEFINE ──┬────────────┬─┬───────────────────────┬───────────────────────►
              └─ OVErride ─┘ └─ CHAracteristics for ─┘

 ►───┬─────────────────────────────┬─ filename ──────────────────────────────►
     └─ FILE ─┬────────┬─┬──────┬──┘
              └─ NAMe ─┘ ├─ IS ─┤
                         └─ = ──┘

 ►───┬─────────────────────────────────────────────────────────────────────┬─►
     ├─ MAXimum ─┬─ BLKSZ ──────┬─┬──────┬──┬─ blocksize ─┬──────────────┬─┘
     │           ├─ BLKSIZE ────┤ ├─ IS ─┤  │             └─ CHAracters ─┘
     │           └─ BLOCK SIZE ─┘ └─ = ──┘  │
     └─ BLOCK CONTAINS ─────────────────────┘
 ►───┬───────────────────────────────────────────────────────────────────────►
     ├┬───────────┬─┬─ RECSIZE ─────────────────────┬───┬───┬──────┬─────────
     │└─ MAXimum ─┘ ├─ RECord SIZe ─────────────────┤   │   ├─ IS ─┤
     │              ├─ LRECL ───────────────────────┤   │   └─ = ──┘
     │              └─┬───────────┬─ RECord LENgth ─┘   │
     │                └─ LOGical ─┘                     │
     └─ RECORD CONTAINS ────────────────────────────────┘

 ►───────────────────────────────────────────────┬───────────────────────────►
  ──── logical-record-length ──┬──────────────┬──┘
                               └─ CHAracters ─┘

 ►───┬───────────────────────────────────────────────────────────────────────►
     ├─ RECFM ──────────┬──┬──────┬──────────────────────────────────────────
     ├─ RECord FORmat ──┤  ├─ IS ─┤
     ├─ RECording MODe ─┤  └─ = ──┘
     └─ RECFORM ────────┘
 ►──────────────────────────────────────────────────────────────┬─────────────►
  ───┬─┬─ FIXUNB ─┬──────────────────────────────────────────┬──┘
     │ └─ F ──────┘                                          │
     ├─┬─ FIXBLK ─┬──────────────────────────────────────────┤
     │ └─ FB ─────┘                                          │
     ├─── FIXed ──┬──────────┬─┬───────────────────────┬─────┤
     │            └─ LENgth ─┘ └─ and ──┬─ BLOCKED ◄ ─┬┘     │
     │                                  └─ UNBLOCKED ─┘      │
     ├─┬─ VARUNB ─┬──────────────────────────────────────────┤
     │ └─ V ──────┘                                          │
     ├─┬─ VARBLK ─┬──────────────────────────────────────────┤
     │ └─ VB ─────┘                                          │
     ├─── VARiable ──┬──────────┬─┬───────────────────────┬──┤
     │               └─ LENgth ─┘ └─ and ──┬─ BLOCKED ◄ ─┬┘  │
     │                                     └─ UNBLOCKED ─┘   │
     └─── Undefined ─────────────────────────────────────────┘
 ►───┬───────────────────────────────────────────────────────┬──────────────►
     └─┬────────┬─ LABels ─┬───────┬──┬─┬─ OMITTED ─────┬─┬──┘
       └─ TAPe ─┘          ├─ IS ──┤  │ └─ NO ──────────┘ │
                           ├─ ARE ─┤  ├─┬─ STANDARD ◄ ──┬─┤
                           └─ = ───┘  │ ├─ SL ──────────┤ │
                                      │ └─ STD ─────────┘ │
                                      ├─┬─ NONSTANDARD ─┬─┤
                                      │ ├─ NL ──────────┤ │
                                      │ └─ NSTD ────────┘ │
                                      └─┬─ USER ────────┬─┘
                                        └─ UL ──────────┘
►───┬──────────────────────────────────────────┬────────────────────────────►
    └─┬─ DEVType ─────┬─┬──────┬─┬─ Disk ────┬─┘
      ├─ DEVice TYPe ─┤ ├─ IS ─┤ ├─ Tape ────┤
      └─ Unit ────────┘ └─ = ──┘ ├─ Card ────┤
                                 ├─ PRinter ─┤
                                 └─ List ────┘
►───┬────────────────────────────────────────────────────────┬──────────────►
    └─┬─ DSorg ────────────────┬─┬──────┬───┬─ VSAM ─────────┤
      └─ DATaset ORGanization ─┘ ├─ IS ─┤   ├─ SEQUENTIAL ◄ ─┤
                                 └─ = ──┘   └─ ESDS ─────────┘
►───┬───────────────────────────────────────────────────────┬───────────────►
    └─┬─ LU ──────────────────────┬──┬──────┬─┬─ SYSLST ─┬──┘
      ├─ Logical Unit ─┬────────┬─┤  ├─ IS ─┤ ├─ SYSPCH ─┤
      │                └─ NAMe ─┘ │  └─ = ──┘ ├─ SYSIPT ─┤
      ├─ SYSno ───────────────────┤           ├─ SYSRDR ─┤
      └─ ASSIGN to ───────────────┘           └─ SYSnnn ─┘
►───┬─────────────────────────────────────────────────────────────┬─── . ───►◄
    └─┬─ CTLChar ────────────────────┬─┬───────┬──┬─┬─ YES ─────┬─┤
      └─ printer CONtrol CHAracters ─┘ ├─ IS ──┤  │ ├─ IBM ─────┤ │
                                       ├─ ARE ─┤  │ ├─ MC ──────┤ │
                                       └─ = ───┘  │ └─ Y ───────┘ │
                                                  ├─┬─ ASA ─────┬─┤
                                                  │ ├─ STD ─────┤ │
                                                  │ ├─ CC ──────┤ │
                                                  │ └─ A ───────┘ │
                                                  └─┬─ NO ◄ ────┬─┘
                                                    ├─ OMITTED ─┤
                                                    ├─ NONE ────┤
                                                    └─ N ───────┘

Note that the syntax allows you to specify characteristics in several formats, such as z/OS JCL, COBOL, and DDDL. Additionally, the syntax allows you to code abbreviated keywords.

DEFINE CHARACTERISTICS FOR FILE filename

Specifies the filename of the file being described.

OVERRIDE

Specifies that the file characteristics in the current DEFINE CHARACTERISTICS statement are to override the default characteristics of filename. OVERRIDE is valid only when the specified file is also named in a subsequent ACCEPT CHARACTERISTICS statement. The default characteristics of a file in an ACCEPT CHARACTERISTICS statement are:

Specify OVERRIDE if the DEFINE CHARACTERISTICS statement is overriding any of these characteristics.

MAXIMUM BLOCK SIZE IS blocksize CHARACTERS

Specifies the block size of the file.

Note that BLKSZ, BLKSIZE, and BLOCK SIZE are synonymous. BLOCK CONTAINS is synonymous with MAXIMUM BLOCK SIZE IS.

MAXIMUM LOGICAL RECORD LENGTH IS lrecl CHARACTERS

Specifies the logical record length of the file.

Note that RECSIZE, RECORD SIZE, LRECL, and LOGICAL RECORD LENGTH are synonymous. RECORD CONTAINS is synonymous with MAXIMUM LOGICAL RECORD LENGTH.

RECFM IS FIXUNB/FIXBLK/FIXED/VARUNB/VARBLK/VARIABLE/UNDEFINED

Specifies the record format of the file, as follows:

TAPE LABELS ARE OMITTED/STANDARD/NONSTANDARD/USER

Specifies the tape label format of the file. The default is STANDARD.

DEVTYPE IS DISK/TAPE/CARD/PRINTER/LIST

Specifies the device type of the file.

DSORG IS VSAM/SEQUENTIAL

Specifies the data set organization of the file. The default is SEQUENTIAL.

LU IS SYSLST/SYSPCH/SYSIPT/SYSRDR/SYS nnn

Specifies the logical unit assignment of the file.

CTLCHAR IS YES/ASA/NO

Specifies the printer control character format of a file assigned to a printer. The default is NO.