File creation overview: Difference between revisions
mNo edit summary |
No edit summary |
||
Line 6: | Line 6: | ||
</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, but route and run them 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>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 them 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>Regardless, the two methods described below are similar:</p> | |||
====Notes==== | ====Notes==== | ||
<p> </p> | <p> </p> | ||
Line 12: | Line 13: | ||
<li>Dictionary/204 and its subsystems must use FILEMGMT.</li> | <li>Dictionary/204 and its subsystems must use FILEMGMT.</li> | ||
</ul> | </ul> | ||
<p>For details on the CREATE command syntax, see [[ Creating Files Manually#Creating Files Manually|Creating Files Manually]]. For details on using the File Management subsystem facility, see [[ Creating a File with FILEMGMT#Creating a File with FILEMGMT|Creating a File with FILEMGMT]] .</p> | <p>For details on the [[CREATE command: File|CREATE command]] syntax, see [[ Creating Files Manually#Creating Files Manually|Creating Files Manually]]. For details on using the File Management subsystem facility, see [[ Creating a File with FILEMGMT#Creating a File with FILEMGMT|Creating a File with FILEMGMT]] .</p> | ||
==File creation process - with FILEMGMT== | ==File creation process - with FILEMGMT== | ||
<p>Adding a <var class="product">Model 204</var> file to the database includes the following steps. Each step lists the alternative options of performing the operation manually and using the FILEMGMT interface.</p> | <p>Adding a <var class="product">Model 204</var> file to the database includes the following steps. Each step lists the alternative options of performing the operation manually and using the FILEMGMT interface.</p> | ||
Line 34: | Line 35: | ||
</ol> | </ol> | ||
==File creation process - manual== | ==File creation process - manual== | ||
<p>Adding a <var class="product">Model 204</var> file to the database includes the following steps:</p> | <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 ([[FILEORG parameter|FILEORG]]) and recovery ([[FRCVOPT parameter|FRCVOPT]]) parameters for the [[CREATE command: File|CREATE command]].</li> | ||
<li>Define the file security with the CREATE command file security (OPENCTL) parameter.</li> | <li>Define the file security with the CREATE command file security ([[OPENCTL parameter|OPENCTL]]) parameter.</li> | ||
<li>For procedure files, calculate the Table D procedure dictionary size as described in [[ File Size Calculation#Sizing Table D|Sizing Table D]].</li> | <li>For procedure files, calculate the Table D procedure dictionary size as described in [[ File Size Calculation#Sizing Table D|Sizing Table D]].</li> | ||
<li>For data files, define the fields and their attributes using the DEFINE FIELD 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#File Size Calculation|File Size Calculation]] .</li> | <li>Size the file and its tables by calculate the table sizes manually as described in [[ File Size Calculation#File Size Calculation|File Size Calculation]] .</li> | ||
<li>Run the CREATE command.</li> | <li>Run the [[CREATE command: File|CREATE command]].</li> | ||
<li>Run the INITIALIZE command.</li> | <li>Run the [[INITIALIZE command]].</li> | ||
</ol> | </ol> | ||
<p> </p> | <p> </p> | ||
[[Category:File manager]] | [[Category:File manager]] | ||
[[Category:File management]] | [[Category:File management]] |
Revision as of 00:38, 22 April 2013
To create a file, you must have superuser privileges.
You can create a Model 204 file in either of the following ways:
- Using the Dictionary/204 File Management Subsystem Facility, FILEMGMT. (See Dictionary/204 File Management Subsystem facility for an overview of FILEMGMT.)
- Entering the 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 them 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, the two methods described below are similar:
Notes
- 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.
For details on the CREATE command syntax, see Creating Files Manually. For details on using the File Management subsystem facility, see Creating a File with FILEMGMT .
File creation process - with FILEMGMT
Adding a Model 204 file to the database includes the following steps. Each step lists the alternative options of performing the operation manually and using the FILEMGMT interface.
- Define the file organization (FILEORG) and recovery (FRCVOPT) 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, defining 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.
- Initializing the file:
- Run the INITIALIZE command, OR
- Initialize the file in FILEMGMT using the Initialize File screen.
File creation process - manual
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 .
- Run the CREATE command.
- Run the INITIALIZE command.