HP 3000 Manuals

Defining Files on the HP 3000 [ Information Access Server: Database Administration ] MPE/iX 5.0 Documentation


Information Access Server: Database Administration

Defining Files on the HP 3000 

If information you want to define as a table exists in a file on the host
HP 3000 or on a remote HP 3000, specify that file as a data source.

To add, change, delete, or examine the data dictionary definition of
files:

   *   Go directly to the screen you want by typing its screen name in
       the Go to screen field of any menu and pressing Enter, or

   *   Choose a function label at the File Menu (F).

The File Menu looks like this.
______________________________________________________________________________________________
|                                                                                            |
|                                                                                            |
|         CONFIG                               File Menu                         Screen: F   |
|       Choose a function, or type in a screen name and press ENTER.                         |
|                                                                                            |
|                                                                                            |
|         Add File          - Add the definition of a file.                                  |
|                                                                                            |
|         Change File       - Change the definition of a file.                               |
|                                                                                            |
|         Delete File       - Delete the definition of a file.                               |
|                                                                                            |
|         Show One File     - Show the group, account, system, lockword, file type,          |
|                             and associated tables for one file.                            |
|                                                                                            |
|         List All Files    - List the file name, group, account, and system for             |
|                             all files.                                                     |
|                                                                                            |
|                                                                                            |
|                                                                                            |
|                                                                                            |
|                                                           Go to screen                     |
|                                                                                            |
|          Add      Change    Delete   Show One       List All                        Done   |
|          File      File      File      File           Files                                |
|                                                                                            |
______________________________________________________________________________________________

            

Using File Equations 

There are two ways to define a file in Access Server.  You can define the
actual file or specify a formal file designator.  Once the file is
defined, you can set up file equations to redirect the definition to the
actual file.

To fully define the file, use the Add File screen and specify its name,
group, and account.  (See "Adding a File Definition," below.)

You can configure files without a group and account.  This allows simple
file equations to be set up.

The file equation itself can be generated in the Access PC environment
with logon UDCs (Basic Serial only) or in an IAFILE. In a Host Batch
Facility environment, file equations can be generated with logon UDCs,
the IAFILE, or in the job stream before running the Host Batch Facility.
Within Host Batch, file equations can be generated by inserting a ":" in
front of the FILE command.  (For more information about file equations,
see "Using an IAFILE" under "Establishing a Host Session" in Chapter 12.)

One reason for using a file equation is to point to a file whose name is
constantly changing but whose structure stays the same.  For example, the
user might have a single daily file that keeps track of orders for the
previous day.  A file equation could be used each day to point to the
correct file rather than keeping separate file definitions for each day
in the data dictionary.  As the file is updated each day, the file
equation will point on Tuesday to Monday's orders, on Wednesday to
Tuesday's orders, and so on.

Overriding FOPTIONs and AOPTIONs.   

Another use of file equations is to override the defaults used to open a
file.  Access Server FOPENs files with the following default FOPTIONs and
AOPTIONs:

OLD; NOCCTL; ACC=IN; BUF=2; SHR; NOMULTI; NOMR; WAIT; STD; NOLOCK; COPY
(for all non-KSAM files); and NOCOPY (for KSAM files)

Binary values are:

For all files:

     FOPTIONs   :  0 000 000 000 000 001

For non-KSAM files:

     AOPTIONs   :  0 001 000 000 000 000

For KSAM files:

     AOPTIONs   :  0 000 000 000 000 000

Include the following options in your file equation to override the
defaults.

BUF=x            Where x is 1 or more.  Access Server uses a default of 2 buffers.
                 However, you may want to use 3 or more buffers to improve
                 performance.

EXC              To force esclusive access to the file by Access Server.

EAR              To force esclusive access with read to the file by Access Server.
                 This allows other applications to open the file, but with read
                 capability only.

GMULTI           Access Server opens the file NOMULTI, which means that the file will
                 be read through its own set of file system buffers.  If another
                 application is updating the file at the same time that Access Server
                 is reading it, the GMULTI option may want to be used to ensure that
                 Access Server gets up-to-the-second data from the file.

