File creation overview: Difference between revisions
No edit summary |
|||
(11 intermediate revisions by 5 users not shown) | |||
Line 2: | Line 2: | ||
<p>You can create a <var class="product">Model 204</var> file in either of the following ways:</p> | <p>You can create a <var class="product">Model 204</var> file in either of the following ways:</p> | ||
<ul> | <ul> | ||
<li>Using the | <li>Using FILEMGMT, the [[File management overview#Dictionary/204 File Management Subsystem facility|Dictionary/204 File Management Subsystem facility]]. </li> | ||
<li> | |||
<li>Manually, that is, entering the Model 204 <var>CREATE</var> command on the command line or in a procedure that you create.</li> | |||
</ul> | </ul> | ||
<p>Of course, given the option to route the output of a FILEMGMT session to a sequential file or as procedure code, you can get the best of both worlds: for ease of use and to avoid errors, use FILEMGMT to generate the changes | <p> | ||
= | Of course, given the option to route the output of a FILEMGMT session to a sequential file or as procedure code, you can get the best of both worlds: for ease of use and to avoid errors, use FILEMGMT to generate the changes. But route and run the changes from a procedure so you have a history of the specific changes run and so that the changes are reproducible (between a test and production environment, for example). </p> | ||
<p> | <p> | ||
Regardless, these two methods are similar. Their descriptions in the sections below contain the same seven operational steps but represent alternative ways of performing the operations. </p> | |||
<blockquote class="note"> | |||
<p><b>Note:</b> </p> | |||
<ul> | <ul> | ||
<li>You cannot use FILEMGMT to create a file group or in-memory files (but you can route the output to a procedure, where the in-memory definition can be then set up).</li> | <li>You cannot use FILEMGMT to create a file group or in-memory files (but you can route the output to a procedure, where the in-memory definition can be then set up).</li> | ||
<li>Dictionary/204 and its subsystems must use FILEMGMT.</li> | <li>Dictionary/204 and its subsystems must use FILEMGMT.</li> | ||
</ul> | </ul> | ||
</blockquote> | |||
==File creation | |||
<p>Adding a <var class="product">Model 204</var> file to the database includes the following steps. | ==File creation using FILEMGMT== | ||
<p> | |||
Adding a <var class="product">Model 204</var> file to the database using the FILEMGMT interface includes the following steps. For details on using the File Management subsystem facility, see [[Creating a file with FILEMGMT]].</p> | |||
<ol> | <ol> | ||
<li>Define the file organization (FILEORG) and recovery (FRCVOPT) options using the File Definition - Organization screen.</li> | <li>Define the file organization (<var>FILEORG</var> parameter) and recovery (<var>FRCVOPT</var> parameter) options using the File Definition - Organization screen.</li> | ||
<li>Define the file security by specifying the OPENCTL parameter values on the File Definition - Security screen.</li> | |||
<li>Define the file security by specifying the <var>OPENCTL</var> parameter values on the File Definition - Security screen.</li> | |||
<li>For procedure files, define the Table D procedure dictionary size requirements on the File Definition - Procedure screen.</li> | <li>For procedure files, define the Table D procedure dictionary size requirements on the File Definition - Procedure screen.</li> | ||
<li>For data files, | |||
<li>For data files, define fields and their attributes: | |||
<ul> | <ul> | ||
<li>Define fields in FILEMGMT using the Field Name List and Field Attributes screens.</li> | <li>Define fields in FILEMGMT using the Field Name List and Field Attributes screens.</li> | ||
</ul> | </ul></li> | ||
<li>Size the file and its tables on the File Size Definition screen.</li> | <li>Size the file and its tables on the File Size Definition screen.</li> | ||
<li>Run the <var>CREATE</var> command using the Execute Commands screen.</li> | |||
<li>Do either of the following to initialize the file: | |||
<ul> | <ul> | ||
<li>Run the | <li>Run the <var>INITIALIZE</var> command.</li> | ||
</ | <li>Use the FILEMGMT Initialize File screen.</li> | ||
<li> | |||
</ul> | </ul> | ||
</ol> | </ol> | ||
== | |||
<p>Adding a <var class="product">Model 204</var> file to the database includes the following steps:</p> | ==Manual file creation== | ||
<p> | |||
Adding a <var class="product">Model 204</var> file to the database includes the following steps (note that it is recommended that these steps be incorporated into a procedure so that the process can be easily run multiply times if some of the parameters require adjusting):</p> | |||
<ol> | <ol> | ||
<li>Define the file organization (FILEORG) and recovery (FRCVOPT) parameters for the CREATE command.</li> | <li>Define the file organization (<var>[[FILEORG parameter|FILEORG]]</var>) and recovery (<var>[[FRCVOPT parameter|FRCVOPT]]</var>) parameters for the <var>[[Creating a file#CREATE command|CREATE]]</var> command.</li> | ||
<li>Define the file security with the CREATE command file security (OPENCTL) parameter.</li> | |||
<li>For procedure files, calculate the Table D procedure dictionary size as described in [[ File | <li>Define the file security with the <var>CREATE</var> command file security (<var>[[OPENCTL parameter|OPENCTL]]</var>) parameter.</li> | ||
<li>For data files, define the fields and their attributes using the DEFINE FIELD command.</li> | |||
<li>Size the file and its tables by calculate the table sizes manually as described in [[ File | <li>For procedure files, calculate the Table D procedure dictionary size as described in [[File size calculation in detail#Sizing Table D|Sizing Table D]].</li> | ||
<li>Run the CREATE command.</li> | |||
<li>Run the INITIALIZE command.</li> | <li>For data files, define the fields and their attributes using the [[DEFINE FIELD command]].</li> | ||
<li>Size the file and its tables by calculate the table sizes manually as described in [[File size calculation in detail]].</li> | |||
<li>Run the <var>CREATE</var> command.</li> | |||
<li>Run the <var>[[INITIALIZE command|INITIALIZE]]</var> command.</li> | |||
</ol> | </ol> | ||
[[Category: | [[Category:Model 204 files]] | ||
Latest revision as of 22:24, 13 April 2015
To create a file, you must have superuser privileges.
You can create a Model 204 file in either of the following ways:
- Using FILEMGMT, the Dictionary/204 File Management Subsystem facility.
- Manually, that is, entering the Model 204 CREATE command on the command line or in a procedure that you create.
Of course, given the option to route the output of a FILEMGMT session to a sequential file or as procedure code, you can get the best of both worlds: for ease of use and to avoid errors, use FILEMGMT to generate the changes. But route and run the changes from a procedure so you have a history of the specific changes run and so that the changes are reproducible (between a test and production environment, for example).
Regardless, these two methods are similar. Their descriptions in the sections below contain the same seven operational steps but represent alternative ways of performing the operations.
Note:
- You cannot use FILEMGMT to create a file group or in-memory files (but you can route the output to a procedure, where the in-memory definition can be then set up).
- Dictionary/204 and its subsystems must use FILEMGMT.
File creation using FILEMGMT
Adding a Model 204 file to the database using the FILEMGMT interface includes the following steps. For details on using the File Management subsystem facility, see Creating a file with FILEMGMT.
- Define the file organization (FILEORG parameter) and recovery (FRCVOPT parameter) options using the File Definition - Organization screen.
- Define the file security by specifying the OPENCTL parameter values on the File Definition - Security screen.
- For procedure files, define the Table D procedure dictionary size requirements on the File Definition - Procedure screen.
- For data files, define fields and their attributes:
- Define fields in FILEMGMT using the Field Name List and Field Attributes screens.
- Size the file and its tables on the File Size Definition screen.
- Run the CREATE command using the Execute Commands screen.
- Do either of the following to initialize the file:
- Run the INITIALIZE command.
- Use the FILEMGMT Initialize File screen.
Manual file creation
Adding a Model 204 file to the database includes the following steps (note that it is recommended that these steps be incorporated into a procedure so that the process can be easily run multiply times if some of the parameters require adjusting):
- Define the file organization (FILEORG) and recovery (FRCVOPT) parameters for the CREATE command.
- Define the file security with the CREATE command file security (OPENCTL) parameter.
- For procedure files, calculate the Table D procedure dictionary size as described in Sizing Table D.
- For data files, define the fields and their attributes using the DEFINE FIELD command.
- Size the file and its tables by calculate the table sizes manually as described in File size calculation in detail.
- Run the CREATE command.
- Run the INITIALIZE command.