FPARMS and TABLES file parameters: Difference between revisions
mNo edit summary |
|||
(13 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
==Overview== | ==Overview== | ||
<p>Associated with each file are a number of parameters that determine its structure, define its privileges, and keep track of its status and usage. The categories of file parameters are:</p> | <p> | ||
Associated with each file are a number of parameters that determine its structure, define its privileges, and keep track of its status and usage. The categories of file parameters are:</p> | |||
<table> | <table> | ||
<tr class="head"> | <tr class="head"> | ||
Line 6: | Line 7: | ||
<th>Meaning</th> | <th>Meaning</th> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>FPARMS</td> | <td>FPARMS</td> | ||
<td>File characteristics parameters summarize the organization, status, privileges, and field level security levels associated with the file.</td> | <td>File characteristics parameters summarize the organization, status, privileges, and field level security levels associated with the file.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>TABLES</td> | <td>TABLES</td> | ||
Line 15: | Line 18: | ||
</tr> | </tr> | ||
</table> | </table> | ||
<p>This | <p> | ||
This page describes how to view, display, and set file parameters. For a listing of all the <var class="product">Model 204</var> parameters, see [[List of Model 204 parameters]].</p> | |||
==File parameter access== | ==File parameter access== | ||
<p>The ability to access the file-related parameters described in this | <p> | ||
<p>If the X'0001' | The ability to access the file-related parameters described in this page is a privilege under the control of the <var>[[PRIVDEF parameter|PRIVDEF]]</var> parameter. A file manager or system manager can restrict access to the file parameters of sensitive files to qualified users only. </p> | ||
< | <p> | ||
<p>You can access file-related parameters through a command (VIEW or DISPLAY FILE), a | If the X'0001' bit of <var>PRIVDEF</var> is on, the user can access the file-related parameters. If it is off, the user cannot access these parameters. </p> | ||
==Using the VIEW command== | <p> | ||
<p>You can | The <var>[[CURFILE parameter|CURFILE]]</var> parameter is unaffected by the <var>PRIVDEF</var> setting. </p> | ||
<p> | |||
<p class=" | You can access file-related parameters through a command (<var>VIEW</var> or <var>DISPLAY FILE</var>), a SOUL function (<var>$VIEW</var>), or a Host Language function (<var>IFDISP</var> or <var>IFEPRM</var>). Trying to access parameters without the correct privilege generates an error message from <var>VIEW</var> or <var>DISPLAY FILE</var>; <var>$VIEW</var> returns a null string, and <var>IFEPRM</var> produces a return code of 4. </p> | ||
===Using the VIEW command=== | |||
<p> | |||
You can display the file characteristics or table parameters with the following <var>VIEW</var> command options:</p> | |||
<p class="syntax">VIEW {FPARMS | TABLES} | |||
</p> | </p> | ||
<p> | |||
<p> | You can view individual file parameters as shown in the following example: </p> | ||
<p class="code">VIEW FILEORG | <p class="code"><b>> VIEW FILEORG</b> | ||
FILEORG X'03' (KEY REQUIRED,SORTED) FILE ORGANIZATION | FILEORG X'03' (KEY REQUIRED,SORTED) FILE ORGANIZATION | ||
</p> | </p> | ||
<p>You can also use the Host Language Interface function IFEPRM to examine individual parameter values, and use the | <p> | ||
<p>The FILEORG parameter is a flag parameter, that is, a parameter whose value is the sum of the individual bits or flags that compose it. When a flag parameter is viewed, <var class="product">Model 204</var> displays a phrase that indicates the individual flag settings. The parameter | You can also use the Host Language Interface function <var>IFEPRM</var> to examine individual parameter values, and use the SOUL function <var>$VIEW</var> to return the value of a parameter to a SOUL request.</p> | ||
<p>The previous FILEORG example indicates that the file is sorted (X'01') and that a sort key is required in every record (X'02'). Other file flag parameters include FISTAT, FOPT, OPENCTL, and SECTY. | <p> | ||
==Using the DISPLAY command== | The <var>FILEORG</var> parameter is a flag, or bitmap, parameter, that is, a parameter whose value is the sum of the individual bits or flags that compose it. When a flag parameter is viewed, <var class="product">Model 204</var> displays a phrase that indicates the individual flag settings. The individual parameter's description page (linked from [[List of Model 204 parameters]]) include a complete list of the flags that can be set. </p> | ||
<p>Use the DISPLAY command (or Host Language Interface function IFDISP) to display file parameters. The following form of the DISPLAY command displays all the file characteristics (FPARMS) or file table (TABLES) parameters for the specified files or all the files the user has open:</p> | <p> | ||
The previous <var>FILEORG</var> example indicates that the file is sorted (X'01') and that a sort key is required in every record (X'02'). Other file flag parameters include <var>FISTAT</var>, <var>FOPT</var>, <var>OPENCTL</var>, and <var>SECTY</var>. </p> | |||
<p class="code">DISPLAY FILE {(FPARMS) | (TABLES)} | |||
===Using the DISPLAY command=== | |||
<p> | |||
Use the <var>DISPLAY</var> command (or Host Language Interface function <var>IFDISP</var>) to display file parameters. The following form of the <var>DISPLAY</var> command displays all the file characteristics (<var>FPARMS</var>) or file table (<var>TABLES</var>) parameters for the specified files or all the files the user has open:</p> | |||
<p class="code">DISPLAY FILE {(FPARMS) | (TABLES)} {<var class="term">filename</var>[,<var class="term">filename</var>...] | ALL} | |||
</p> | </p> | ||
<p>Both FPARMS and TABLES can be specified in the same command. The DEFINITIONS option of DISPLAY also includes both types of file parameters. For further description of the DISPLAY options and capabilities, refer to [[ Defining | <p> | ||
Both <var>FPARMS</var> and <var>TABLES</var> can be specified in the same command. The <var>DEFINITIONS</var> option of <var>DISPLAY</var> also includes both types of file parameters. For further description of the <var>DISPLAY</var> options and capabilities, refer to [[Defining fields manually]] and to [[DISPLAY command]].</p> | |||
==Setting file parameters== | ==Setting file parameters== | ||
<p>Some of the file parameters are view-only parameters; that is, you can examine them but not change them. Other parameters can be set only during file creation. You can specify the new value of the parameter in a PARAMETER statement that follows the CREATE command. (Refer to the description of file creation in [[ Creating | <p> | ||
<p>You can reset some of the file parameters at any time using the RESET command | Some of the file parameters are view-only parameters; that is, you can examine them but not change them. Other parameters can be set only during file creation. You can specify the new value of the parameter in a <var>PARAMETER</var> statement that follows the <var>CREATE</var> command. (Refer to the description of file creation in [[Creating a file]].) Other parameters can be set only during file initialization. You can specify the value of the parameter in the <var>INITIALIZE</var> command (see [[Initializing files]]). </p> | ||
<p class="code"><var> | <p> | ||
You can reset some of the file parameters at any time using the <var>[[RESET command|RESET]]</var> command. For example:</p> | |||
<p class="code">RESET BRESERVE=50 </p> | |||
<p> | |||
You must have ad hoc update privileges in order to reset file parameters. </p> | |||
<p> | |||
If a parameter that has a minimum value is set to a value less than the minimum allowed, <var class="product">Model 204</var> sets the parameter to the minimum value and displays the following message:</p> | |||
<p class="code">*** M204.1149: <var class="term">parameter</var> HAS BEEN SET TO ITS MINIMUM VALUE:<var class="term">value</var> | |||
</p> | </p> | ||
< | <p> | ||
If a parameter that has a maximum value is set to a value greater than the maximum allowed, <var class="product">Model 204</var> sets the parameter to the maximum value and displays the following message:</p> | |||
<p class="code">*** M204.1149: <var class="term">parameter</var> HAS BEEN SET TO ITS MAXIMUM VALUE:<var class="term">value</var> | |||
<p class="code" | |||
</p> | </p> | ||
==File characteristics parameters (FPARMS)== | ==File characteristics parameters (FPARMS)== | ||
<p>File characteristics parameters describe the status and organization of a <var class="product">Model 204</var> file and the privileges associated with the file.</p> | <p> | ||
==Viewing file characteristics parameters== | File characteristics parameters describe the status and organization of a <var class="product">Model 204</var> file and the privileges associated with the file.</p> | ||
<p>To view parameters in the file characteristics category: </p> | |||
===Viewing file characteristics parameters=== | |||
<p class="code" | <p> | ||
To view parameters in the file characteristics category, enter the following command:</p> | |||
<p class="code">VIEW FPARMS | |||
</p> | </p> | ||
<p>Only the file manager can set file parameters (except for those that cannot be set). CURFILE is included in both | <p> | ||
Only the file manager can set file parameters (except for those that cannot be set). <var>CURFILE</var> is included in both the <var>FPARMS</var> parameters and also in the file table parameters (<var>TABLES</var>). </p> | |||
===View-only FPARMS=== | ===View-only FPARMS=== | ||
<p>The following FPARMS parameters cannot be set:</p> | <p> | ||
The following <var>FPARMS</var> parameters cannot be set:</p> | |||
< | :<var>CURFILE</var> | ||
< | :<var>CURLOC</var> | ||
< | :<var>FICREATE</var> | ||
:<var>FIFLAGS</var> | |||
< | :<var>FIFORMAT</var> | ||
:<var>FITRANS</var> | |||
< | :<var>SECTY</var> | ||
< | |||
< | |||
===FPARMS set during file creation=== | ===FPARMS set during file creation=== | ||
<p>The following parameters can be set during file creation:</p> | <p> | ||
The following parameters can be set during file creation:</p> | |||
< | :<var>FILEORG</var> | ||
< | :<var>IVERIFY</var> | ||
< | :<var>LANGFILE</var> | ||
===Resettable FPARMS set by Model 204=== | ===Resettable FPARMS set by Model 204=== | ||
<p>The following parameter is set by <var class="product">Model 204</var> and can be reset by the | <p> | ||
The following parameter is set by <var class="product">Model 204</var> and can be reset by the File Manager:</p> | |||
< | |||
:<var>FISTAT</var> | |||
===Resettable FPARMS set during file creation=== | ===Resettable FPARMS set during file creation=== | ||
<p>The following parameters can be set during file creation and can be reset by the | <p> | ||
The following parameters can be set during file creation and can be reset by the File Manager:</p> | |||
< | :<var>ADDLVL</var> | ||
< | :<var>FILEMODL</var> | ||
< | :<var>FOPT</var> | ||
:<var>FRCVOPT</var> | |||
:<var>OPENCTL</var> | |||
< | :<var>PRCLDEF</var> | ||
< | |||
:<var>PRIVDEF</var> | |||
:<var>READLVL</var> | |||
< | :<var>SELLVL</var> | ||
:<var>UPDTLVL</var> | |||
< | :<var>VERIFY</var> | ||
< | ===Non-resettable FPARMS set during file initialization=== | ||
< | <p> | ||
The following parameters are set during file initialization (the <var>[[INITIALIZE command|INITIALIZE]]</var> command), if applicable, and cannot be reset:</p> | |||
< | :<var>HASHKEY</var> | ||
:<var>RECSCTY</var> | |||
< | :<var>SORTKEY</var> | ||
=== | |||
<p>The following parameters are set during file initialization (the INITIALIZE command), if applicable, and cannot be reset:</p> | |||
< | |||
< | |||
< | |||
==File table parameters (TABLES)== | ==File table parameters (TABLES)== | ||
<p>File table parameters describe the characteristics of the various tables that make up a <var class="product">Model 204</var> file. </p> | <p> | ||
==Viewing file table parameters== | File table parameters describe the characteristics of the various tables that make up a <var class="product">Model 204</var> file. </p> | ||
<p>To view parameters in the file table category: </p> | |||
===Viewing file table parameters=== | |||
<p class="code" | <p> | ||
< | To view parameters in the file table category, enter the following command: </p> | ||
<p class="code">VIEW TABLES </p> | |||
==View-only TABLES parameters== | <p> | ||
<p>The following TABLES parameters cannot be set:</p> | Only the File Manager can set the file table parameters (except for those that cannot be set). <var>CURFILE</var> is included in this category and also in <var>FPARMS</var>. </p> | ||
===View-only TABLES parameters=== | |||
<p> | |||
The following <var>TABLES</var> parameters cannot be set:</p> | |||
<table> | <table> | ||
<tr> | <tr> | ||
Line 154: | Line 157: | ||
<td>DHIGHPG</td> | <td>DHIGHPG</td> | ||
<td>HIGHSORT</td> | <td>HIGHSORT</td> | ||
<td> | <td>OINENTRY</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>ASIZE</td> | <td>ASIZE</td> | ||
Line 162: | Line 166: | ||
<td>OVFLADD</td> | <td>OVFLADD</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>BHIGHPG</td> | <td>BHIGHPG</td> | ||
Line 168: | Line 173: | ||
<td>OVFLDEL</td> | <td>OVFLDEL</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>BLOWPG</td> | <td>BLOWPG</td> | ||
<td>EOVFLADD</td> | <td>EOVFLADD</td> | ||
<td> | <td>OIDEPTH</td> | ||
<td>SPILLADD</td> | <td>SPILLADD</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>BQLEN</td> | <td>BQLEN</td> | ||
Line 180: | Line 187: | ||
<td>SPILLDEL</td> | <td>SPILLDEL</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>BREUSED</td> | <td>BREUSED</td> | ||
<td>EPGSUSED</td> | <td>EPGSUSED</td> | ||
<td> | <td>OILPACT</td> | ||
<td>XHIGHPG</td> | <td>XHIGHPG</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>CRETRIES</td> | <td>CRETRIES</td> | ||
<td>EXTNADD</td> | <td>EXTNADD</td> | ||
<td> | <td>OINBYTES</td> | ||
<td>XQLEN</td> | <td>XQLEN</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>CURFILE</td> | <td>CURFILE</td> | ||
<td>EXTNDEL</td> | <td>EXTNDEL</td> | ||
<td> | <td>OINODES</td> | ||
<td>XREUSED</td> | <td>XREUSED</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>DACTIVE</td> | <td>DACTIVE</td> | ||
Line 205: | Line 216: | ||
</tr> | </tr> | ||
</table> | </table> | ||
==TABLES parameters set during file creation== | |||
<p>The following parameters can be set during file creation:</p> | ===TABLES parameters set during file creation=== | ||
<p> | |||
The following parameters can be set during file creation:</p> | |||
<table> | <table> | ||
<tr> | <tr> | ||
<td>ASTRPPG</td> | <td>ASTRPPG</td> | ||
<td>BSIZE | <td>BSIZE </td> | ||
<td>PDSIZE</td> | <td><var>[[PDSIZE parameter|PDSIZE]]</var></td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>ATRPG</td> | <td>ATRPG</td> | ||
Line 218: | Line 232: | ||
<td>PDSTRPPG</td> | <td>PDSTRPPG</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>BEXTOVFL</td> | <td>BEXTOVFL</td> | ||
Line 223: | Line 238: | ||
<td>RECPDOPT</td> | <td>RECPDOPT</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>BPGPMSTR</td> | <td>BPGPMSTR</td> | ||
Line 228: | Line 244: | ||
<td>XRECPPG</td> | <td>XRECPPG</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>BPGPOVFL</td> | <td>BPGPOVFL</td> | ||
Line 233: | Line 250: | ||
<td>XSIZE</td> | <td>XSIZE</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>BRECPPG</td> | <td>BRECPPG</td> | ||
Line 239: | Line 257: | ||
</tr> | </tr> | ||
</table> | </table> | ||
==Resettable TABLES parameters set during file creation== | |||
<p>The following parameters can be set during file creation and can be reset by the | ===Resettable TABLES parameters set during file creation=== | ||
<p> | |||
The following parameters can be set during file creation and can be reset by the File Manager:</p> | |||
<table> | <table> | ||
<tr> | <tr> | ||
Line 247: | Line 267: | ||
<td>XAUTOINC</td> | <td>XAUTOINC</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>BREUSE</td> | <td>BREUSE</td> | ||
Line 252: | Line 273: | ||
<td>XRESERVE</td> | <td>XRESERVE</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>BRESERVE</td> | <td>BRESERVE</td> | ||
Line 258: | Line 280: | ||
</tr> | </tr> | ||
</table> | </table> | ||
[[Category: | [[Category:Model 204 files]] | ||
Latest revision as of 19:27, 7 April 2015
Overview
Associated with each file are a number of parameters that determine its structure, define its privileges, and keep track of its status and usage. The categories of file parameters are:
Category | Meaning |
---|---|
FPARMS | File characteristics parameters summarize the organization, status, privileges, and field level security levels associated with the file. |
TABLES | File table parameters summarize information about the various tables that make up the file. |
This page describes how to view, display, and set file parameters. For a listing of all the Model 204 parameters, see List of Model 204 parameters.
File parameter access
The ability to access the file-related parameters described in this page is a privilege under the control of the PRIVDEF parameter. A file manager or system manager can restrict access to the file parameters of sensitive files to qualified users only.
If the X'0001' bit of PRIVDEF is on, the user can access the file-related parameters. If it is off, the user cannot access these parameters.
The CURFILE parameter is unaffected by the PRIVDEF setting.
You can access file-related parameters through a command (VIEW or DISPLAY FILE), a SOUL function ($VIEW), or a Host Language function (IFDISP or IFEPRM). Trying to access parameters without the correct privilege generates an error message from VIEW or DISPLAY FILE; $VIEW returns a null string, and IFEPRM produces a return code of 4.
Using the VIEW command
You can display the file characteristics or table parameters with the following VIEW command options:
VIEW {FPARMS | TABLES}
You can view individual file parameters as shown in the following example:
> VIEW FILEORG FILEORG X'03' (KEY REQUIRED,SORTED) FILE ORGANIZATION
You can also use the Host Language Interface function IFEPRM to examine individual parameter values, and use the SOUL function $VIEW to return the value of a parameter to a SOUL request.
The FILEORG parameter is a flag, or bitmap, parameter, that is, a parameter whose value is the sum of the individual bits or flags that compose it. When a flag parameter is viewed, Model 204 displays a phrase that indicates the individual flag settings. The individual parameter's description page (linked from List of Model 204 parameters) include a complete list of the flags that can be set.
The previous FILEORG example indicates that the file is sorted (X'01') and that a sort key is required in every record (X'02'). Other file flag parameters include FISTAT, FOPT, OPENCTL, and SECTY.
Using the DISPLAY command
Use the DISPLAY command (or Host Language Interface function IFDISP) to display file parameters. The following form of the DISPLAY command displays all the file characteristics (FPARMS) or file table (TABLES) parameters for the specified files or all the files the user has open:
DISPLAY FILE {(FPARMS) | (TABLES)} {filename[,filename...] | ALL}
Both FPARMS and TABLES can be specified in the same command. The DEFINITIONS option of DISPLAY also includes both types of file parameters. For further description of the DISPLAY options and capabilities, refer to Defining fields manually and to DISPLAY command.
Setting file parameters
Some of the file parameters are view-only parameters; that is, you can examine them but not change them. Other parameters can be set only during file creation. You can specify the new value of the parameter in a PARAMETER statement that follows the CREATE command. (Refer to the description of file creation in Creating a file.) Other parameters can be set only during file initialization. You can specify the value of the parameter in the INITIALIZE command (see Initializing files).
You can reset some of the file parameters at any time using the RESET command. For example:
RESET BRESERVE=50
You must have ad hoc update privileges in order to reset file parameters.
If a parameter that has a minimum value is set to a value less than the minimum allowed, Model 204 sets the parameter to the minimum value and displays the following message:
*** M204.1149: parameter HAS BEEN SET TO ITS MINIMUM VALUE:value
If a parameter that has a maximum value is set to a value greater than the maximum allowed, Model 204 sets the parameter to the maximum value and displays the following message:
*** M204.1149: parameter HAS BEEN SET TO ITS MAXIMUM VALUE:value
File characteristics parameters (FPARMS)
File characteristics parameters describe the status and organization of a Model 204 file and the privileges associated with the file.
Viewing file characteristics parameters
To view parameters in the file characteristics category, enter the following command:
VIEW FPARMS
Only the file manager can set file parameters (except for those that cannot be set). CURFILE is included in both the FPARMS parameters and also in the file table parameters (TABLES).
View-only FPARMS
The following FPARMS parameters cannot be set:
- CURFILE
- CURLOC
- FICREATE
- FIFLAGS
- FIFORMAT
- FITRANS
- SECTY
FPARMS set during file creation
The following parameters can be set during file creation:
- FILEORG
- IVERIFY
- LANGFILE
Resettable FPARMS set by Model 204
The following parameter is set by Model 204 and can be reset by the File Manager:
- FISTAT
Resettable FPARMS set during file creation
The following parameters can be set during file creation and can be reset by the File Manager:
- ADDLVL
- FILEMODL
- FOPT
- FRCVOPT
- OPENCTL
- PRCLDEF
- PRIVDEF
- READLVL
- SELLVL
- UPDTLVL
- VERIFY
Non-resettable FPARMS set during file initialization
The following parameters are set during file initialization (the INITIALIZE command), if applicable, and cannot be reset:
- HASHKEY
- RECSCTY
- SORTKEY
File table parameters (TABLES)
File table parameters describe the characteristics of the various tables that make up a Model 204 file.
Viewing file table parameters
To view parameters in the file table category, enter the following command:
VIEW TABLES
Only the File Manager can set the file table parameters (except for those that cannot be set). CURFILE is included in this category and also in FPARMS.
View-only TABLES parameters
The following TABLES parameters cannot be set:
ARETRIES | DHIGHPG | HIGHSORT | OINENTRY |
ASIZE | DPGSUSED | MSTRADD | OVFLADD |
BHIGHPG | EHIGHPG | MSTRDEL | OVFLDEL |
BLOWPG | EOVFLADD | OIDEPTH | SPILLADD |
BQLEN | EOVFLDEL | OILEAVES | SPILLDEL |
BREUSED | EPGSUSED | OILPACT | XHIGHPG |
CRETRIES | EXTNADD | OINBYTES | XQLEN |
CURFILE | EXTNDEL | OINODES | XREUSED |
DACTIVE | FREESIZE |
TABLES parameters set during file creation
The following parameters can be set during file creation:
ASTRPPG | BSIZE | PDSIZE |
ATRPG | CSIZE | PDSTRPPG |
BEXTOVFL | DSIZE | RECPDOPT |
BPGPMSTR | ESIZE | XRECPPG |
BPGPOVFL | FVFPG | XSIZE |
BRECPPG | MVFPG |
Resettable TABLES parameters set during file creation
The following parameters can be set during file creation and can be reset by the File Manager:
BAUTOINC | DAUTOINC | XAUTOINC |
BREUSE | DPGSRES | XRESERVE |
BRESERVE | DRESERVE | XREUSE |