OLDTEMP          If access to a job temporary file is wanted, use this option.  In the
                 PC environment, this would be a rare and unusual situation and will
                 only work in a basic serial environment.  (Sessions are created new
                 in the OfficeShare environment.)  In the Host Batch environment, this
                 situation is more feasible but is still unlikely.

Here are three examples of file equations that use these options:

         FILE F01;BUF=3;GMULTI
         FILE F02;GROUP;BUF=3;ESC
         FILE F03;GROUP.ACCOUNT;EAR;BUF=4

The following options do not work and should not be included in a file
equation:

MULTI            Since the Access Server process HDSP.PPC.SYS runs alone in a session,
                 MULTI will not work.  You must specify GMULTI to allow multiple
                 access between sessions.

ACC=xxx          Where xxx is OUT, OUTKEEP, or APPEND. These options will not allow
                 Access Server to read the data, and in the case of OUT, will reset
                 the EOF of the file, thus erasing the file itself.  ACC=UPDATE and
                 INOUT will work but there is no reason to ever use these options with
                 Access Server.

MR, NOBUF,       Any of these four options will cause Access Server to fail in its
NOWAIT, LOCK     attempt to read the file.  The file must be opened in a normal
                 buffered mode without locking enforced.

COPY             This option will not work for KSAM files because it will not allow
                 Access Server to take advantage of KSAM keyed reads.

DEL              This option will force the file to be deleted when it is closed.

Adding a File Definition 

Add a definition of a file to the data dictionary at the Add File (AF)
screen, shown below.  You must use this screen to define any files before
defining any tables that derive their data from them.

Table 4-2 describes the fields in the Add File screen.
______________________________________________________________________________________________
|                                                                                            |
|                                                                                            |
|         CONFIG                               Add File                        Screen: AF    |
|       Type in the information and press ENTER.                                             |
|                                                                                            |
|                                                                                            |
|                                                                                            |
|                                                                                            |
|                           File.Group.Account          .         .                          |
|                                                                                            |
|                                                                                            |
|                                Remote System                                               |
|                                                                                            |
|                                                                                            |
|                                     Lockword                                               |
|                                                                                            |
|                                                                                            |
|                                                                                            |
|                                                                                            |
|                                                                                            |
|                                                                                            |
|                                                                                            |
|                                                                                            |
|                                                                           Help      Done   |
|                                                                                            |
|                                                                                            |
______________________________________________________________________________________________

            

          Table 4-2.  Add File Screen Fields 

