CREATE command: File: Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
(Clarified use of NOFORMAT)
Line 82: Line 82:
<var>CREATE FILE</var> creates a <var class="product">Model&nbsp;204</var> file. It sets the file parameters and builds the File Control Table (FCT). It should be issued after the values for file parameters are calculated and data sets are allocated. After a file is created, it must be opened and initialized (see the [[OPEN FILE command]] and the [[INITIALIZE command]]).      </p>
<var>CREATE FILE</var> creates a <var class="product">Model&nbsp;204</var> file. It sets the file parameters and builds the File Control Table (FCT). It should be issued after the values for file parameters are calculated and data sets are allocated. After a file is created, it must be opened and initialized (see the [[OPEN FILE command]] and the [[INITIALIZE command]]).      </p>
<p>
<p>
The default <var>FORMAT</var> option causes the <var>CREATE</var> command to physically format the disk space. <var>NOFORMAT</var> suppresses physical formatting of the disk. If one or more of the data sets in the file are new, use <var>FORMAT</var>.</p>
The default <var>FORMAT</var> option causes the <var>CREATE</var> command to physically format the disk space. <var>NOFORMAT</var> suppresses physical formatting of the disk and can result in a significant reduction in elapsed time for the CREATE process, especially in large files. However, if one or more of the data sets in the file are new, you must use <var>FORMAT</var>.</p>
<p>
<p>
If <var>NOFORMAT</var> is used and the disk space is unformatted, Model 204 will force formatting anyway and issue the following message. </p>
If <var>NOFORMAT</var> is used and the disk space of the first or only data set is unformatted, Model 204 will force formatting anyway and issue the following message. </p>
<p>
<p>
M204.0793: I/O ERROR FORCED FORMATTING  
M204.0793: I/O ERROR FORCED FORMATTING  
</p>
</p>
<p>  
<p>  
In the case of a multi-dataset file, Model 204 might not be able to detect that one of the datasets is unformattedIn this case, the initialize will fail with the message:</p>
In the case of a multi-data set file, Model 204 only checks formatting of the first data setIf the first data set has been formatted, but subsequent data sets have not, then the CREATE will fail when using the NOFORMAT option and the following message will be issued:</p>
<p>
<p>
M204.2369: DKUPDT DISK WRITE FAILURE: </p>
M204.2369: DKUPDT DISK WRITE FAILURE: </p>

Revision as of 18:09, 25 April 2018

Summary

Privileges
Superuser
Function
Creates a Model 204 file

Syntax

CREATE [FILE] [(FORMAT) | (NOFORMAT)] filename [FROM ddname [,ddname]...] [PARAMETER parameter=value [,parameter=value]...] [PARAMETER parameter=value [,parameter=value]...] . . . END

Where:

filename The name of the Model 204 file that is being created (1 to 8 characters; 1 to 7 on DOS systems).

The file name cannot be FILE or GROUP and cannot start with CCA, SYS, OUT, TAPE, or a number. The only exception is CCASYS: it can be created in a single user run with the SYSOPT X’01’ bit turned off to prevent Model 204 from opening CCASYS to make it available for APSY.

Otherwise, filename can contain only uppercase letters, numbers, and the following special characters:

Special character name Keyboard symbol
At sign (@)
Pound sign (#)
Dollar sign ($)
(alternately displayed as £)

The file name must be the ddname of the first or only data set in the file.

ddname The name of a data set from which to create the file; it is required when the file is being created from more than one data set. The first ddname specified must match filename.

ddname cannot be longer than eight characters; if it is, the command is rejected and the following message is issued:

M204.1903: %C EXCEEDS 8 CHARACTERS IN LENGTH

To allow a name of more than eight characters (although only the first eight characters will be used), set the CUSTOM parameter to 10.

parameter=value Model 204 file parameters. Any number of PARAMETER statements can immediately follow the command, and each statement can contain as many parameters in any order as will fit on one input line. File parameters are optional. If you specify no values for the BSIZE, CSIZE, and DSIZE parameters, defaults are used. However, you can calculate and set values for parameters as described in Managing file and table sizes.

Syntax notes

  • The FROM clause is optional for files containing a single data set.
  • If specified, the ddname of the first data set must match filename. You can use a continuation character to enter long data set lists in the FROM statement.
  • NO FORMAT is a synonym for NOFORMAT.
  • A CREATE command must be concluded by an END statement.

Example

CREATE FILE PEOPLE PARAMETER ATRPG=1, FVFPG=10, MVFPG=10 PARAMETER ASTRPPG=345 PARAMETER BSIZE=704, BRECPPG=23, BRESERVE=268 PARAMETER CSIZE=78, DSIZE=470 END

Usage notes

CREATE FILE creates a Model 204 file. It sets the file parameters and builds the File Control Table (FCT). It should be issued after the values for file parameters are calculated and data sets are allocated. After a file is created, it must be opened and initialized (see the OPEN FILE command and the INITIALIZE command).

The default FORMAT option causes the CREATE command to physically format the disk space. NOFORMAT suppresses physical formatting of the disk and can result in a significant reduction in elapsed time for the CREATE process, especially in large files. However, if one or more of the data sets in the file are new, you must use FORMAT.

If NOFORMAT is used and the disk space of the first or only data set is unformatted, Model 204 will force formatting anyway and issue the following message.

M204.0793: I/O ERROR FORCED FORMATTING

In the case of a multi-data set file, Model 204 only checks formatting of the first data set. If the first data set has been formatted, but subsequent data sets have not, then the CREATE will fail when using the NOFORMAT option and the following message will be issued:

M204.2369: DKUPDT DISK WRITE FAILURE:

CREATE establishes the file name and ddnames for all data sets in the file. Once a file is created, you can change the file name and ddname only by recreating the file or by running the RESTORE command. However, you can add new data sets to the file with the INCREASE command.

When it processes CREATE FILE, Model 204 ends any update unit in progress and begins a non-backoutable update unit.

See Creating a file for more information about file creation and file parameters.