Creating a file with FILEMGMT: Difference between revisions

From m204wiki
Jump to navigation Jump to search
 
(43 intermediate revisions by 6 users not shown)
Line 1: Line 1:
==Overview of creating files==
==Overview of creating files==
<p>Prerequisites:</p>
<blockquote class="note">
<p>You must have Dictionary/204 and its subsystems running in order to use FILEMGMT.</p>
<p><b>Prerequisites:</b> </p>
<p>Before working your way through the File Management Subsystem facility (FILEMGMT) interface to create a file, you should have made decisions about the organization, recovery options, and security for the file you are creating. See the chapters on Planning and File Design for more information.</p>
<ul>
<p>Adding a file to the database includes the following steps:</p>
<li>You must have Dictionary/204 and its subsystems running in order to use FILEMGMT.</li>
 
<li>Before working your way through the File Management Subsystem facility (FILEMGMT) interface to create a file, you should have made decisions about the organization, recovery options, and security for the file you are creating. See [[File design]] for more information.</li>
</ul>
</blockquote>
<p>
Adding a file to the database includes the following steps:</p>
<ol>
<ol>
<li>Defining the file organization and recovery options (File Definition - Organization screen).</li>
<li>[[#Defining_file_organization|Defining the file organization]] and recovery options (File Definition - Organization screen).</li>
<li>Defining the file security (File Definition - Security screen).</li>
 
<li>For procedure files, defining the parameters for the procedures contained in the file (File Definition - Procedure screen).</li>
<li>[[Defining file security with FILEMGMT|Defining the file security]] (File Definition - Security screen).</li>
 
<li>For procedure files, [[Defining file procedures with FILEMGMT|defining the parameters for the procedures]] contained in the file (File Definition - Procedure screen).</li>
 
<li>For data files, defining fields, records, and field groups in the following order:
<li>For data files, defining fields, records, and field groups in the following order:
<ol style="list-style-type:lower-alpha">
<ol style="list-style-type:lower-alpha">
<li>Defining the fields in the file. (Field Name List screen; Field Attributes screen)</li>
<li>[[Defining fields with FILEMGMT|Defining the fields]] in the file. (Field Name List screen; Field Attributes screen)</li>
<li>Defining the records in the file. (Record Name LIst screen; Record Definitions screen)</li>
 
<li>Defining the field groups in the file. (Optional. Field Group List screen; Field Group Definition screen.</li>
<li>[[Defining records with FILEMGMT|Defining the records]] in the file. (Record Name LIst screen; Record Definitions screen)</li>
</ol>
 
<p>See "Field group maintenance" in the Rocket <var class="product">Model&nbsp;204</var> Dictionary/204 and Data Administration Guide for details.</p>
<li>Defining the field groups in the file. (Optional. Field Group List screen; Field Group Definition screen.
</li>
<p>
<li>Sizing the file and its tables. (File Size Definition screen)</li>
See "Field group maintenance" in the <var class="book">Rocket Model 204 Dictionary/204 and Data Administration Guide</var> for details.</p>
</li></ol>
 
<li>[[Managing file and table size with FILEMGMT|Sizing the file and its tables]]. (File Size Definition screen)</li>
 
<li>Modifying the file's field, record, and field group definitions and the size specifications, as needed.</li>
<li>Modifying the file's field, record, and field group definitions and the size specifications, as needed.</li>
<li>Executing the CREATE command (Execute Commands screen).</li>
 
<li>Executing the <var>CREATE</var> command ([[Executing and deleting commands with FILEMGMT#Execute Commands screen|Execute Commands screen]]).</li>
</ol>
</ol>


==Defining file organization==
==Defining file organization==
<ol>
<ol>
<li>Log on to FILEMGMT as described in [[ FILEMGMT Overview#Logging on to FILEMGMT|Logging on to FILEMGMT]].</li>
<li>Log on to FILEMGMT as described in [[Logging on to FILEMGMT]].</li>
<li>Select the FILE Maintenance CREATE function (number 1) from the primary screen.
<li>Select the FILE Maintenance CREATE function (number 1) from the primary screen.
<p>FILEMGMT displays the first of the three File Definition screens, the Organization Screen:</p>
<p>
FILEMGMT displays the first of the three File Definition screens, the Organization screen:</p>
</li>
</li>
</ol>
</ol>
====File Definition - Organization screen====
<p class="caption" style="margin-right:24em">File Definition - Organization screen</p>
<table>
<table>
<tr>
<tr>
<td>
<td>
<p class="code">
<p class="code">FILEMGMT                File Definition - Organization      PAGE 1 OF 3
FILEMGMT                File Definition - Organization      PAGE 1 OF 3
 
Filename: VEHICLES FICREATE: 7.5 LANGUAGE: US      Active/Inactive I


Filename: VEHICLES FICREATE: 7.1 LANGUAGE:          Active/Inactive I
FILE ORGANIZATION  Opt Fld Ext: N  RFG: N  LG FILES: N   FILEORG  X' 0E '
FILE ORGANIZATION    Optimized Field Extract: N       FILEORG  X' 0E '
   Entry:__  Sorted:_  Hash:X  Unordered:_    Reuse Record Numbers:_
   Entry:__  Sorted:_  Hash:X  Unordered:_    Reuse Record Numbers:_
   Sort/Hash Key:              Req Evry Rec:X  Enable Skewing:_
   Sort/Hash Key:              Req Evry Rec: X  Enable Skewing: _
Table B Auto Increase Pages: 0
Table B Auto Incr Pages: 0
Table D Auto Increase Pages: 0
Table D Auto Incr Pages: 0
Table X Auto Increase Pages:
Table X Auto Incr Pages: 0
File Models:    None X 1nf _  Numeric Validation_    FILEMODL X' 00 '
 
File Models:    None X   1nf _  Numeric Validation_    FILEMODL X' 00 '
 
FILE OPTIONS                                          FOPT    X' 00 '
FILE OPTIONS                                          FOPT    X' 00 '
   Disable Lock Pending Updates:  _  Only FM Defines New Fields:  _
   Disable Lock Pending Updates:  _  Only FM Defines New Fields:  _
   No Procedure Statement Numbers: _  No Procedure Statement Labels:_
   No Procedure Statement Numbers: _  No Procedure Statement Labels:_
   Enable Date Time Stamp:        N
   Enable Date Time Stamp:        N
FILE RECOVERY OPTIONS                                FRCVOPT  X' 00 '
FILE RECOVERY OPTIONS                                FRCVOPT  X' 00 '
   Disable Transaction Back out:   _  No Rollforward (RF):          _
   Disable Transaction Backout:   _  No Rollforward (RF):          _
   No RF Logging:                  _  No Checkpoint (CK) Logging:  _
   No RF Logging:                  _  No Checkpoint (CK) Logging:  _
   No Updates Without RF Logging:  _  No Updates Without CK Logging:_
   No Updates Without RF Logging:  _  No Updates Without CK Logging:_
   All Updates Applied During RF:  _  No Discontinuities Allowed:  _
   All Updates Applied During RF:  _  No Discontinuities Allowed:  _
   Format File During CREATE:      Y  Verify Disk Updates:          N
   Format File During CREATE:      Y  Verify Disk Updates:          N
<b></b>===>
<b></b>===>
1=HELp  2=        3=QUIt    4=FIElds    5=WIDen    6=COMmands
1=HELp  2=        3=QUIt    4=FIElds    5=WIDen    6=COMmands
7=      8=FORward  9=SIZe  10=        11=        12=END
7=      8=FORward  9=SIZe  10=        11=        12=END
Line 59: Line 80:
</tr>
</tr>
</table>
</table>
<p>You use the File Definition - Organization screen to name a new file and to specify file organization parameters. When this screen is displayed for a file for the first time, the standard <var class="product">Model&nbsp;204</var> default values for the parameters are used.</p>
<p>
<p><var class="product">Model&nbsp;204</var> default values are supplied for any parameters for which you do not fill in values.</p>
You use the File Definition - Organization screen to name a new file and to specify file organization parameters. When this screen is displayed for a file for the first time, the standard <var class="product">Model&nbsp;204</var> default values for the parameters are used.</p>
<p>You select options from the choices on the screen, and FILEMGMT uses your selections to compute appropriate values for the <var class="product">Model&nbsp;204</var> FILEMODL, FILEORG, FOPT, and FRCVOPT parameters.</p>
<p>
<var class="product">Model&nbsp;204</var> default values are supplied for any parameters for which you do not fill in values.</p>
<p>
You select options from the choices on the screen, and FILEMGMT uses your selections to compute appropriate values for the <var class="product">Model&nbsp;204</var> <var>FILEMODL</var>, <var>FILEORG</var>, <var>FOPT</var>, and <var>FRCVOPT</var> parameters.</p>
<ol>
<ol>
<li>In the Filename input field, enter the name of the file that you are creating.
<li>In the <b>Filename</b> input field, enter the name of the file that you are creating.
<p>The name can be up to 8 characters long. The filename cannot be FILE or GROUP and cannot start with CCA, SYS, OUT, TAPE, or a number. It must start with a letter, and can contain only letters, numbers, and the following special characters:</p>
<p>
<p>At sign (@)</p>
The name can be as many as eight characters long (7 for DOS systems). The file name cannot be <code>FILE</code> or <code>GROUP</code> and cannot start with <code>CCA</code> (except for [[System requirements for Application Subsystems#Creating CCASYS|CCASYS]]), <code>SYS</code>, <code>OUT</code>, <code>TAPE</code>, or a number. It can contain only uppercase letters, numbers, and the following special characters:</p>
<p>Pound sign (#)</p>
<ul>
<p>Dollar sign ($)</p>
<li>At sign (<tt>@</tt>)</li>
</li>
<li>Pound sign (<tt>#</tt>)</li>
<li>The FICREATE input field displays the <var class="product">Model&nbsp;204</var> version number for the file that you are creating. FILEMGMT uses FICREATE to calculate the file size and validate certain <var class="product">Model&nbsp;204</var> file features. Enter a different version number if needed.</li>
<li>Dollar sign (<tt>$</tt>) (alternately displayed as &#163;)</li>
<li>The LANGUAGE input field displays the language of the file that you are creating (set by the LANGFILE parameter). The default is U.S. English. Enter a different language if needed. </li>
</ul>
<li>Change the Active/Inactive default value as needed.
 
<p>The Active/Inactive input field specifies how the commands in your file will be processed when you execute commands from the Execute Commands screen.</p>
<li>The <b>FICREATE</b> input field displays the <var class="product">Model&nbsp;204</var> version number for the file that you are creating. FILEMGMT uses <b>FICREATE</b> to calculate the file size and validate certain <var class="product">Model&nbsp;204</var> file features. Enter a different version number if needed.</li>
<p>Active or inactive indicates the mode you selected on the Organization screen or last used to execute commands against the file. The file itself is referred to as active or inactive, depending on the mode in which commands for the file were last executed.</p>
 
<p>If you have permissions to change the value, and your system supports the alternative option you choose, your entry will override the system default set by the system administrator.</p>
<li>The <b>LANGUAGE</b> input field displays the language of the file that you are creating (set by the <var>LANGFILE</var> parameter). The default is U.S. English. Enter a different language if needed. </li>
 
<li>Change the <b>Active/Inactive</b> default value as needed.
<p>
The <b>Active/Inactive</b> input field specifies how the commands in your file will be processed when you execute commands from the Execute Commands screen.</p>
<p>
Active or inactive indicates the mode you selected on the Organization screen or last used to execute commands against the file. The file itself is referred to as active or inactive, depending on the mode in which commands for the file were last executed.</p>
<p>
If you have permissions to change the value, and your system supports the alternative option you choose, your entry will override the system default set by the system administrator.</p>
</li>
</li>
</ol>
<ul>
<ul>
<li>Type A to create an Active file. The commands will be executed immediately (upon verifying your permissions) or later in a batch file. Select the active execution mode if you choose to transform the file to current release format. Set FICREATE to the current release number.</li>
<li>Type <code>A</code> to create an Active file. The commands will be executed immediately (upon verifying your permissions) or later in a batch file. Select the active execution mode if you choose to transform the file to current release format. Set <b>FICREATE</b> to the current release number.</li>
<li>Type I to create an Inactive file. The commands will be generated and stored in separate files for later execution.
 
<p>Active and inactive options are described in "Execution options" on page 219 and "Execute Commands screen" on page 305.</p>
<li>Type <code>I</code> to create an Inactive file. The commands will be generated and stored in separate files for later execution.
<p>
Active and inactive options are described in [[Executing and deleting commands with FILEMGMT#Execution options|Execution options]] and [[Executing and deleting commands with FILEMGMT#Execute Commands screen|Execute Commands screen]].</p>
</li>
</li>
</ul>
</ul>
<ol>
 
<li>In the Optimized Field Extract input field, enter Y to add a length byte to every non-preallocated (or non-OCCURS) field, which could result in faster field extraction. The improvement is most noticeable when you have built records with a large number of fields. Entering Y sets FILEORG to X'80'.  
<li>In the <b>Opt Fld Ext</b> (optimized field extract) input field, enter <code>Y</code> to add a length byte to every non-preallocated (or non-<var>OCCURS</var>) field, which could result in faster field extraction. The improvement is most noticeable when you have built records with a large number of fields. Entering <code>Y</code> sets <var>FILEORG</var> to X'80'.  
<p>The default is N: non-preallocated (or non-OCCURS) fields that are type FLOAT, CODED, and BINARY are not stored with a preceding length byte. See [[ File Size Calculation#Preallocated fields|Preallocated fields]] for more information on preallocated and non-preallocated fields.</p>
<p>
The default is <code>N</code>: non-preallocated (or non-<var>OCCURS</var>) fields that are type <var>FLOAT</var>, <var>CODED</var>, and <var>BINARY</var> are not stored with a preceding length byte. See [[Field design#Preallocated fields (OCCURS attribute)|Preallocated fields]] for more information on preallocated and non-preallocated fields.</p>
</li>
</li>
<li>In the FILE ORGANIZATION section, select file organization characteristics for the specified file. FILEMGMT computes the <var class="product">Model&nbsp;204</var> FILEORG parameter from your selections and displays the computed value. See the Planning and File Design chapters for details on the advantages and disadvantages of each file organization type.
 
<p>Select one of the following options:</p>
<li>In the <b>RFG</b> input field, enter <code>Y</code> to enable repeating field groups. Repeating field groups, available in Model 204 version 7.5, let you view and process groups of fields as a logical entity. Files with repeating field groups can have up to 32,000 fields. For more information, see [[Field group (File architecture)]].
<p>Entering <code>Y</code> sets <var>FILEORG</var> to X'100'. Note that the <var>FILEORG</var> X'100' attributes (such as CHUNK, DATETIME, and so on) are not currently supported by FILEMGMT.</p>
</li>
</li>
</ol>
 
<table>
<li>In the <b>LG Files</b> input field, enter <code>Y</code> to enable support for large files. Large files, available in Model 204 version 7.5, can hold up to 48 million records. Entering <code>Y</code> sets <var>FILEORG</var> to X'200'.
 
<li>In the <b>FILE ORGANIZATION</b> section, select file organization characteristics for the specified file. FILEMGMT computes the <var class="product">Model&nbsp;204</var> <var>[[FILEORG parameter|FILEORG]]</var> parameter from your selections and displays the computed value. See [[File design]] for details on the advantages and disadvantages of each file organization type.
<ol class="low-al">
<li>Select one of the following options:
<table class="thJustBold">
<tr class="head">
<th>Option</th>
<th>Parameter value</th>
<th>Description</th></tr>
 
<tr>
<tr>
<td>Option</td>
<th>Entry</th>
<td>Parameter value</td>
<td>FILEORG X'00'</td>
<td>Description</td>
<td>Records are stored in the file in the order in which they are entered. You cannot reorder records or reuse the record numbers of deleted records. <b>Entry</b> is the default file organization. </td></tr>
</tr>
 
<tr>
<tr>
<td>Entry</td>
<th>Sorted</th>
<td>(FILEORG=x'00')</td>
<td>FILEORG X'01'</td>
<td>Records are stored in the file in the order in which they are entered. You cannot reorder records or reuse the record numbers of deleted records. Entry is the default file organization. </td>
<td>Records are stored in the file in order by the sort key that you specify. <b>Sorted</b> is less efficient than the other options and is not recommended. </td></tr>
</tr>
 
<tr>
<tr>
<td>Sorted</td>
<th>Hash</th>
<td>(FILEORG=x'01')</td>
<td>FILEORG X'08'</td>
<td>Records are stored in the file in order by the sort key that you specify. Sorted is less efficient than the other options and is not recommended. </td>
<td>Records are stored in the file in order by the hash key that you specify. </td></tr>
</tr>
 
<tr>
<td>Hash</td>
<td>(FILEORG=x'08')</td>
<td>Records are stored in the file in order by the hash key that you specify. </td>
</tr>
<tr>
<tr>
<td>Unordered</td>
<th>Unordered</th>
<td>(FILEORG=x'20')</td>
<td>FILEORG X'20'</td>
<td>Records are stored in the file in the order in which they are entered. You can reorder records and reuse the record numbers of deleted records. </td>
<td>Records are stored in the file in the order in which they are entered. You can reorder records and reuse the record numbers of deleted records. </td></tr>
</tr>
</table>
</table>
<p>A record is stored on a page if there is sufficient space (as determined by the BREUSE parameter) and if there is an unused record number.</p>
<ol>
<li>In the Reuse Record Numbers input field, enter Y or N.
<p>Available with Unordered, Hashed, or Sorted file organization. Select Reuse Record Numbers if you want the record numbers of deleted records to be reused for new records added, provided that the record number is available on the Table B page to which the new record is being added. Selecting Reuse Record Numbers sets FILEORG=x'04'.</p>
</li>
</li>
<li>A record is stored on a page if there is sufficient space (as determined by the <var>[[BREUSE parameter|BREUSE]]</var> parameter) and if there is an unused record number.
<p>
In the <b>Reuse Record Numbers</b> input field, enter <code>Y</code> or <code>N</code>. </p>
<p>
Available with Unordered, Hash, or Sorted file organization. Select <b>Reuse Record Numbers</b> if you want the record numbers of deleted records to be reused for new records added, provided that the record number is available on the Table B page to which the new record is being added. Selecting <b>Reuse Record Numbers</b> sets the <var>FILEORG</var> X'04' bit.</p>
</li>
<li>Enter a Sort or Hash key, if applicable.
<li>Enter a Sort or Hash key, if applicable.
<p>If you have selected Hashed or Sorted as the file organization, enter the name of the sort or hash key field. The entry must be a valid <var class="product">Model&nbsp;204</var> field name (1-70 characters). The requirements for a valid field name are described in [[ Field Names#Field name rules|Field name rules]]. The sort or hash key field must exist in every record in the file. </p>
<p>
<p>If you have selected the Entry or Unordered file organization option, leave Sort/Hash Key blank.</p>
If you have selected <b>Hash</b> or <b>Sorted</b> as the file organization, enter the name of the sort or hash key field. The entry must be a valid <var class="product">Model&nbsp;204</var> field name (1-70 characters). The requirements for a valid field name are described in [[ Field names#Field name rules|Field name rules]]. The sort or hash key field must exist in every record in the file. </p>
<p>
If you have selected the <b>Entry</b> or <b>Unordered</b> file organization option, leave <b>Sort/Hash Key</b> blank.</p>
</li>
</li>
<li>In the Req Every Rec input field:</li>
 
<li>If you have selected Hashed or Sorted as the file organization, enter X to place a hash key (for hashed files) or a sort key (for sorted files) on every record. This option is required for Hashed or Sorted files because a key on every record is needed to process the file correctly. This option sets FILEORG=x'02'.</li>
<li>In the <b>Req Every Rec</b> input field:
<li>If you have selected the Entry or Unordered file organization option, leave Req Evry Rec blank.</li>
 
<li>Leave the Enable Skewing input field blank. Skewing is an obsolete method of physical storage that was designed to improve efficiency during sequential searches. An X would indicate that blocks within a track were stored in a skewed order. (For details, see the section "File skewing".)</li>
<p>If you have selected <b>Hash</b> or <b>Sorted</b> as the file organization, enter <code>X</code> to place a hash key (for hashed files) or a sort key (for sorted files) on every record. This option is required for hashed or sorted files because a key on every record is needed to process the file correctly. This option sets the <var>FILEORG</var> X'02' bit.</p>
<li>Select the following Auto Increase options as needed. See the chapter on File Table Size Management for details.</li>
 
<li>TableB Auto Inc: If you want <var class="product">Model&nbsp;204</var> to automatically increase Table B when it is opened or becomes full, enter an x beside one of the following options: </li>
<p>If you have selected the <b>Entry</b> or <b>Unordered</b> file organization option, leave <b>Req Evry Rec</b> blank.</p></li>
<li>Full: Table B will be automatically increased when it fills up by the amount specified in the parameter BAUTOINC.</li>
 
<li>At Open: Table B will be automatically increased at file open time. [!!!is it increased when the table opens or the file opens?]</li>
<li>Leave the <b>Enable Skewing</b> input field blank. Skewing is an obsolete method of physical storage that was designed to improve efficiency during sequential searches. An <code>X</code> would indicate that blocks within a track were stored in a skewed order. </li>
<li>Table B Auto Increase Pages: If you have selected a TableB Auto Inc option, enter the number of pages to increase Table B by. This sets the parameter BAUTOINC to the specified value.</li>
 
<li>Table D Auto Increase Pages: If you want <var class="product">Model&nbsp;204</var> to automatically increase Table D when it is opened or becomes full, enter the number of pages to increase Table D by. This sets the parameter DAUTOINC to the specified value.</li>
<li>Select the following Auto Increase options as needed. See [[File size calculation in detail]] for details.
<li>Table X Auto Increase Pages: If you want <var class="product">Model&nbsp;204</var> to automatically increase Table X when it is opened or becomes full, enter the number of pages to increase Table X by. This sets the parameter XAUTOINC to the specified value. To use Table X:</li>
<ul>
<li>The file must have been created in <var class="product">Model&nbsp;204</var> version 7.1.0 or later.</li>
 
<li>The file must have an organization type of Entry or Unordered.</li>
<li><b>Table B Auto Incr Pages:</b> If you want <var class="product">Model&nbsp;204</var> to automatically increase Table B when it becomes full, enter the number of pages to increase Table B by. This sets the parameter <var>[[BAUTOINC parameter|BAUTOINC]]</var> to the specified value.</li>
<li>File Models: A file model is a set of default file and field attributes. Rocket Software recommends that you use the default setting.</li>
 
<li>In the FILE OPTIONS section, select the characteristics of the file you are creating. FILEMGMT computes the <var class="product">Model&nbsp;204</var> FOPT parameter from your selections and displays the computed value.
<li><b>Table D Auto Incr Pages:</b> If you want <var class="product">Model&nbsp;204</var> to automatically increase Table D when it becomes full, enter the number of pages to increase Table D by. This sets the parameter <var>[[DAUTOINC parameter|DAUTOINC]]</var> to the specified value.</li>
<table>
 
<tr class="head">
<li><b>Table X Auto Incr Pages:</b> If you want <var class="product">Model&nbsp;204</var> to automatically increase Table X when it becomes full, enter the number of pages to increase Table X by. This sets the parameter <var>[[XAUTOINC parameter|XAUTOINC]]</var> to the specified value. To use Table X:
<th>Disable lock pending updates</th>
<p>
<th>
The file must have been created in <var class="product">Model&nbsp;204</var> version 7.1.0 or later.</p>
<p>Transaction back out locks an update until the transaction is committed, allowing an update to be backed out prior to the commit if for any reason the transaction does not finish. By disabling Lock Pending Updates, the feature Transaction back out is also disabled (Disable Transaction Backout must also be selected). If Disable lock pending updates is selected, incomplete transactions may be present in the file which may result in a file that is logically inconsistent. (FOPT=X'02')</p>
<p>
<p>The default is null.</p>
The file must have an organization type of Entry or Unordered.</p>
</th>
</tr>
<tr>
<td>Only FM Defines New Fields</td>
<td>
<p>This option prevents the DEFINE FIELD command from being issued without using the FILEMGMT facility. The purpose of this option is to maintain the integrity of the dictionary. By using the FILEMGMT facility to define fields, the relationship between a file, the records in the file and the fields and their relationship to the file and the records within the file is automatically maintained in the Dictionary. (FOPT=X'01')</p>
<p>The default is that new fields can be defined outside of FILEMGMT on the command line.</p>
</td>
</tr>
<tr>
<td>No Procedure Statement Numbers</td>
<td>Selecting this option prevents any procedures from being stored in the file which use statement numbers. Using statement numbers is an obsolete way of coding a User Language procedure which is difficult to understand. If this file is being used to store procedures, select this option in order to enforce proper coding standards. (FOPT=X'80')</td>
</tr>
<tr>
<td>No Procedure Statement Labels</td>
<td>Selecting this option prevents any procedures from being stored in the file which use statement labels. Statement labels are the proper way to code a User Language procedure. If this file will be used for storing procedures, enter N or leave the input field blank. Otherwise, enter Y if you want to prohibit procedure statement labels from being assigned to procedure lines. (FOPT=X'40')</td>
</tr>
<tr>
<td>Enable Date Time Stamp</td>
<td>
<p>The Date Time Stamp is an additional field within the file which tracks changes to a file at the record level and records the date and time of each update to a record. (FOPT=X'10') For details, see [[ Adding a Date-Time Stamp field#Overview of the date-time stamp feature|Overview of the date-time stamp feature]].</p>
<p>To use the date-time stamp:</p>
<p>. The file must be an LPU file</p>
<p>. The date/time stamp field specified in the DTSFN= system parameter must have already been defined to the file. For details, see [[ Setting Up the Date-Time Stamp Field#Enabling date-time stamp updates|Enabling date-time stamp updates]].</p>
</td>
</tr>
</table>
</li>
<li>In the FILE RECOVERY OPTIONS section, select file recovery options for the file. FILEMGMT computes the <var class="product">Model&nbsp;204</var> FRCVOPT parameter from your selections and displays the computed value.
<p>By default, recovery features are enabled. In an online environment, using the default options is recommended so that the file can participate in recovery if the system crashes. </p>
<p>You might want to turn off recovery options if you are running a batch job that does not need to incur the overhead of recording information for recovery. FILEMGMT provides options to turn off specific recovery features, as described below. </p>
<p>See the File Recovery chapter for details on these options.</p>
</li>
</li>
</ul>
</ol>
</ol>
<table>
 
<tr class="head">
<li><b>File Models:</b> A file model is a set of default file and field attributes. Rocket Software recommends that you use the default setting.</li>
<th>Disable Transaction Backout</th>
 
<th>
<li>In the <b>FILE OPTIONS</b> section, select the characteristics of the file you are creating. FILEMGMT computes the <var class="product">Model&nbsp;204</var> <var>[[FOPT parameter|FOPT]]</var> parameter from your selections and displays the computed value.
<p>File does not use the <var class="product">Model&nbsp;204</var> transaction backout feature. This option is required if Disable Lock Pending Updates is selected.</p>
<table class="thJustBold">
<p>Transaction back out is a feature that will back out an update if the update does not complete as intended. This feature maintains the logical integrity of the file by ensuring that if the commit for an update is not executed, the update will not be kept.</p>
<p>(FRCVOPT=X'08')</p>
<p>The default is null. See the Transaction back out chapter for details.</p>
</th>
</tr>
<tr>
<tr>
<td>No Rollforward (RF)</td>
<th>Disable Lock Pending Updates</th>
<td>File does not use the roll forward facility of the RESTART command. The default is null. This option prevents the updates from the file from being processed during roll forward. If this option is selected, the file will not participate in roll forward when the system performs recovery. (FRCVOPT=X'02')</td>
<td>Transaction back out locks an update until the transaction is committed, allowing an update to be backed out prior to the commit if for any reason the transaction does not finish. By disabling Lock Pending Updates, the feature Transaction back out is also disabled (Disable Transaction Backout must also be selected). If Disable lock pending updates is selected, incomplete transactions may be present in the file which may result in a file that is logically inconsistent. (FOPT=X'02')
</tr>
<p>
The default is null.</p>
</td></tr>
 
<tr>
<tr>
<td>No RF Logging</td>
<th nowrap>Only FM Defines New Fields</th>
<td><var class="product">Model&nbsp;204</var> does not log changes to the journal file. The default is null. Roll Forward logging is the recording of updates from a file that are then used to apply updates when recovery is run. Selecting this option prevents the file from being able to use recovery. (FRCVOPT=X'04')</td>
<td>This option prevents the DEFINE FIELD command from being issued without using the FILEMGMT facility. The purpose of this option is to maintain the integrity of the dictionary. By using the FILEMGMT facility to define fields, the relationship between a file, the records in the file and the fields and their relationship to the file and the records within the file is automatically maintained in the Dictionary. (FOPT=X'01')
</tr>
<p>
The default is that new fields can be defined outside of FILEMGMT on the command line.</p>
</td></tr>
 
<tr>
<tr>
<td>No Checkpoint (CK) Logging</td>
<th nowrap>No Procedure Statement Numbers</th>
<td>
<td>Selecting this option prevents any procedures from being stored in the file which use statement numbers. Using statement numbers is an obsolete way of coding a User Language procedure which is difficult to understand. If this file is being used to store procedures, select this option in order to enforce proper coding standards. (FOPT=X'80')
<p><var class="product">Model&nbsp;204</var> does not log checkpoint information to the checkpoint data set. The default is null.</p>
</td></tr>
<p>Checkpoint logging is the process of capturing the contents of a record before an update is made. If checkpoint logging is not active, the file cannot participate in recovery. (FRCVOPT=X'20')</p>
 
</td>
</tr>
<tr>
<tr>
<td>No Updates without RF Logging</td>
<th>No Procedure Statement Labels</th>
<td>
<td>Selecting this option prevents any procedures from being stored in the file which use statement labels. Statement labels are the proper way to code a User Language procedure. If this file will be used for storing procedures, enter N or leave the input field blank. Otherwise, enter Y if you want to prohibit procedure statement labels from being assigned to procedure lines. (FOPT=X'40')
<p>File is not updated unless roll forward logging is active. The default is null.</p>
</td></tr>
<p>Selecting this option requires that a journal be defined in the environment in which updates are made to the file. If a journal is not available, updates will not be allowed. If updates are made using a batch job, selecting this option will require that the batch job have a journal defined to it that will allow roll forward logging to be performed. (FRCVOPT=X'80')</p>
 
</td>
</tr>
<tr>
<td>No Updates without CK Logging</td>
<td>
<p>File is not updated unless checkpoint logging is active.The default is null.</p>
<p>This option requires that a checkpoint data set be defined to the run. Updates will not be allowed unless a checkpoint data set is present. If updates are made using a batch job, the job must have a checkpoint data set. (FRCVOPT=X'40')</p>
</td>
</tr>
<tr>
<td>All Updates Applied During RF</td>
<td>
<p>All updates to the file are applied when the file is rolled forward. The default is null.</p>
<p>This option will apply all updates during roll forward and not back out any incomplete update transactions. This option can only be used if Transaction back out (TBO) is turned off. This can be useful if a large number of updates are made without a commit being issued. It is suggested that after recovery has been run against a file with this option that a REORG be run against this file to ensure that the data and the indexes are in sync. (FRCVOPT=X'09')</p>
</td>
</tr>
<tr>
<tr>
<td>No Discontinuities Allowed</td>
<th>Enable Date Time Stamp</th>
<td>
<td>The Date Time Stamp is an additional field within the file which tracks changes to a file at the record level and records the date and time of each update to a record. (FOPT=X'10') For details, see [[Adding a date-time stamp field#Overview of the date-time stamp feature|Overview of the date-time stamp feature]].
<p>Only updates that do not result in discontinuities are applied to the file. The default is null.</p>
<p>
<p>A discontinuity is an event that cannot be rolled back past during recovery. It will process the file using the discontinuity as a checkpoint for roll back and roll forward recovery. Essentially, a discontinuity creates a checkpoint for the file in question at the point in time when the discontinuity occurs. There is really no reason not to allow discontinuities. (FRCVOPT=X'10')</p>
To use the date-time stamp:</p>
</td>
</tr>
</table>
<ol>
<li>Format File During CREATE: FILEMGMT formats the file during file creation. Valid values are Y and N. Rocket Software recommends that you use the default value, Y, in order to maintain file integrity.</li>
<li>Verify Disk Updates: FILEMGMT verifies all updates made to the file during file creation. Valid values are Y and N. Rocket Software recommends that you use the default value, N. The computer does its own verification of disk updates, so this option is no longer necessary and likely to cause overhead.</li>
</ol>
==Resetting file parameters==
<p>Select the FILE Maintenance RESET function (number 2) from the primary screen. FILEMGMT displays the first of the two Reset screens, the File Parameter Reset screen: </p>
<ul>
<ul>
<li>File Parameter Reset screen:
<li>The file must be an LPU file.
<table>
<tr>
<td>
<p class="code">
FILEMGMT                File Parameter Reset Screen        Page 1 of 2
Filename: METADATA    FICREATE: 7.1  LANGUAGE: US        Inactive
FILE MODEL OPTIONS                                      FILEMODL X' 00 '
  None:X    1nf:_    Numeric Validation:_


TABLE B AND D AND X AUTOMATIC INCREASE OPTIONS:
<li>The date/time stamp field specified in the DTSFN= system parameter must have already been defined to the file. For details, see [[Setting up the date-time stamp field#Enabling date-time stamp updates|Enabling date-time stamp updates]].
Table B Auto Increase: Pages: __
</ul>
Table D Auto Increase: Pages: __
</td></tr>
Table X Auto Increase: Pages: __
BRSV: 200    DRSV: 15 % DPGSRES: 2      XRSV:      BREUSE:
FILE OPTIONS:                                            FOPT    X' 00 '
  Disable Lock Pending Updates: _  Only FM Defines New Fields:    _
  No Procedure Statement Labels:_  No Procedure Statement Numbers: _
  Enable Date Time Stamp:      N
FILE RECOVERY OPTIONS                                FRCVOPT  X' 00 '
  Disable Transaction Backout:  _  No Rollforward (RF):            _
  No RF Logging:                _  No Checkpoint (CK) Logging:    _
  No Updates Without RF Logging:_  No Updates Without CK Logging:  _
  All Updates Applied During RF:_  No Discontinuities Allowed:    _
<b></b>===>                                                                &lt;
FIM314 You have selected Datetime Stamp, hit PF11 to define attributes
1=HELp  2=        3=QUIt    4=FIELDs  5=            6=COMmands
7=      8=FORward  9=        10=      11=ATTributes  12=END
</p></td>
</tr>
</table>
</table>
</li>
</li>
<li>File Security Reset screen
<p>Press PF8 (FORward) to display the File Security Reset screen:</p>
</li>
</ul>
<table>
<tr>
<td>
<p class="code">FILEMGMT                  File Security Reset Screen        Page 2 of 2


Filename: ABC                                                Inactive
<li>In the <b>FILE RECOVERY OPTIONS</b> section, select file recovery options for the file. FILEMGMT computes the <var class="product">Model&nbsp;204</var> <var>[[FRCVOPT parameter|FRCVOPT]]</var> parameter from your selections and displays the computed value.
FILE ACCESS                                              OPENCTL X' 80 '
<p>
  Public:          X    Semipublic:  _  Private:  _    Record Security:
By default, recovery features are enabled. In an online environment, using the default options is recommended so that the file can participate in recovery if the system crashes. </p>
REMOTE FILE ACCESS PRIVILEGES
<p>
  NO/INV PWD: _  VALID PWD: _  GROUP MEMBER: _
You might want to turn off recovery options if you are running a batch job that does not need to incur the overhead of recording information for recovery. FILEMGMT provides options to turn off specific recovery features, as described below. </p>
DEFAULT FILE PRIVILEGES                                  PRIVDEF X' BFFF '
<p>
  File Manager:    X    Record Security Override: _  View File Parms: X
See [[File integrity and recovery]] for details about these options.</p>
  RETRIEVE DATA WITH PROCEDURES
    Adhoc:        X    Internal: X  External:  X
  UPDATE DATA WITH PROCEDURES
    Adhoc:        X    Internal: X  External:  X
  INTERNAL PROCEDURES
    Display/Copy:  X    Define:  X  Change:    X  Delete: X  Include: X
DEFAULT FIELD LEVEL SECURITY
    SELLVL:        0    READLVL:  0  UPDTLVL:    0  ADDLVL: 0


DEFAULT PROCEDURE CLASS                PRCLDEF:    0
<table class="thJustBold">
===>
<tr>
<th>Disable Transaction Backout</th>
<td>File does not use the <var class="product">Model&nbsp;204</var> [[Transaction back out|transaction back out]] feature. This option is required if Disable Lock Pending Updates is selected.
<p>
Transaction back out is a feature that will back out an update if the update does not complete as intended. This feature maintains the logical integrity of the file by ensuring that if the commit for an update is not executed, the update will not be kept.</p>
<p>The default is null. </p>
<p>(FRCVOPT=X'08')</p>
</td></tr>


1=HELp      2=          3=QUIt      4=          5=          6=COMmands
7=BACkward  8=          9=          10=          11=          12=END
</p></td>
</tr>
</table>
<p>You use the Reset screens to change the values of <var class="product">Model&nbsp;204</var> file parameters that were originally set on the File Definition screens or the File Size Definition screen. FILEMGMT stages the file for a RESET command in response to your input.</p>
<p>The Reset screens display the file parameters that can be reset. File parameters not displayed on the Reset screens can be changed only by recreating the file.</p>
<p>For some of the file parameters shown on these screens, you specify an actual parameter value. For others, you select options, and FILEMGMT uses your selections to compute appropriate values for the FOPT, FRCVOPT, OPENCTL, and PRIVDEF parameters.</p>
<p>You need not fill in all values on all screens. Current parameter values are preserved for any parameters for which you do not enter values.</p>
<p>You can move freely between the two Reset screens by pressing the PF7 (BACkward) and PF8 (FORward) keys. FILEMGMT does not save any of the information you enter until you press one of the following function keys from either of the screens:</p>
<table>
<tr>
<tr>
<td>PF6 </td>
<th>No Rollforward (RF)</th>
<td>COMmands</td>
<td>File does not use the roll forward facility of the RESTART command. The default is null. This option prevents the updates from the file from being processed during roll forward. If this option is selected, the file will not participate in roll forward when the system performs recovery.
<p>(FRCVOPT=X'02')</p></td>
</tr>
</tr>
<tr>
<tr>
<td>PF12</td>
<th>No RF Logging</th>
<td>END </td>
<td><var class="product">Model&nbsp;204</var> does not log changes to the journal file. The default is null. Roll Forward logging is the recording of updates from a file that are then used to apply updates when recovery is run. Selecting this option prevents the file from being able to use recovery.  
</tr>
<p>(FRCVOPT=X'04')</p></td></tr>
</table>
 
<p>The section [[#Input for the File Parameter Reset screen|Input for the File Parameter Reset screen]] describes the type of information you enter. For more information about parameter settings, refer to the <var class="product">Model&nbsp;204</var> Parameter and Command Reference. For a discussion of how to select the most appropriate options for your particular file, refer to the Rocket <var class="product">Model&nbsp;204</var> File Manager's Guide.</p>
<p>The cursor is initially positioned at the first input prompt on the first screen.</p>
===Input for the File Parameter Reset screen===
<p>You can select more than one option from an option category.</p>
<p>To select an option, type X or a numeric value.</p>
<p>To enter a null: type a space, press the ERASE EOF key, or preserve the default underscore character (_). Null indicates that you do not want to select the option. </p>
<p>Typing a character other than these is invalid, and produces an error message.</p>
<p>FILEMGMT displays and/or prompts you for the following information.</p>
<table>
<tr class="head">
<th>Prompt</th>
<th>Response</th>
</tr>
<tr>
<tr>
<td>Filename</td>
<th>No Checkpoint (CK) Logging</th>
<td>FILEMGMT displays the name of the file that you entered on the primary screen, and indicates whether the file is Active or Inactive. </td>
<td><var class="product">Model&nbsp;204</var> does not log checkpoint information to the checkpoint data set. The default is null.
</tr>
<p>
Checkpoint logging is the process of capturing the contents of a record before an update is made. If checkpoint logging is not active, the file cannot participate in recovery.</p>
<p>
(FRCVOPT=X'20')</p></td></tr>
 
<tr>
<tr>
<td colspan="2">Screen 1: File Parameter Reset screen </td>
<th>No Updates without RF Logging</th>
</tr>
<td>File is not updated unless roll forward logging is active. The default is null.
<p>
Selecting this option requires that a journal be defined in the environment in which updates are made to the file. If a journal is not available, updates will not be allowed. If updates are made using a batch job, selecting this option will require that the batch job have a journal defined to it that will allow roll forward logging to be performed. </p>
<p>
(FRCVOPT=X'80')</p>
</td></tr>
 
<tr>
<tr>
<td>FICREATE</td>
<th nowrap>No Updates Without CK Logging</th>
<td><var class="product">Model&nbsp;204</var> version number for the file you are creating. FILEMGMT uses this value to calculate the file size and validate certain <var class="product">Model&nbsp;204</var> file features. </td>
<td>File is not updated unless checkpoint logging is active.The default is null.
</tr>
<p>
This option requires that a checkpoint data set be defined to the run. Updates will not be allowed unless a checkpoint data set is present. If updates are made using a batch job, the job must have a checkpoint data set.</p>  
<p>
(FRCVOPT=X'40')</p>
</td></tr>
 
<tr>
<tr>
<td>RDFS</td>
<th>All Updates Applied During RF</th>
<td>Reuse direct file space file. Prompted when the file has a pre-9.0 FICREATE and is an RDFS file (that is, entry-order reuse record numbers). </td>
<td>All updates to the file are applied when the file is rolled forward. The default is null.
</tr>
<p>
<tr>
This option will apply all updates during roll forward and not back out any incomplete update transactions. This option can only be used if Transaction back out (TBO) is turned off. This can be useful if a large number of updates are made without a commit being issued. It is suggested that after recovery has been run against a file with this option that a REORG be run against this file to ensure that the data and the indexes are in sync. </p>
<td>Reuse First</td>
<p>
<td>For an RDFS file only. Record numbers are reused whenever possible by records as they are added. </td>
(FRCVOPT=X'09')</p>
</tr>
</td></tr>
<tr>
 
<td>Append First</td>
<td>For an RDFS file only. Record numbers are reused only when no remaining space is at the end of the table. </td>
</tr>
<tr>
<td>FILE MODEL OPTIONS</td>
<td>These and the FILEMODL parameter are explained in the Rocket <var class="product">Model&nbsp;204</var> File Manager's Guide.</td>
</tr>
<tr>
<td>TableB Auto Inc</td>
<td>Enter an x to select an option for automatic Table B increase. The default is None. </td>
</tr>
<tr>
<td>Full</td>
<td>Table B will be automatically increased when Table B fills up by the amount specified in the parameter BAUTOINC.</td>
</tr>
<tr>
<td>At Open</td>
<td>Table B will be automatically increased at file open time, if the increase using BAUTOINC pages would allow the last segment in the file to contain more than 25 percent of the number of records in one segment.</td>
</tr>
<tr>
<td>Pgs</td>
<td>Enter the number of pages to increase Table B when the Full and/or At Open option is selected. BAUTOTYP is filled based on your selections. This sets the parameter BAUTOINC to the specified value.</td>
</tr>
<tr>
<td>TableD Auto Increase Pages</td>
<td>If you want <var class="product">Model&nbsp;204</var> to automatically increase Table D when it becomes full, enter the number of pages to add.</td>
</tr>
<tr>
<td>FILE OPTIONS</td>
<td>Select file characteristics for the specified file. FILEMGMT computes the new value of the <var class="product">Model&nbsp;204</var> FOPT parameter from your selections and displays the computed value.</td>
</tr>
<tr>
<td>Disable Lock Pending Updates</td>
<td>Lock pending updates feature is disabled. If this option is selected, Disable Transaction Backout must also be selected. The default is null.</td>
</tr>
<tr>
<td>Only FM Defines New Fields </td>
<td>New fields in the <var class="product">Model&nbsp;204</var> file can be defined only by a user with file manager privileges. The default is null.</td>
</tr>
<tr>
<td>No Procedure Statement Numbers</td>
<td>Statement numbers cannot be assigned to procedure lines. The default is null.</td>
</tr>
<tr>
<td>No Procedure Statement Labels </td>
<td>Statement labels cannot be assigned to procedure lines. The default is null.</td>
</tr>
<tr>
<td>FILE RECOVERY OPTIONS </td>
<td>Select file recovery characteristics for the specified file. FILEMGMT computes a new value for the <var class="product">Model&nbsp;204</var> FRCVOPT parameter from your selections and displays the computed value.</td>
</tr>
<tr>
<td>Disable Transaction Backout</td>
<td>File does not use the <var class="product">Model&nbsp;204</var> transaction backout feature. This option is required if Disable Lock Pending Updates is selected. The default is null.</td>
</tr>
<tr>
<td>No Rollforward (RF)</td>
<td>File does not use the roll forward facility of the RESTART command. The default is null.</td>
</tr>
<tr>
<td>No RF Logging</td>
<td><var class="product">Model&nbsp;204</var> does not log changes to the journal file. The default is null.</td>
</tr>
<tr>
<td>No Checkpoint (CK) Logging</td>
<td><var class="product">Model&nbsp;204</var> does not log checkpoint information to the checkpoint data set. The default is null.</td>
</tr>
<tr>
<td>No Updates Without RF Logging</td>
<td>File is not updated unless roll forward logging is active. The default is null.</td>
</tr>
<tr>
<td>No Updates Without CK Logging</td>
<td>File is not updated unless checkpoint logging is active. The default is null.</td>
</tr>
<tr>
<td>All Updates Applied During RF </td>
<td>All updates to the file are applied when the file is rolled forward. The default is null.</td>
</tr>
<tr>
<td>No Discontinuities Allowed </td>
<td>Only updates that do not result in discontinuities are applied to the file. The default is null.</td>
</tr>
<tr>
<td>BRESERVE</td>
<td>Specify the number of bytes reserved for expansion on Table B pages. The maximum value is the value of PAGESZ-40. The default is 17. </td>
</tr>
<tr>
<td>DRESERVE</td>
<td>Specify the percentage of space in a Table D page reserved for expansion. DRESERVE applies only to inversion pages. Valid values are 0-100. The default is 15. </td>
</tr>
<tr>
<td>DPGSRES</td>
<td>
<p>Specify the number of pages in Table D held in reserve. The file is marked full when the first of the DPGSRES pages is used, but transaction backout processing is allowed to continue. </p>
<p>Valid values are 1-32767. DPGSRES must be less than the value of DSIZE. The default is DSIZE/50 + 2; if DSIZE/50 + 2 is greater than 40, the default is 40.</p>
</td>
</tr>
<tr>
<td>BREUSE</td>
<td>
<p>For an unordered file only. Specified as a percentage of space on a page; it determines which pages can hold another record. To be reused for storing another record, the page must have the following minimum bytes of free space: </p>
<p class="code">(usable page size - BRESERVE)*BREUSE + BRESERVE
</p>
<p>Usable page size is the size of the page minus overhead. The default is 20. </p>
</td>
</tr>
</table>
==Copying files==
<p>Select the File Management Copy function (number 5) from the primary screen. FILEMGMT displays the Copy screen:</p>
<table>
<tr>
<tr>
<td>
<th>No Discontinuities Allowed</th>
<p class="code"> FILEMGMT                Copy Screen
<td>Only updates that do not result in discontinuities are applied to the file. The default is null.
<p>
A discontinuity is an event that cannot be rolled back past during recovery. It will process the file using the discontinuity as a checkpoint for roll back and roll forward recovery. Essentially, a discontinuity creates a checkpoint for the file in question at the point in time when the discontinuity occurs. There is really no reason not to allow discontinuities.</p>
<p>
(FRCVOPT=X'10')</p>
</td></tr>
</table></li>


<li><b>Format File During CREATE:</b> FILEMGMT formats the file during file creation. Valid values are <code>Y</code> and <code>N</code>. Rocket Software recommends that you use the default value, <code>Y</code>, in order to maintain file integrity.</li>


<li><b>Verify Disk Updates:</b> FILEMGMT verifies all updates made to the file during file creation. Valid values are <code>Y</code> and <code>N</code>. Rocket Software recommends that you use the default value, <code>N</code>. The computer does its own verification of disk updates, so this option is no longer necessary and likely to cause overhead.</li>
</ol>


Filename:      ABC                                    Active
Copy to FILE:
WITH:          _
                1. Records, Fields and Sizes
                2. Records and Fields
                3. Fields Only
                4. No Records or Fields
===>
1=HELp      2=          3=QUIt      4=          5=          6=
7=          8=          9=          10=          11=          12=END
</p></td>
</tr>
</table>
<p>You use the Copy screen to copy an existing <var class="product">Model&nbsp;204</var> file definition to a new file. You can optionally copy the file's record and field definitions when you copy the file.</p>
<p>A Copy operation is performed as soon as you leave the Copy screen. The copied files are staged for the CREATE command, and record and field definitions are staged for the DEFINE command. You must size the copied file before you can execute the CREATE command. The sizing links the file to a data set name.</p>
<p>The cursor is initially positioned at the Copy to FILE prompt.</p>
===Copy screen input===
<p>FILEMGMT displays or prompts you for the following information.</p>
<table>
<tr class="head">
<th>Prompt</th>
<th>Response</th>
</tr>
<tr>
<td>Filename</td>
<td>FILEMGMT displays the name of the file that you entered on the primary screen, and indicates whether the file is Active or Inactive.</td>
</tr>
<tr>
<td>Copy to FILE</td>
<td>
<p>Type the name of the new file to which FILEMGMT is to copy the existing file. The name must: </p>
<ul>
<li>Have 1-8 characters (letters and/or numbers) and not contain any special characters. </li>
<li>Begin with a letter. </li>
<li>Not begin with the characters SYS, CCA, OUT, or TAPE. </li>
</ul>
</td>
</tr>
<tr>
<td>Enter Number </td>
<td>
<p>Type one of the following numbers to indicate the scope of the copy operation: </p>
<ol>
<li>Records, Fields and Sizes-Copies size parameters as well as record and field data as in Selection #2. </li>
<li>Records and Fields-Copies all field and corresponding record type definitions from the existing file to the new file. </li>
<li>Fields Only- Copies field definitions but not the corresponding record type definitions from the existing file to the new file. Creates one record, which is staged for a DEFINE command and has a *REC DEFN REQD status. </li>
<li>No Records or Fields-Copies neither record type nor field definitions to the new file. You can subsequently use the new file as a procedure file, or add different fields to the file. </li>
</ol>
<p>If the source file is a Sorted, Hash and/or Record Security file, the sort, hash, and/or record security key fields are copied to the new file. One record is created; the record is staged for the DEFINE command and has a *REC DEFN REQD status. </p>
</td>
</tr>
</table>
==Recreating files==
==Recreating files==
<p>A file recreate is necessary if, for example, you want to increase a table size that cannot be increased in the existing file. Recreating a file deletes all the data and procedures in the file, but leaves the field, record, and field group definitions intact. To preserve the data and procedures, you must dump or display the files and procedures. You cannot recreate a file from the primary screen, which has entities staged with commands.</p>
<p>
<p>To recreate a file:</p>
A file recreate is necessary if, for example, you want to increase a table size that cannot be increased in the existing file. Recreating a file deletes all the data and procedures in the file, but leaves the field, record, and field group definitions intact. To preserve the data and procedures, you must dump or display the files and procedures. You cannot recreate a file from the primary screen, which has entities staged with commands.</p>
<p>Select the File Maintenance Recreate function from one of the following:</p>
<p>
To recreate a file:</p>
<p>Select the File Maintenance <b>Recreate</b> function from one of the following:</p>
<ul>
<ul>
<li>Primary screen if the file is an existing file.</li>
<li>Primary screen if the file is an existing file.</li>
<li>File Size Definition screen if the file is existing or staged, and if the sizing calculations show some tables are so large that the file needs to be recreated. (See [[ Managing File and Table Size with FILEMGMT#Sizing an existing file|Sizing an existing file]].) </li>
<li>File Size Definition screen if the file is existing or staged, and if the sizing calculations show some tables are so large that the file needs to be recreated. (See [[ Managing file and table size with FILEMGMT#Sizing an existing file|Sizing an existing file]].) </li>
</ul>
</ul>
<p>When you select the Recreate function, FILEMGMT creates a version of all field, record, and field group definitions and stages them for DEFINE. The steps for recreating a file are thereafter similar to the steps for creating a file described in [[#Overview of creating files|Overview of creating files]]. </p>
<p>
<p>The Recreate function uses the same Definition screens as the CREATE function. </p>
When you select the <var>Recreate</var> function, FILEMGMT creates a version of all field, record, and field group definitions and stages them for <var>DEFINE</var>. The steps for recreating a file are thereafter similar to the steps for creating a file described in [[#Overview of creating files|Overview of creating files]]. </p>
<p>You can select the Size function to resize the file after you redefine the file on the Definition screens.  </p>
<p>
==Deleting files==
The <var>Recreate</var> function uses the same Definition screens as the <var>CREATE</var> function. </p>
<p>To stage a file for deletion from the dictionary:</p>
<p>
<ol>
You can select the Size function to resize the file after you redefine the file on the Definition screens.  </p>
<li>Enter the file name on the primary screen.</li>
<li>Select the Delete function.</li>
<li>Press Enter. </li>
</ol>
<p>The File Delete screen is displayed.</p>
<table>
<tr>
<td>
<p class="code">FILEMGMT              File Delete Screen
 
FILENAME: ABC                                Inactive
FICREATE: 6.1
FILEORG:  Entry Order
                                                        PAGESZ: 6184
 
ASIZE: 3      BSIZE: 15      DSIZE: 4          ESIZE: 0      PROCS
<b></b>------------  ------------  ------------      ------------  ----------
ASTRPPG: 614  BRECPPG: 256  DRESERVE: 15 %    EHIGHPG:      CUR:  0
ATRPG:  1    BRESERVE: 17  PDSIZE: 1                        EXP:  0
FVFPG:  1    RECS: 1000    PDSTRPPG: 128                    AVPG: 1
MVFPG:  1                    DPGSRES:  2
CSIZE:  1    FREESIZE:  Total Space Pages: 5049
 
  DDname  Dataset Name ( 1 of 1 )  Device  Trks/Blks
  ABC    M204.ABC                3390      632
 


<b></b>===>


1=HELp      2=      3=QUIt      4=    5=  6=COMmands
7=          8=      9=        10=    11=  12=END
</p></td>
</tr>
</table>
<p>The File Delete Screen duplicates the information on the File Size Definition screen.</p>
<p>The screen does not accept input from you. However, you can select any of the following commands.</p>
<p>Note</p>
<p>The File Management DELETE command is staged on this screen and executed on the Execute Commands screen. FILEMGMT removes all file, field, record, and field group entries from the dictionary when it executes the DELETE. References to the deleted entries are also deleted. No <var class="product">Model&nbsp;204</var> command is executed, except for the OPEN command required to perform deletions. To release the disk space, you must use the IBM operating system commands.</p>
===File Delete screen commands===
<p>To issue a command, press a PF key or type a command name at the prompt (===>) and press Enter.</p>
<table>
<tr class="head">
<th>Key</th>
<th>Command</th>
<th>Meaning</th>
</tr>
<tr>
<td>PF1</td>
<td>HELp</td>
<td>Displays HELP text for the File Delete screen.</td>
</tr>
<tr>
<td>PF3</td>
<td>QUIt</td>
<td>Exits from the File Delete screen and returns to the primary screen without making any changes. </td>
</tr>
<tr>
<td>PF6</td>
<td>COMmands </td>
<td>Stages the file for DELETE. Proceeds to the Execute Commands screen. This screen displays the staged commands that were generated for the file and allows you to select the commands you want to execute.</td>
</tr>
<tr>
<td>PF12 </td>
<td>END</td>
<td>Stages the file for DELETE. Exits from the File Delete screen and returns to the primary screen. You can proceed to the Execute Commands screen by pressing PF6 on the primary screen.</td>
</tr>
</table>
<p>&nbsp;</p>
[[Category:File management]]
[[Category:FILEMGMT application subsystem]]
[[Category:FILEMGMT application subsystem]]

Latest revision as of 20:29, 26 September 2016

Overview of creating files

Prerequisites:

  • You must have Dictionary/204 and its subsystems running in order to use FILEMGMT.
  • Before working your way through the File Management Subsystem facility (FILEMGMT) interface to create a file, you should have made decisions about the organization, recovery options, and security for the file you are creating. See File design for more information.

Adding a file to the database includes the following steps:

  1. Defining the file organization and recovery options (File Definition - Organization screen).
  2. Defining the file security (File Definition - Security screen).
  3. For procedure files, defining the parameters for the procedures contained in the file (File Definition - Procedure screen).
  4. For data files, defining fields, records, and field groups in the following order:
    1. Defining the fields in the file. (Field Name List screen; Field Attributes screen)
    2. Defining the records in the file. (Record Name LIst screen; Record Definitions screen)
    3. Defining the field groups in the file. (Optional. Field Group List screen; Field Group Definition screen.

      See "Field group maintenance" in the Rocket Model 204 Dictionary/204 and Data Administration Guide for details.

  5. Sizing the file and its tables. (File Size Definition screen)
  6. Modifying the file's field, record, and field group definitions and the size specifications, as needed.
  7. Executing the CREATE command (Execute Commands screen).

Defining file organization

  1. Log on to FILEMGMT as described in Logging on to FILEMGMT.
  2. Select the FILE Maintenance CREATE function (number 1) from the primary screen.

    FILEMGMT displays the first of the three File Definition screens, the Organization screen:

File Definition - Organization screen

FILEMGMT File Definition - Organization PAGE 1 OF 3 Filename: VEHICLES FICREATE: 7.5 LANGUAGE: US Active/Inactive I FILE ORGANIZATION Opt Fld Ext: N RFG: N LG FILES: N FILEORG X' 0E ' Entry:__ Sorted:_ Hash:X Unordered:_ Reuse Record Numbers:_ Sort/Hash Key: Req Evry Rec: X Enable Skewing: _ Table B Auto Incr Pages: 0 Table D Auto Incr Pages: 0 Table X Auto Incr Pages: 0 File Models: None X 1nf _ Numeric Validation_ FILEMODL X' 00 ' FILE OPTIONS FOPT X' 00 ' Disable Lock Pending Updates: _ Only FM Defines New Fields: _ No Procedure Statement Numbers: _ No Procedure Statement Labels:_ Enable Date Time Stamp: N FILE RECOVERY OPTIONS FRCVOPT X' 00 ' Disable Transaction Backout: _ No Rollforward (RF): _ No RF Logging: _ No Checkpoint (CK) Logging: _ No Updates Without RF Logging: _ No Updates Without CK Logging:_ All Updates Applied During RF: _ No Discontinuities Allowed: _ Format File During CREATE: Y Verify Disk Updates: N ===> 1=HELp 2= 3=QUIt 4=FIElds 5=WIDen 6=COMmands 7= 8=FORward 9=SIZe 10= 11= 12=END

You use the File Definition - Organization screen to name a new file and to specify file organization parameters. When this screen is displayed for a file for the first time, the standard Model 204 default values for the parameters are used.

Model 204 default values are supplied for any parameters for which you do not fill in values.

You select options from the choices on the screen, and FILEMGMT uses your selections to compute appropriate values for the Model 204 FILEMODL, FILEORG, FOPT, and FRCVOPT parameters.

  1. In the Filename input field, enter the name of the file that you are creating.

    The name can be as many as eight characters long (7 for DOS systems). The file name cannot be FILE or GROUP and cannot start with CCA (except for CCASYS), SYS, OUT, TAPE, or a number. It can contain only uppercase letters, numbers, and the following special characters:

    • At sign (@)
    • Pound sign (#)
    • Dollar sign ($) (alternately displayed as £)
  2. The FICREATE input field displays the Model 204 version number for the file that you are creating. FILEMGMT uses FICREATE to calculate the file size and validate certain Model 204 file features. Enter a different version number if needed.
  3. The LANGUAGE input field displays the language of the file that you are creating (set by the LANGFILE parameter). The default is U.S. English. Enter a different language if needed.
  4. Change the Active/Inactive default value as needed.

    The Active/Inactive input field specifies how the commands in your file will be processed when you execute commands from the Execute Commands screen.

    Active or inactive indicates the mode you selected on the Organization screen or last used to execute commands against the file. The file itself is referred to as active or inactive, depending on the mode in which commands for the file were last executed.

    If you have permissions to change the value, and your system supports the alternative option you choose, your entry will override the system default set by the system administrator.

    • Type A to create an Active file. The commands will be executed immediately (upon verifying your permissions) or later in a batch file. Select the active execution mode if you choose to transform the file to current release format. Set FICREATE to the current release number.
    • Type I to create an Inactive file. The commands will be generated and stored in separate files for later execution.

      Active and inactive options are described in Execution options and Execute Commands screen.

  5. In the Opt Fld Ext (optimized field extract) input field, enter Y to add a length byte to every non-preallocated (or non-OCCURS) field, which could result in faster field extraction. The improvement is most noticeable when you have built records with a large number of fields. Entering Y sets FILEORG to X'80'.

    The default is N: non-preallocated (or non-OCCURS) fields that are type FLOAT, CODED, and BINARY are not stored with a preceding length byte. See Preallocated fields for more information on preallocated and non-preallocated fields.

  6. In the RFG input field, enter Y to enable repeating field groups. Repeating field groups, available in Model 204 version 7.5, let you view and process groups of fields as a logical entity. Files with repeating field groups can have up to 32,000 fields. For more information, see Field group (File architecture).

    Entering Y sets FILEORG to X'100'. Note that the FILEORG X'100' attributes (such as CHUNK, DATETIME, and so on) are not currently supported by FILEMGMT.

  7. In the LG Files input field, enter Y to enable support for large files. Large files, available in Model 204 version 7.5, can hold up to 48 million records. Entering Y sets FILEORG to X'200'.
  8. In the FILE ORGANIZATION section, select file organization characteristics for the specified file. FILEMGMT computes the Model 204 FILEORG parameter from your selections and displays the computed value. See File design for details on the advantages and disadvantages of each file organization type.
    1. Select one of the following options:
      Option Parameter value Description
      Entry FILEORG X'00' Records are stored in the file in the order in which they are entered. You cannot reorder records or reuse the record numbers of deleted records. Entry is the default file organization.
      Sorted FILEORG X'01' Records are stored in the file in order by the sort key that you specify. Sorted is less efficient than the other options and is not recommended.
      Hash FILEORG X'08' Records are stored in the file in order by the hash key that you specify.
      Unordered FILEORG X'20' Records are stored in the file in the order in which they are entered. You can reorder records and reuse the record numbers of deleted records.
    2. A record is stored on a page if there is sufficient space (as determined by the BREUSE parameter) and if there is an unused record number.

      In the Reuse Record Numbers input field, enter Y or N.

      Available with Unordered, Hash, or Sorted file organization. Select Reuse Record Numbers if you want the record numbers of deleted records to be reused for new records added, provided that the record number is available on the Table B page to which the new record is being added. Selecting Reuse Record Numbers sets the FILEORG X'04' bit.

    3. Enter a Sort or Hash key, if applicable.

      If you have selected Hash or Sorted as the file organization, enter the name of the sort or hash key field. The entry must be a valid Model 204 field name (1-70 characters). The requirements for a valid field name are described in Field name rules. The sort or hash key field must exist in every record in the file.

      If you have selected the Entry or Unordered file organization option, leave Sort/Hash Key blank.

    4. In the Req Every Rec input field:

      If you have selected Hash or Sorted as the file organization, enter X to place a hash key (for hashed files) or a sort key (for sorted files) on every record. This option is required for hashed or sorted files because a key on every record is needed to process the file correctly. This option sets the FILEORG X'02' bit.

      If you have selected the Entry or Unordered file organization option, leave Req Evry Rec blank.

    5. Leave the Enable Skewing input field blank. Skewing is an obsolete method of physical storage that was designed to improve efficiency during sequential searches. An X would indicate that blocks within a track were stored in a skewed order.
    6. Select the following Auto Increase options as needed. See File size calculation in detail for details.
      • Table B Auto Incr Pages: If you want Model 204 to automatically increase Table B when it becomes full, enter the number of pages to increase Table B by. This sets the parameter BAUTOINC to the specified value.
      • Table D Auto Incr Pages: If you want Model 204 to automatically increase Table D when it becomes full, enter the number of pages to increase Table D by. This sets the parameter DAUTOINC to the specified value.
      • Table X Auto Incr Pages: If you want Model 204 to automatically increase Table X when it becomes full, enter the number of pages to increase Table X by. This sets the parameter XAUTOINC to the specified value. To use Table X:

        The file must have been created in Model 204 version 7.1.0 or later.

        The file must have an organization type of Entry or Unordered.

  9. File Models: A file model is a set of default file and field attributes. Rocket Software recommends that you use the default setting.
  10. In the FILE OPTIONS section, select the characteristics of the file you are creating. FILEMGMT computes the Model 204 FOPT parameter from your selections and displays the computed value.
    Disable Lock Pending Updates Transaction back out locks an update until the transaction is committed, allowing an update to be backed out prior to the commit if for any reason the transaction does not finish. By disabling Lock Pending Updates, the feature Transaction back out is also disabled (Disable Transaction Backout must also be selected). If Disable lock pending updates is selected, incomplete transactions may be present in the file which may result in a file that is logically inconsistent. (FOPT=X'02')

    The default is null.

    Only FM Defines New Fields This option prevents the DEFINE FIELD command from being issued without using the FILEMGMT facility. The purpose of this option is to maintain the integrity of the dictionary. By using the FILEMGMT facility to define fields, the relationship between a file, the records in the file and the fields and their relationship to the file and the records within the file is automatically maintained in the Dictionary. (FOPT=X'01')

    The default is that new fields can be defined outside of FILEMGMT on the command line.

    No Procedure Statement Numbers Selecting this option prevents any procedures from being stored in the file which use statement numbers. Using statement numbers is an obsolete way of coding a User Language procedure which is difficult to understand. If this file is being used to store procedures, select this option in order to enforce proper coding standards. (FOPT=X'80')
    No Procedure Statement Labels Selecting this option prevents any procedures from being stored in the file which use statement labels. Statement labels are the proper way to code a User Language procedure. If this file will be used for storing procedures, enter N or leave the input field blank. Otherwise, enter Y if you want to prohibit procedure statement labels from being assigned to procedure lines. (FOPT=X'40')
    Enable Date Time Stamp The Date Time Stamp is an additional field within the file which tracks changes to a file at the record level and records the date and time of each update to a record. (FOPT=X'10') For details, see Overview of the date-time stamp feature.

    To use the date-time stamp:

    • The file must be an LPU file.
    • The date/time stamp field specified in the DTSFN= system parameter must have already been defined to the file. For details, see Enabling date-time stamp updates.
  11. In the FILE RECOVERY OPTIONS section, select file recovery options for the file. FILEMGMT computes the Model 204 FRCVOPT parameter from your selections and displays the computed value.

    By default, recovery features are enabled. In an online environment, using the default options is recommended so that the file can participate in recovery if the system crashes.

    You might want to turn off recovery options if you are running a batch job that does not need to incur the overhead of recording information for recovery. FILEMGMT provides options to turn off specific recovery features, as described below.

    See File integrity and recovery for details about these options.

    Disable Transaction Backout File does not use the Model 204 transaction back out feature. This option is required if Disable Lock Pending Updates is selected.

    Transaction back out is a feature that will back out an update if the update does not complete as intended. This feature maintains the logical integrity of the file by ensuring that if the commit for an update is not executed, the update will not be kept.

    The default is null.

    (FRCVOPT=X'08')

    No Rollforward (RF) File does not use the roll forward facility of the RESTART command. The default is null. This option prevents the updates from the file from being processed during roll forward. If this option is selected, the file will not participate in roll forward when the system performs recovery.

    (FRCVOPT=X'02')

    No RF Logging Model 204 does not log changes to the journal file. The default is null. Roll Forward logging is the recording of updates from a file that are then used to apply updates when recovery is run. Selecting this option prevents the file from being able to use recovery.

    (FRCVOPT=X'04')

    No Checkpoint (CK) Logging Model 204 does not log checkpoint information to the checkpoint data set. The default is null.

    Checkpoint logging is the process of capturing the contents of a record before an update is made. If checkpoint logging is not active, the file cannot participate in recovery.

    (FRCVOPT=X'20')

    No Updates without RF Logging File is not updated unless roll forward logging is active. The default is null.

    Selecting this option requires that a journal be defined in the environment in which updates are made to the file. If a journal is not available, updates will not be allowed. If updates are made using a batch job, selecting this option will require that the batch job have a journal defined to it that will allow roll forward logging to be performed.

    (FRCVOPT=X'80')

    No Updates Without CK Logging File is not updated unless checkpoint logging is active.The default is null.

    This option requires that a checkpoint data set be defined to the run. Updates will not be allowed unless a checkpoint data set is present. If updates are made using a batch job, the job must have a checkpoint data set.

    (FRCVOPT=X'40')

    All Updates Applied During RF All updates to the file are applied when the file is rolled forward. The default is null.

    This option will apply all updates during roll forward and not back out any incomplete update transactions. This option can only be used if Transaction back out (TBO) is turned off. This can be useful if a large number of updates are made without a commit being issued. It is suggested that after recovery has been run against a file with this option that a REORG be run against this file to ensure that the data and the indexes are in sync.

    (FRCVOPT=X'09')

    No Discontinuities Allowed Only updates that do not result in discontinuities are applied to the file. The default is null.

    A discontinuity is an event that cannot be rolled back past during recovery. It will process the file using the discontinuity as a checkpoint for roll back and roll forward recovery. Essentially, a discontinuity creates a checkpoint for the file in question at the point in time when the discontinuity occurs. There is really no reason not to allow discontinuities.

    (FRCVOPT=X'10')

  12. Format File During CREATE: FILEMGMT formats the file during file creation. Valid values are Y and N. Rocket Software recommends that you use the default value, Y, in order to maintain file integrity.
  13. Verify Disk Updates: FILEMGMT verifies all updates made to the file during file creation. Valid values are Y and N. Rocket Software recommends that you use the default value, N. The computer does its own verification of disk updates, so this option is no longer necessary and likely to cause overhead.

Recreating files

A file recreate is necessary if, for example, you want to increase a table size that cannot be increased in the existing file. Recreating a file deletes all the data and procedures in the file, but leaves the field, record, and field group definitions intact. To preserve the data and procedures, you must dump or display the files and procedures. You cannot recreate a file from the primary screen, which has entities staged with commands.

To recreate a file:

Select the File Maintenance Recreate function from one of the following:

  • Primary screen if the file is an existing file.
  • File Size Definition screen if the file is existing or staged, and if the sizing calculations show some tables are so large that the file needs to be recreated. (See Sizing an existing file.)

When you select the Recreate function, FILEMGMT creates a version of all field, record, and field group definitions and stages them for DEFINE. The steps for recreating a file are thereafter similar to the steps for creating a file described in Overview of creating files.

The Recreate function uses the same Definition screens as the CREATE function.

You can select the Size function to resize the file after you redefine the file on the Definition screens.