--------------------------------------------------------------------------------------------
|                  |                                                                       |
|      Field       |                              Description                              |
|                  |                                                                       |
--------------------------------------------------------------------------------------------
|                  |                                                                       |
| File             | Name of the data file whose definition you want to add to the data    |
|                  | dictionary.                                                           |
|                  |                                                                       |
|                  | If a KSAM key file is specified instead of the data file, an error    |
|                  | will be issued.                                                       |
|                  |                                                                       |
--------------------------------------------------------------------------------------------
|                  |                                                                       |
| Group            | MPE group where the file resides.  If you leave this blank, the       |
|                  | definitions will have a blank group name.  The Administrator Utility  |
|                  | will offer the local group and account as the default when the screen |
|                  | first appears.  Blank group and account names are allowed, so if file |
|                  | equations are to be issued only the file designator needs to be       |
|                  | configured.  Therefore, you can clear the Group and Account fields by |
|                  | spacing through them.  The group name cannot be blank unless the      |
|                  | account name is also blank.                                           |
|                  |                                                                       |
--------------------------------------------------------------------------------------------
|                  |                                                                       |
| Account          | MPE account where the file resides.  The logon account is the         |
|                  | default.  If you leave this field blank, the definition will have a   |
|                  | blank account name.  The account name must be blank if the group name |
|                  | is blank.                                                             |
|                  |                                                                       |
--------------------------------------------------------------------------------------------
|                  |                                                                       |
| Remote System    | The name of the HP 3000 remote system on which the file is located.   |
|                  | If you are configuring a file on the host HP 3000, leave this field   |
|                  | blank to indicate the host.                                           |
|                  |                                                                       |
|                  | If you want to define a file located on a remote HP 3000, you must    |
|                  | define the remote system at the Add Remote HP 3000 System (A3) screen |
|                  | before you define the file.  (See "Adding an HP 3000 System           |
|                  | Definition" under "Defining HP 3000 Systems" in Chapter 3.)           |
|                  |                                                                       |
--------------------------------------------------------------------------------------------
|                  |                                                                       |
| Lockword         | The MPE file lockword used to open the file.  Lockwords are always    |
|                  | upshifted.  MPE only allows uppercase lockwords.                      |
|                  |                                                                       |
|                  | The field should be left blank if the file does not have a lockword   |
|                  | defined.                                                              |
|                  |                                                                       |
--------------------------------------------------------------------------------------------

To Add a File Definition:.   

   1.  Go to the Add File screen by typing AF in the Go to screen field
       of any menu, or by choosing  Add File f1 at the File Menu.

   2.  Type in the file name, the group and account (optional), the
       remote system name (if any), and the lockword (unless blank).

   3.  To add the definition, press Enter.

       The Administrator Utility verifies the names specified to ensure
       that they have the correct MPE syntax for names.  If the checks
       are successful, the Administrator Utility attempts to open the
       file.  If the file does not exist in the system, the Administrator
       Utility asks you whether or not you wish to proceed.  The prompt:

       The file specified does not exist on the system.  Do you wish to
       continue?

       appears on the screen.  The field at fault is highlighted to
       identify which part of File.Group.Account does not exist.  If more
       than one part does not exist on the system, the order in which
       fields are highlighted is:  Account, Group, and File.

       If you want to add the file anyway, choose  Yes  f1.  The file
       definition is added to the data dictionary.

       Choose  No  f8 to cancel this add.  The screen does not clear, so
       you can correct the file description entered.

       If any checks fail or if  No  f8 was chosen when asked to
       continue, a message appears indicating the cause of the failure.
       If the cause seems to be something you typed, the field containing
       the error is highlighted.  Correct the information and press Enter 
       to try again to add the file.

   4.  When the File, System, and Lockword fields clear (the default
       Group and Account are filled in), you can add another file
       definition.

   5.  To leave this screen, choose  Done  f8.  This returns you to the
       File Menu.  From there, you can go to another screen or exit the
       utility.

Once all your file definitions have been successfully added to the data
dictionary, use the Add File Table (AFT) and Add View Table (AVT) screens
to configure file tables and view tables from these files.

Security Issues.   

Files can be protected by security measures that limit file access across
accounts.  If this is the case, you can allow PC users to access data as
follows:

   *   Have users log into the group and account where the files of
       interest reside.

   *   Allow selected MPE users read access to the files by using the
       :ALTGROUP and/or :ALTACCT commands.

   *   Release the files with the :RELEASE command.

   *   Configure the file as a formal file designator, and have the users
       set up file equations to direct the file to the actual file.

Changing a File Definition 

Change a file definition already in the data dictionary at the Change
File (CF) screen.  The screen displays the current definition of the file
you specify, in the same format as the Add File screen.

You can change the Group, Account, Remote System, and Lockword fields,
but not the File field.  (For information about these fields, refer to
"Adding a File Definition," above.)

DBA Capabilities.   

If you are a secondary DBA, you can change only a file definition that
you currently own.

Change Checking.   

The Administrator Utility will do the same checks as with Add File.
Since the file does not have to physically exist at configuration, the
Administrator Utility will prompt you to choose whether or not to
continue if it cannot successfully open the file.

To Change a File Definition:.   

   1.  Go to the Change File screen by typing CF in the Go to screen
       field of any menu, or by choosing  Change File f2 at the File
       Menu.

   2.  Type in as much information as will uniquely identify the file and
       press Enter.  For example, if you have only one file named FILE1
       defined in the data dictionary, typing FILE1 in the File field is
       sufficient.  However, if you are a secondary DBA, you might have
       to enter more fields to identify the file because a file with the
       same name may be controlled by another DBA.

       If an entry exists for this file, the current definition of the
       file is displayed.

   3.  Type in any changes to the Group, Account, Remote System, or
       Lockword fields.

       If you decide to leave the file definition unchanged, choose  
       Cancel Changes f8.  The screen will clear and you can specify
       another file to change or return to the File Menu.

       The lockword will always be upshifted, since MPE upshifts all
       lockwords.

   4.  To put the changes into effect, press Enter.

       The Administrator Utility will verify the names specified to
       ensure that they have the correct syntax (MPE syntax) for names.
       If the checks are successful, the Administrator Utility will
       attempt to open the file.

       If the attempt succeeds, the file definition in the data
       dictionary is updated.  No checking is done to see if any tables
       configured from the file are still correct.  To check the tables,
       use the Synchronization feature.  (See Chapter 9, "Synchronizing
       Tables".)

       If the file does not exist on the system, the Administrator
       Utility will ask you whether or not you wish to proceed.  The
       prompt:

       The file specified does not exist on the system.  Do you wish to
       continue?

       will appear on the screen.  Since the fields are display-only on
       the Change File screen, the field at fault will not be highlighted
       (as with Add File) to identify which part of File.Group.Account
       does not exist.  The prompt will identify which part is missing.
       The order in which fields are flagged as missing is:  Account,
       Group, and File.

       If you wish to change the file definition, choose  Yes  f1.  The
       file definition will be changed in the data dictionary.

       To cancel this change, choose  No  f8.  The operation will act
       like a  Cancel Changes f8 and the first Change File screen
       (cleared) will be displayed.

       If any checks fail, a message appears indicating the cause of the
       failure.  If the cause seems to be something you typed, the field
       containing the error is highlighted.  Type in the correct
       information and press Enter, or choose  Cancel Changes f8 to leave
       the file definition unchanged.

   5.  When the screen clears, you can change another file definition.

   6.  To leave this screen, choose  Done  f8.  This returns you to the
       File Menu.  From there, you can go to another screen or exit the
       utility.

Deleting a File Definition 

Delete an unwanted file definition at the Delete File (DF) screen.

Impact on PC Users.   

Deleting a file definition has no effect on a user currently accessing a
configured table whose data derives from that file.  The user is working
from a copy of the data created before the file definition was deleted.

The next time this user or another user tries to access the same
configured table, however, an error message will appear.

DBA Capabilities.   

If you are a secondary DBA, you can delete only a file definition that
you currently control and if you control all the tables associated with
it.

To Delete a File Definition:.   


NOTE Deleting a file definition also deletes the definitions of all configured tables that are derived, in whole or in part, from that file.
1. Go to the Delete File screen by typing DF in the Go to screen field of any menu, or by choosing Delete File f3 at the File Menu. 2. Type in as much information as will uniquely identify the file and press Enter. For example, if you have only one file named FILE1 defined in the data dictionary, typing FILE1 in the File field is sufficient. However, if you are a secondary DBA, you might have to enter more fields to identify the file because a file with the same name may be controlled by another DBA. 3. Press Enter. The Administrator Utility looks through the data dictionary for the file name and any tables configured to it. If there are no tables configured from the file, it is deleted from the dictionary. If one or more table definitions is derived from the file, the following message will appear at the top of the screen: There are tables associated with this file. The tables will be deleted when the file is deleted. Do you really want to delete? Choose Yes f1 or No f8, whichever is appropriate. 4. When the screen clears, you can delete another file. 5. To leave this screen, choose Done f8. This returns you to the File Menu. From there, you can go to another screen or exit the utility. Examining File Information Examine information about files at the Show File (SF) and List Files (LF) screens. These screens provide two different ways to examine the definitions of files currently defined in the data dictionary: * Displays the definition of a specific file (Show), or * Displays a list of all defined files (List) Whether you show or list depends on why you are referencing the information. The screens are shown on the next page. ______________________________________________________________________________________________ | | | | | CONFIG Show File Screen: SF | | Type in the information and press ENTER. | | | | File.Group.Account . . | | | | Remote System | | | | Lockword ______ | | | | File Type ______ | | | | Tables on page of | | | | _____________ _____________ _____________ _____________ | | _____________ _____________ _____________ _____________ | | _____________ _____________ _____________ _____________ | | _____________ _____________ _____________ _____________ | | _____________ _____________ _____________ _____________ | | _____________ _____________ _____________ _____________ | | | | Print Previous Next Go To Help Done | | Page Page Page | | | ______________________________________________________________________________________________ _____________________________________________________________________________________________________________ | | | | | CONFIG List Files Screen: LF | | Choose Done to return to the File Menu. | | Page of | | | | File Group Account Rem Sys File Group Account Rem Sys | | | | ______ . ______ . ______ ______ ______ . ______ . ______ ______ | | ______ . ______ . ______ ______ ______ . ______ . ______ ______ | | ______ . ______ . ______ ______ ______ . ______ . ______ ______ | | ______ . ______ . ______ ______ ______ . ______ . ______ ______ | | ______ . ______ . ______ ______ ______ . ______ . ______ ______ | | ______ . ______ . ______ ______ ______ . ______ . ______ ______ | | ______ . ______ . ______ ______ ______ . ______ . ______ ______ | | ______ . ______ . ______ ______ ______ . ______ . ______ ______ | | ______ . ______ . ______ ______ ______ . ______ . ______ ______ | | | | Print Previous Next Go To Help Done | | Page Page Page | | | _____________________________________________________________________________________________________________ For information about the fields in the Show File screen, see "Adding a File Definition," above. However, the File Type field appears only on the Show File screen. File Type The type of file configured into the data dictionary. When the file is opened at Add File (AF) or Change File (CF), the type of file is determined and stored in the data dictionary. Possible file types are: KSAM - KSAM file BRW - BRW/IRF file SD - SD file MPE Data - MPE data file (ASCII or Binary data files) ???? - Unknown (file did not exist at configuration) DBA Capabilities. If you are the primary DBA, you can examine the definitions of all files and display a list of all defined files. If you are a secondary DBA, you can examine only the definition of a file that you control. When you list file definitions, only the ones you control are shown. To Show a Particular File Definition:. 1. Go to the Show File screen by typing SF in the Go to screen field of any menu, or by choosing Show One File f4 at the File Menu. 2. Type in as much information as will uniquely identify the file and press Enter. For example, if you have only one file named FILE1 defined in the data dictionary, typing FILE1 in the File field is sufficient. However, if you are a secondary DBA, you might have to enter more fields to identify the file because a file with the same name may be controlled by another DBA. The group, account, system, lockword, and file type for the specified file appear on the screen, as defined in the data dictionary. Also displayed are a list of all configured tables derived, in whole or in part, from this file. 3. If you want a printout of this file definition, choose Print f1. This sends a copy to the file ADMLIST, which prints to the default or other specified printer. 4. To see the definition of another file, type in the new file name over the old one and press Enter. 5. To leave this screen, choose Done f8. This returns you to the File Menu. From there, you can go to another screen or exit the utility. To List All Currently Defined Files:. 1. Go to the List Files screen by typing LF in the Go to screen field of any menu, or by choosing List All Files f5 at the File Menu. An alphabetically sorted list of the names of all files in the data dictionary is displayed automatically. Following each file name (File) is the group, account, and remote system name (blank if host) associated with that file. If no files are defined, a message appears to that effect. 2. If you want a printout of the complete listing, choose Print f1. This sends a copy of the complete list to the file ADMLIST, which prints to the default or other specified printer. 3. To leave this screen, choose Done f8. This returns you to the File Menu. From there, you can go to another screen or exit the utility. To see the lockword, file type, or tables associated with a particular file listed, go to the Show File (SF) screen. (See "To Show...", above.)


MPE/iX 5.0 Documentation