ibm:vm370-lib:cmshelp:filedef.helpcmd
FILEDEF
CMS Commands
- filedef.helpcmd.txt
FILEDEF CMS Transient command Use the FILEDEF command to establish data definitions for OS ddnames, to define files to be copied with the MOVEFILE command, or to override default file definitions made by the assembler and the OS language processors. The format of the FILEDEF command is: +----------+------------------------------------------------------------------+ | FIledef | ddname nn * device | | | | | | device: | | | Terminal [(optionA optionD[)]] | | | PRinter [(optionD[)]] | | | PUnch [(optionD[)]] | | | Reader [(optionD[)]] | | | DISK [FILE|fn ddname|ft [A1|fm]] [DSN ?|q1 q2 ...] | | | [(optionA optionB[)]] | | | DUMMY [(optionA[)]] | | | TAPn [(optionA optionC[)]] | | | CLEAR | | | optionA: | | | BLOCK|BLKSIZE nnnnn CHANGE|NOCHANGE LRECL nnnnn | | | PERM RECFM a | | | optionB: | | | CONCAT DISP MOD DSORG PS|PO|DA|IS | | | KEYLEN nnn LIMCT nnn MEMBER name | | | OPTCD a XTENT 50|nnnnn | | | optionC: | | | 7TRACK|9TRACK TRTCH a DEN den | | | optionD: | | | UPCASE|LOWCASE | +----------+------------------------------------------------------------------+ where: ddname | nn | * is the name by which the file is referred to in your program. OS ddname syntax rules should be followed. If a number nn is specified, it is translated to a FORTRAN data definition name of FTnnF001. An asterisk (*) may be specified with the CLEAR operand to indicate that all file definitions not entered with the PERM option should be cleared. Devices: Terminal is your terminal (terminal I/O must not be blocked). Terminal input will be truncated to the console input buffer length of 130 characters. PRinter is the spooled printer. PUnch is the spooled punch. Reader is the spooled card reader (card reader I/O must not be blocked). DISK specifies that the virtual I/O device is a disk. As shown in the format, you can choose one of two forms for specifying the DISK operand. Both forms are described in "Using the FILEDEF DISK Operand." DUMMY indicates that no real I/O takes place for a data set. TAPn is a magnetic tape. The symbolic number of the tape drive, n, can be 1, 2, 3, or 4, representing virtual units 181, 182, 183, 184 respectively. CLEAR removes any existing definition for the specified ddname. Clearing a ddname before defining it ensures that a file definition does not exist and that any options previously defined with the ddname no longer have effect. Options: Whenever an invalid option is specified for a particular device type, an error message is issued. The following table shows valid options for each device type. Option READER, PUNCH TERMINAL TAPn DISK PRINTER DUMMY (1) BLOCK, BLKSIZE X X X X CHANGE, NOCHANGE X X X X CONCAT X DEN X DISP MOD X DSORG X KEYLEN X (2) LIMCT X (2) LOWCASE, UPCASE X LRECL X X X X MEMBER X OPTCD X (2) PERM X X X X RECFM X X X X TRTCH X(3) XTENT X (2) 7TRACK, 9TRACK X (1) No options may be necessary but all disk options are accepted. (2) This option is meaningful open for BDAM files. (3) This option is for 7-track tapes only. PERM retains the current definition until it either is explicitly cleared or is changed with a new FILEDEF command with the CHANGE option. If PERM is not specified, the definition is cleared when a FILEDEF * CLEAR command is executed. CHANGE merges the file definitions whenever a file definition already exists for a ddname and a new FILEDEF command specifying the same ddname is issued; the options associated with the two definitions are merged. Options from the original definition remain in effect unless duplicated in the new definition. New options are added to the option list. NOCHANGE retains the current file definition, if one exists, for the specified ddname. With this option, the system stops further processing (error checking, scanning, etc.) of the new FILEDEF command if a file definition exists for the specified ddname. RECFM a is the record format of the file, where "a" can be one of the following: F Fixed length FB Fixed blocked V Variable length VB Variable blocked U Undefined FS,FBS Fixed length, standard blocks VS,VBS Variable length, spanned records A ASA print control characters M Machine print control codes LRECL nnnnn is the logical record length (nnnnn) of the file, in bytes. LRECL should not exceed 32760 bytes for fixed length records or 32756 for variable length records because of OS restrictions. BLOCK | BLKSIZE nnnn is the logical block size (nnnnn) of the file, in bytes. BLOCK should not exceed 32760 bytes because of OS restrictions. If both BLOCK and BLKSIZE options are specified, the value of nnnnn for BLOCK is used and BLKSIZE is ignored. KEYLEN nnn is the size (nnn) of the key (in bytes). The maximum value accepted is 256. XTENT nnnnn is the number of records (nnnnn) in the extent for the file. The default is 50. The maximum value is 16,777,215. LIMCT nnn is the maximum number of extra tracks or blocks (nnn) to be searched. The maximum value is 256. OPTCD a is the direct access search processing desired. The variable "a" may be any combination of up to three of the following: (A and R are mutually exclusive.) A Actual device addressing E Extended search F Feedback addressing R Relative block addressing Note: The KEYLEN, XTENT, LIMCT, and OPTCD options should only be used with BDAM files. DISP MOD positions the read/write pointer after the last record in the disk file. MEMBER membername allows you to specify the name of a member of an OS partitioned data set; membername is the name of the PDS member. CONCAT allows you to assign the same ddname to two or more OS libraries so that you can refer to them in a single GLOBAL command. Any file format options you specify in the first FILEDEF command line remain in effect for subsequently concatenated libraries. DSORG PS | PO | DA | IS is the data set organization: physical sequential (PS), partitioned (PO), direct access (DA), or indexed sequential (IS). 7TRACK | 9TRACK is the tape setting. TRTCH a is the tape recording technique for 7-track tapes. Use the following chart to determine the value of "a" for 7-track tapes. a Parity Converter Translator O odd off off OC odd on off OT odd off on E even off off ET even off on The default value of TRTCH is OC. DEN den is tape density: den can be 200, 556, 800, 1600, or 6250 BPI (bytes per inch). If 200 or 556 are specified, 7TRACK is assumed. If 800, 1600, or 6250 are specified, 9TRACK is assumed. UPCASE translates all terminal input data to uppercase. LOWCASE retains all terminal input data as typed in. Usage notes: 1. If you do not issue a FILEDEF command for an OS input or output file, CMS uses the ddname on the DCB macro to issue the following default file definition: FILEDEF ddname DISK FILE ddname A1 See "Usage Notes" under the discussion of the ASSEMBLE command for information on the default file definitions made by the assembler. 2. To identify DOS files for DOS program execution or to identify VSAM data sets for either OS or DOS program execution, you must use the DLBL command. 3. A file definition established with the FILEDEF command remains in effect until explicitly changed or cleared. The system clears file definitions under the following circumstances: o When the assembler or any of the language processors are invoked. (Note that FILEDEF definitions entered with the PERM option are not cleared.) o When a program abends or when you issue the Immediate command HX to halt command or program execution. 4. The FILEDEF command does not supply default values for LRECL and BLKSIZE. As under OS, if DCB information is unavailable when a file is opened, an open error is issued for the file. The following chart summarizes the results at OPEN time of specifying LRECL and BLKSIZE options. +-----------+-----------+----------------------------------------------+ | BLKSIZE | LRECL | Results | +-----------+-----------+----------------------------------------------+ | Not | Not | If the input file exists on disk, the item | | Specified | Specified | length (or item length +4 for variable | | | | length records) becomes the BLKSIZE. | +-----------+-----------+----------------------------------------------+ | Specified | Not | LRECL=BLKSIZE (or LRECL=BLKSIZE-4, Specified | | | | for variable-length records). | +-----------+-----------+----------------------------------------------+ | Not | Specified | BLKSIZE=LRECL (or BLKSIZE=LRECL+4, for | | Specified | | variable-length records). | +-----------+-----------+----------------------------------------------+ | Specified | Specified | The values specified are used. | +-----------+-----------+----------------------------------------------+ If V or VB is specified for RECFM, LRECL must be at least 4 bytes less than BLKSIZE and LRECL must be at least 4 bytes greater than the largest record of the file. If VS or VBS is specified for RECFM, LRECL can exceed the specified BLKSIZE, but LRECL should not exceed a maximum value of 32756 because of OS restrictions. DOS sequential (SAM) files do not contain BLKSIZE, LRECL, or RECFM specifications. These options must be specified by a FILEDEF command or DCB statement if OS macros are used to access DOS files. Otherwise the defaults, BLKSIZE=32760 and RECFM=U, are assumed. LRECL is not used for RECFM=U files. 5. When copying a variable length data set (RECFM=V or VB) from an OS disk to a CMS disk, the logical record length (LRECL) of the file that is created on the CMS disk is equal to the size of the largest record in the data set being copied. If the file that is being created has a filemode of 4, the logical record length will be equal to the LRECL of the largest record plus 8 bytes. The actual LRECL of the new file can be determined by using the CMS LISTFILE command. 6. There is an auliliary processing potion for FILEDEF that is only valid when FILEDEF is executed by an internal program call: this option cannot be entered as a terminal command. The option, AUXPROC addr, allows an auxiliary processing routine to receive control during I/O operations. 7. If a FILEDEF command is issued with a DDNAME that matches a current DDNAME defined by a previous FILEDEF command and the devices are the same, the filename, filetype, filemode, and options previously specified remain in effect, unless re-specified by the new FILEDEF command. If the devices are not the same, all previous specifications are removed. 8. CMS supports one virtual reader at address 00C, one virtual punch at address 00D, and one virtual printer at address 00E. When you issue a CMS command or execute a program that uses one of these unit record devices, the device must be attached at the virtual address indicated. 9. If the FILEDEF command is entered with no operands, a list of current definitions is displayed. Using the FILEDEF DISK Operand There are two general forms for specifying the DISK operand in a FILEDEF command. If you specify the first form: FILEDEF ddname DISK fn ft [fm] fn and ft (filename and filetype) are assumed to be a CMS fileid. If fm is the filemode of an OS disk, fn and ft are assumed to be the only two qualifiers of an OS data set name. If fm is specified as an asterisk, (*) then all accessed disks are searched. You cannot use this form unless the OS data set name or DOS file-id conforms to the OS naming convention (1- to 8-byte qualifiers separated by periods, to a maximum of 44 characters, including periods). Also, the data set name can have only two qualifiers; otherwise, you must use the DSN ? or DSN qual1... form. For example, if the OS data set name or DOS file-id is TEST.SAMPLE.MAY, you enter: FILEDEF MINE B1 DSN TEST SAMPLE MAY -- or -- FILEDEF MINE B1 DSN ? TEST.SAMPLE.MAY If the OS data set name or DOS file-id is TEST.SAMPLE, then you may enter: FILEDEF MINE DISK TEST SAMPLE B1 The second form of the DISK operand is used only with OS data sets and DOS files: FILEDEF ddname DISK [FILE fn ddname ft [A1 fm]] [DSN ? q1 q2 ... ] This form allows you to enter OS and DOS file identifications that do not conform to OS data set naming conventions. The DSN operand corresponds to the DSN parameter on the OS DD (data definition) statement. There are three ways you can specify this form: 1. FILEDEF ddname DISK fn ft fm DSN qual1 [qual2...] The above forms of the FILEDEF command associate the CMS filename and filetype you specify with the OS data set name or DOS file-id specified following the DSN operand. Once it is defined, you can refer to the OS data set name or DOS file-id by using the CMS filename and filetype. If you omit DISK, filename, filetype, and filemode, the default values are FILE ddname A1. 2. FILEDEF ddname DSN ? This form of the FILEDEF command allows you to specify the OS data set name or DOS file-id interactively. Using this form, you can enter an OS data set name or DOS file-id containing embedded special characters such as blanks. If you use this form, the default filename and filetype for your file, FILE ddname, is the CMS filename and filetype associated with the OS data set name or DOS file-id. The filemode for this form is always the default, A1. To use the interactive DSN operand, you key in DSN ?; CMS then requests that you enter the OS data set name or DOS file-id exactly as it appears in the data set or file. Do not omit the periods that separate the qualifiers of an OS data set name, but do not insert periods where they do not appear. qual1[.qual2...] where qual1.qual2... are the qualifiers of the OS data set name or DOS file-id. When you use this form, you must code the periods separating the qualifiers. 3. FILEDEF ddname mode DSN qual1 [qual2...] This form allows you to specify the OS data set name or DOS file-id explicitly. The default value for the filename and filetype is FILE ddname. When you use this form, you can use periods to separate the qualifiers. If the command is entered with a blank separating the qualifiers, FILEDEF replaces them with periods. For example, for an OS data set or DOS file named MY.FILE.IN, you enter: FILEDEF ddname B1 DSN MY FILE IN All of these forms have many variations, as is apparent from the command format. Responses: If FILEDEF is entered with no operands and there are filedefs in effect, a list of current definitions is displayed. For example: ddname1 device1 (filename1 filetype1 filemode1 (datasetname)) . . . . . . . . . . . . . . . . . . ddnameN deviceN (filenameN filetypeN filemodeN (datasetname)) DMSFLD069I DISK 'mode' NOT ACCESSED The specified disk is not accessed; the file definition remains in effect. You should access the disk before you attempt to read or write the file. DMSFLD220R ENTER DATA SET NAME: A FILEDEF command with the DSN ? operand was entered. Enter the exact OS or DOS file identification, including embedded periods and blanks. DMSFLD704I INVALID CLEAR REQUEST A CLEAR request was entered for a file definition that does not exist; no action is taken. DMSSTT228I USER LABELS BYPASSED ON DATA SET 'data set name' This message is displayed when you issue a FILEDEF command for an OS data set that contains user labels. The message is displayed the first time you issue the FILEDEF command after accessing the disk on which the data set resides.
ibm/vm370-lib/cmshelp/filedef.helpcmd.txt ยท Last modified: 2023/08/06 13:36 by Site Administrator