Defining records with FILEMGMT: Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Automatically generated page update)
(Automatically generated page update)
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
==Record Definition screen==
==Record Definition screen==
<p>Press the PF11 (RECdefn) key from the Record Name List screen. FILEMGMT displays the following Record Definition screen shown.</p>
<p>
<p>Proceeding to this screen stages the records you specified on the Record Name List screen for the function you selected on the primary screen.</p>
Press the F11 (RECdefn) key from the [[Adding record definitions with FILEMGMT#Record Name List screen|Record Name List screen]]. FILEMGMT displays the following Record Definition screen.</p>
<p>
Proceeding to this screen stages the records you specified on the Record Name List screen for the function you selected on the primary screen.</p>
<table>
<table>
<tr>
<tr>
Line 10: Line 12:
Staged as:  DEFINE                          Percent Occurrence:      100.0%
Staged as:  DEFINE                          Percent Occurrence:      100.0%
                                               Table B Record Length:      53
                                               Table B Record Length:      53
   | Recordname:        | % Field  | Unique | Rectype |    Rectype Id  |
   | Recordname:        | % Field  | Unique | Rectype |    Rectype Id  |
   | EMPLOYEE            |  Occur  |  Id  |  Id    |    Data Value  | Cmd
   | EMPLOYEE            |  Occur  |  Id  |  Id    |    Data Value  | Cmd
<b></b>----------------------------------------------------------------------------
<b></b>----------------------------------------------------------------------------
_  EMPLOYEE FIRST NAME |  100    |  _    |    _    | ________________ DEF
_  EMPLOYEE FIRST NAME |  100    |  _    |    _    | _______________| DEF
_  EMPLOYEE ID        |  100    |  _    |    _    | ________________ DEF
_  EMPLOYEE ID        |  100    |  _    |    _    | _______________| DEF
_  EMPLOYEE INITIAL    |  100    |  _    |    _    | ________________ DEF
_  EMPLOYEE INITIAL    |  100    |  _    |    _    | _______________| DEF
_  EMPLOYEE LAST NAME  |  100    |  _    |    _    | ________________ DEF
_  EMPLOYEE LAST NAME  |  100    |  _    |    _    | _______________| DEF
     Remaining Fields
     Remaining Fields
_  DEPT                |          |        |        |                  DEF
_  DEPT                |          |        |        |                  DEF
_  DIVN                |          |        |        |                  DEF
_  DIVN                |          |        |        |                  DEF
<b></b>===>
<b></b>===>
  SHR010  Enter a valid command or PF key
  SHR010  Enter a valid command or PF key
  1=HELp  2=          3=QUIt      4=FLDgroup  5=WIDen      6=COMmands
  1=HELp  2=          3=QUIt      4=FLDgroup  5=WIDen      6=COMmands
Line 27: Line 32:
</tr>
</tr>
</table>
</table>
<p>You use the Record Definition screen to specify or view information about the contents of records.</p>
<p>
<p>FILEMGMT displays a screen for each record that you selected on the Record Name List screen, in the same order as on the Record Name List screen. You can advance to the next record by pressing the PF11 (NEXtrec) key, or return to the previous record by pressing the PF10 (PREvrec) key.</p>
You use the Record Definition screen to specify or view information about the contents of records.</p>
<p>
FILEMGMT displays a screen for each record that you selected on the Record Name List screen, in the same order as on the Record Name List screen. You can advance to the next record by pressing the F11 (NEXtrec) key, or return to the previous record by pressing the F10 (PREvrec) key.</p>
<table>
<table>
<tr class="head">
<tr class="head">
Line 38: Line 45:
<td>All the fields in the file.</td>
<td>All the fields in the file.</td>
</tr>
</tr>
<tr>
<tr>
<td>Redefining an existing record</td>
<td>Redefining an existing record</td>
<td>Fields that are currently in the record, and, under a "Remaining Fields" heading in the same column, also lists the fields in the file that are not part of the record.</td>
<td>Fields that are currently in the record, and, under a <b>Remaining Fields</b> heading in the same column, also lists the fields in the file that are not part of the record.</td>
</tr>
</tr>
<tr>
<tr>
Line 47: Line 55:
</tr>
</tr>
</table>
</table>
==Record Definition screen Input==
 
<p>FILEMGMT displays and/or prompts you for the following information.</p>
==Record Definition screen input==
<table>
<p>
FILEMGMT displays and/or prompts you for the following information.</p>
<table class="thJustBold">
<tr class="head">
<tr class="head">
<th>Prompt</th>
<th>Prompt</th>
<th>Response</th>
<th>Response</th>
</tr>
</tr>
<tr>
<tr>
<td>Filename </td>
<th>Filename </th>
<td>FILEMGMT displays the name of the file that you entered on the primary screen.</td>
<td>FILEMGMT displays the name of the file that you entered on the primary screen.</td>
</tr>
</tr>
<tr>
<tr>
<td>Staged as </td>
<th>Staged as </th>
<td>
<td>The command for which the record is staged (<code>REDEFINE</code>, in the above screen).
<p>The command for which the record is staged (REDEFINE, in the above screen).</p>
<p>
<p>Based on the command, you have the following options for changing information on the screen:</p>
Based on the command, you have the following options for changing information on the screen:</p>
<ul>
<ul>
<li>DEFINE/REDEFINE </li>
<li>DEFINE/REDEFINE  
</ul>
<p>You can select or remove fields from the record. You can change any of the field attributes. </p>
<p>You can select or remove fields from the record. You can change any of the field attributes. </p>
<ul>
 
<li>DELETE </li>
<li>DELETE  
</ul>
<p>
<p>You can view but not change any information on this screen.</p>
You can view but not change any information on this screen.</p>
<ul>
 
<li>RENAME </li>
<li>RENAME  
</ul>
<p>
<p>You can view but not change any information on this screen. </p>
You can view but not change any information on this screen. </p>
</td>
</li></ul>
</tr>
</td></tr>
 
<tr>
<tr>
<td>Number of Records </td>
<th>Number of Records </th>
<td>FILEMGMT displays the number of records with the specified name. This is the number you entered in response to the No. of Records prompt on the Record Name List screen. </td>
<td>FILEMGMT displays the number of records with the specified name. This is the number you entered in response to the <b>No. of Records</b> prompt on the Record Name List screen. </td>
</tr>
</tr>
<tr>
<tr>
<td>Percent Occurrence </td>
<th>Percent Occurrence </th>
<td>FILEMGMT displays the percentage of the file in which records with the specified name occur. This is the number FILEMGMT calculates and displays on the Record Name List screen as the "Occurrence in File" value. </td>
<td>FILEMGMT displays the percentage of the file in which records with the specified name occur. This is the number FILEMGMT calculates and displays on the Record Name List screen as the <b>Occurrence in File</b> value. </td>
</tr>
</tr>
<tr>
<tr>
<td>Table B Record Length </td>
<th nowrap>Table B Record Length </th>
<td>FILEMGMT displays the average length of the specified record name. When you press Enter, FILEMGMT recomputes the value of Table B Record Length from the length of the fields currently specified for the record. FILEMGMT displays a recomputed value each time you press Enter.</td>
<td>FILEMGMT displays the average length of the specified record name. When you press Enter, FILEMGMT recomputes the value of Table B Record Length from the length of the fields currently specified for the record. FILEMGMT displays a recomputed value each time you press Enter.</td>
</tr>
</tr>
<tr>
<tr>
<td>Recordname </td>
<th>Recordname </th>
<td>
<td>FILEMGMT displays the name of the record you entered on the Record Name List screen or the primary screen. The name is truncated if it is more than 20 characters.
<p>FILEMGMT displays the name of the record you entered on the Record Name List screen or the primary screen. The name is truncated if it is more than 20 characters. </p>
<p>
<p>If the record is staged for a DEFINE/REDEFINE command, you can: </p>
If the record is staged for a <var>DEFINE/REDEFINE</var> command, you can: </p>
<ul>
<ul>
<li>Select fields from the "Remaining Fields" list for inclusion in the record by typing X in the prefix area to the left of the field name. </li>
<li>Select fields from the <b>Remaining Fields</b> list for inclusion in the record by typing <code>X</code> in the prefix area to the left of the field name. </li>
<li>Deselect fields presently included in the record by typing D in the prefix area to the left of the field name. </li>
 
<li>Deselect fields presently included in the record by typing <code>D</code> in the prefix area to the left of the field name. </li>
 
<li>Change field attributes by typing over them. </li>
<li>Change field attributes by typing over them. </li>
</ul>
</ul>
<p>FILEMGMT rearranges the list of fields when you press Enter. Selected fields are displayed at the top of the list. Deselected fields are displayed at the bottom, under the "Remaining Fields" heading. You then have another opportunity to select or deselect fields before you advance to another screen.</p>
<p>
</td>
FILEMGMT rearranges the list of fields when you press Enter. Selected fields are displayed at the top of the list. Deselected fields are displayed at the bottom, under the <b>Remaining Fields</b> heading. You then have another opportunity to select or deselect fields before you advance to another screen.</p>
</tr>
</td></tr>
 
<tr>
<tr>
<td>% Field Occur </td>
<th>% Field Occur </th>
<td>
<td>Type the percentage (0-99999) of the total number of records in which this field is expected to occur, adjusting for the average number of the field's occurrences in a record. The adjustment might cause the percentage to exceed 100%.  
<p>Type the percentage (0-99999) of the total number of records in which this field is expected to occur, adjusting for the average number of the field's occurrences in a record. The adjustment might cause the percentage to exceed 100%. </p>
<p>
<p>Use this algorithm to determine the percentage: </p>
Use this algorithm to determine the percentage: </p>
<ol>
<ol>
<li>Multiply the number of records in which the field occurs by the average number of occurrences of the field in those records. </li>
<li>Multiply the number of records in which the field occurs by the average number of occurrences of the field in those records. </li>
<li>Divide the product by the total number of records. </li>
<li>Divide the product by the total number of records. </li>
<li>Multiply the result by 100. </li>
<li>Multiply the result by 100. </li>
<li>Round off the product to the nearest integer. Use this integer as the "% Field Occur" value. The value may exceed 100. </li>
 
<li>Round off the product to the nearest integer. Use this integer as the <b>% Field Occur</b> value. The value may exceed 100. </li>
</ol>
</ol>
<p>For an existing record, FILEMGMT displays the current value. </p>
<p>
<p>FILEMGMT uses "% Field Occur" to calculate the "Avg Record Length" for the record, and the file size for the file.</p>
For an existing record, FILEMGMT displays the current value. </p>
</td>
<p>
</tr>
FILEMGMT uses <b>% Field Occur</b> to calculate the <b>Avg Record Length</b> for the record, and the file size for the file.</p>
</td></tr>
 
<tr>
<tr>
<td>Unique ID </td>
<th>Unique ID </th>
<td>Type X if the field has a unique value in every record. You can delete an X by typing D in its place. The default is null. Used by PC/204. </td>
<td>Type <code>X</code> if the field has a unique value in every record. You can delete an <code>X</code> by typing <code>D</code> in its place. The default is null. Used by PC/204. </td></tr>
</tr>
 
<tr>
<tr>
<td>Rectype ID </td>
<th>Rectype ID </th>
<td>Type X if the field is a unique record identifier field. You can delete an X by typing D in its place. The default is null. Used by PC/204.</td>
<td>Type <code>X</code> if the field is a unique record identifier field. You can delete an <code>X</code> by typing <code>D</code> in its place. The default is null. Used by PC/204.</td>
</tr>
</tr>
<tr>
<tr>
<td>Rectype ID Data Value</td>
<th>Rectype ID Data Value</th>
<td>Type the value of the unique record identifier field (1-70 characters). Press PF5 (WIDen) to enter more than 20 characters. If you specify a value for this entry, "Rectype Id" must be marked with an X. The default is null.</td>
<td>Type the value of the unique record identifier field (1-70 characters). Press F5 (WIDen) to enter more than 20 characters. If you specify a value for this entry, <b>Rectype Id</b> must be marked with an <code>X</code>. The default is null.</td>
</tr>
</tr>
<tr>
<tr>
<td>Cmd </td>
<th>Cmd </th>
<td>
<td>Displays the status of the field shown on the line:
<p>Displays the status of the field shown on the line:</p>
<ul>
<li>If the field is currently staged, FILEMGMT displays the command that was generated for the field. The command is one of the following: </li>
</ul>
<p>*** Field is new. </p>
<p>DEF Field is being defined. </p>
<p>RED Field is being redefined. </p>
<p>DEL Field is being deleted. </p>
<p>REN Field is being renamed. </p>
<p>R/R Field is being redefined and renamed.</p>
<ul>
<ul>
<li>If the field is currently staged, FILEMGMT displays the command that was generated for the field. The command is one of the following:
<table class="thJustBold">
<tr><th>*** </th><td>Field is new. </td></tr>
<tr><th>DEF </th><td>Field is being defined. </td></tr>
<tr><th>RED </th><td>Field is being redefined. </td></tr>
<tr><th>DEL </th><td>Field is being deleted. </td></tr>
<tr><th>REN </th><td>Field is being renamed. </td></tr>
<tr><th>R/R </th><td>Field is being redefined and renamed. </td></tr>
</table>
<li>If the field is not staged, this column is blank.</li>
<li>If the field is not staged, this column is blank.</li>
</ul>
</ul>
</td>
</td></tr>
</tr>
</table>
</table>
==Record Definition screen commands==
==Record Definition screen commands==
<p>To issue a command, press a PF key or type a command name at the prompt (===>) and press Enter.</p>
<p>
To issue a command, press a PF key or type a command name at the prompt (<b>===></b>) and press Enter.</p>
 
<table>
<table>
<tr class="head">
<tr class="head">
Line 156: Line 184:
<th>Meaning</th>
<th>Meaning</th>
</tr>
</tr>
<tr>
<tr>
<td>PF1 </td>
<td>F1 </td>
<td>HELp </td>
<td>HELp </td>
<td>Displays HELP text for the Record Definition screen.</td>
<td>Displays Help text for the Record Definition screen.</td>
</tr>
</tr>
<tr>
<tr>
<td>PF3 </td>
<td>F3 </td>
<td>QUIt </td>
<td>QUIt </td>
<td>Exits from the Record Definition screen and returns to the Record Name List screen without making any changes to the currently displayed record. </td>
<td>Exits from the Record Definition screen and returns to the [[Adding record definitions with FILEMGMT|Record Name List screen]] without making any changes to the currently displayed record. </td>
</tr>
</tr>
<tr>
<tr>
<td>PF4 </td>
<td>F4 </td>
<td>FLDgroup </td>
<td>FLDgroup </td>
<td>Proceeds to the Field Group Definition screen. This screen defines field groups for the records in the file. Changes to the current record are saved in the dictionary.  </td>
<td>Proceeds to the Field Group Definition screen. This screen defines field groups for the records in the file. Changes to the current record are saved in the dictionary.  </td>
</tr>
</tr>
<tr>
<tr>
<td>PF5 </td>
<td>F5 </td>
<td>WIDen </td>
<td>WIDen </td>
<td>Proceeds to the Widen screen. This screen allows you to expand the length of the record name, field name, or "Rectype Id Data Value." Place the cursor over the name or value on the Record Definition screen and press PF5. </td>
<td>Proceeds to the Widen screen. This screen allows you to expand the length of the record name, field name, or <b>Rectype Id Data Value</b>. Place the cursor over the name or value on the Record Definition screen, and press F5. </td>
</tr>
</tr>
<tr>
<tr>
<td>PF6 </td>
<td>F6 </td>
<td>COMmands </td>
<td>COMmands </td>
<td>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. Changes to the current record are saved in the dictionary.</td>
<td>Proceeds to the [[Executing and deleting commands with FILEMGMT#Execute Commands screen|Execute Commands screen]]. This screen displays the staged commands that were generated for the file, and it allows you to select the commands you want to execute. Changes to the current record are saved in the dictionary.</td>
</tr>
</tr>
<tr>
<tr>
<td>PF9 </td>
<td>F9 </td>
<td>SIZe </td>
<td>SIZe </td>
<td>Proceeds to the File Sizing screen. Changes to the current record are saved in the dictionary. </td>
<td>Proceeds to the [[Managing file and table size with FILEMGMT|File Sizing screen]]. Changes to the current record are saved in the dictionary. </td>
</tr>
</tr>
<tr>
<tr>
<td>PF10 </td>
<td>F10 </td>
<td>PREvrec </td>
<td>PREvrec </td>
<td>Returns to the Record Definition screen for the previous record. Changes to the current record are saved in the dictionary. </td>
<td>Returns to the Record Definition screen for the previous record. Changes to the current record are saved in the dictionary. </td>
</tr>
</tr>
<tr>
<tr>
<td>PF11 </td>
<td>F11 </td>
<td>NEXtrec </td>
<td>NEXtrec </td>
<td>Proceeds to the next Record Definition screen to display the fields in the next record. Changes to the current record are saved in the dictionary.</td>
<td>Proceeds to the next Record Definition screen to display the fields in the next record. Changes to the current record are saved in the dictionary.</td>
</tr>
</tr>
<tr>
<tr>
<td>PF12 </td>
<td>F12 </td>
<td>END </td>
<td>END </td>
<td>For DEFINE and REDEFINE only. Exits from the Record Definition screen and returns to the Record Name List screen. Changes to the current record are saved in the dictionary.</td>
<td>For <var>DEFINE</var> and <var>REDEFINE</var> only. Exits from the Record Definition screen and returns to the Record Name List screen. Changes to the current record are saved in the dictionary.</td>
</tr>
</tr>
</table>
</table>
<p>&nbsp;</p>
 
[[Category:File manager]]
 
[[Category:File management]]
[[Category:FILEMGMT application subsystem]]
[[Category:FILEMGMT application subsystem]]

Latest revision as of 04:20, 10 May 2014

Record Definition screen

Press the F11 (RECdefn) key from the Record Name List screen. FILEMGMT displays the following Record Definition screen.

Proceeding to this screen stages the records you specified on the Record Name List screen for the function you selected on the primary screen.

FILEMGMT Record Definition Line 1 of 7 Filename: EMPLOYEE Number of Records: 100 Staged as: DEFINE Percent Occurrence: 100.0% Table B Record Length: 53 | Recordname: | % Field | Unique | Rectype | Rectype Id | | EMPLOYEE | Occur | Id | Id | Data Value | Cmd ---------------------------------------------------------------------------- _ EMPLOYEE FIRST NAME | 100 | _ | _ | _______________| DEF _ EMPLOYEE ID | 100 | _ | _ | _______________| DEF _ EMPLOYEE INITIAL | 100 | _ | _ | _______________| DEF _ EMPLOYEE LAST NAME | 100 | _ | _ | _______________| DEF Remaining Fields _ DEPT | | | | DEF _ DIVN | | | | DEF ===> SHR010 Enter a valid command or PF key 1=HELp 2= 3=QUIt 4=FLDgroup 5=WIDen 6=COMmands 7= 8= 9=SIZe 10= 11= 12=END

You use the Record Definition screen to specify or view information about the contents of records.

FILEMGMT displays a screen for each record that you selected on the Record Name List screen, in the same order as on the Record Name List screen. You can advance to the next record by pressing the F11 (NEXtrec) key, or return to the previous record by pressing the F10 (PREvrec) key.

If you are... FILEMGMT lists...
Defining a new record All the fields in the file.
Redefining an existing record Fields that are currently in the record, and, under a Remaining Fields heading in the same column, also lists the fields in the file that are not part of the record.
Deleting or renaming an existing record All the fields in the record.

Record Definition screen input

FILEMGMT displays and/or prompts you for the following information.

Prompt Response
Filename FILEMGMT displays the name of the file that you entered on the primary screen.
Staged as The command for which the record is staged (REDEFINE, in the above screen).

Based on the command, you have the following options for changing information on the screen:

  • DEFINE/REDEFINE

    You can select or remove fields from the record. You can change any of the field attributes.

  • DELETE

    You can view but not change any information on this screen.

  • RENAME

    You can view but not change any information on this screen.

Number of Records FILEMGMT displays the number of records with the specified name. This is the number you entered in response to the No. of Records prompt on the Record Name List screen.
Percent Occurrence FILEMGMT displays the percentage of the file in which records with the specified name occur. This is the number FILEMGMT calculates and displays on the Record Name List screen as the Occurrence in File value.
Table B Record Length FILEMGMT displays the average length of the specified record name. When you press Enter, FILEMGMT recomputes the value of Table B Record Length from the length of the fields currently specified for the record. FILEMGMT displays a recomputed value each time you press Enter.
Recordname FILEMGMT displays the name of the record you entered on the Record Name List screen or the primary screen. The name is truncated if it is more than 20 characters.

If the record is staged for a DEFINE/REDEFINE command, you can:

  • Select fields from the Remaining Fields list for inclusion in the record by typing X in the prefix area to the left of the field name.
  • Deselect fields presently included in the record by typing D in the prefix area to the left of the field name.
  • Change field attributes by typing over them.

FILEMGMT rearranges the list of fields when you press Enter. Selected fields are displayed at the top of the list. Deselected fields are displayed at the bottom, under the Remaining Fields heading. You then have another opportunity to select or deselect fields before you advance to another screen.

% Field Occur Type the percentage (0-99999) of the total number of records in which this field is expected to occur, adjusting for the average number of the field's occurrences in a record. The adjustment might cause the percentage to exceed 100%.

Use this algorithm to determine the percentage:

  1. Multiply the number of records in which the field occurs by the average number of occurrences of the field in those records.
  2. Divide the product by the total number of records.
  3. Multiply the result by 100.
  4. Round off the product to the nearest integer. Use this integer as the % Field Occur value. The value may exceed 100.

For an existing record, FILEMGMT displays the current value.

FILEMGMT uses % Field Occur to calculate the Avg Record Length for the record, and the file size for the file.

Unique ID Type X if the field has a unique value in every record. You can delete an X by typing D in its place. The default is null. Used by PC/204.
Rectype ID Type X if the field is a unique record identifier field. You can delete an X by typing D in its place. The default is null. Used by PC/204.
Rectype ID Data Value Type the value of the unique record identifier field (1-70 characters). Press F5 (WIDen) to enter more than 20 characters. If you specify a value for this entry, Rectype Id must be marked with an X. The default is null.
Cmd Displays the status of the field shown on the line:
  • If the field is currently staged, FILEMGMT displays the command that was generated for the field. The command is one of the following:
    *** Field is new.
    DEF Field is being defined.
    RED Field is being redefined.
    DEL Field is being deleted.
    REN Field is being renamed.
    R/R Field is being redefined and renamed.
  • If the field is not staged, this column is blank.

Record Definition screen commands

To issue a command, press a PF key or type a command name at the prompt (===>) and press Enter.

Key Command Meaning
F1 HELp Displays Help text for the Record Definition screen.
F3 QUIt Exits from the Record Definition screen and returns to the Record Name List screen without making any changes to the currently displayed record.
F4 FLDgroup Proceeds to the Field Group Definition screen. This screen defines field groups for the records in the file. Changes to the current record are saved in the dictionary.
F5 WIDen Proceeds to the Widen screen. This screen allows you to expand the length of the record name, field name, or Rectype Id Data Value. Place the cursor over the name or value on the Record Definition screen, and press F5.
F6 COMmands Proceeds to the Execute Commands screen. This screen displays the staged commands that were generated for the file, and it allows you to select the commands you want to execute. Changes to the current record are saved in the dictionary.
F9 SIZe Proceeds to the File Sizing screen. Changes to the current record are saved in the dictionary.
F10 PREvrec Returns to the Record Definition screen for the previous record. Changes to the current record are saved in the dictionary.
F11 NEXtrec Proceeds to the next Record Definition screen to display the fields in the next record. Changes to the current record are saved in the dictionary.
F12 END For DEFINE and REDEFINE only. Exits from the Record Definition screen and returns to the Record Name List screen. Changes to the current record are saved in the dictionary.