HP 3000 Manuals

Working with Files [ Using Your System The User's Guide ] MPE/iX 5.0 Documentation


Using Your System The User's Guide

Working with Files 

You often need to move files from one environment to another to be shared
by other programs, other users, and other systems.  You need to have an
easy method of transferring files while retaining a level of security
against unauthorized access.  The creator of a file has control over who
else can access it.  The following procedures provide instructions for
copying files and for maintaining file security.

To copy a file 

To make a duplicate copy of a file in your own group or account, use the
COPY command.  Provide the name of the file that you are copying from
(the source file) and the name of the file that you are copying to (the
target file), separating the two with a semicolon (;).  Provide a unique
file name for the target file as the COPY command will write over any
existing file with the same name.

To make a copy of file.   

To copy a file use the COPY command:

     :COPY FROM=source;TO=target Return 

The following example duplicates the file MYFILE by creating a new file
called NEWFILE:

     :COPY FROM=MYFILE;TO=NEWFILE Return 

This example assumes that the name provided after the TO= parameter is
unique.

To copy over an existing file.   

To copy over an existing file, use the COPY command:

     :COPY FROM=OLDFILE;TO=OTHERFIL Return 

If you are copying a file to a file name that already exists on the
system, the COPY command displays the following prompt:

     PURGE OLD filename.groupname.acctname?

A YES or Y response overwrites (purges) the existing file.  A NO or N
response terminates the COPY command without copying the file.

To not copy over an existing file.   

To ensure that the COPY command does not copy the file over a previously
existing file, use the NO parameter.

     :COPY FROM=filename;TO=filename;NO Return 

The following example prevents the copy of the file STATUS91 over an
existing file, STATUS91.  There will be no prompt asking you to purge the
existing (old) file.

     COPY FROM=STATUS91;TO=STATUS91;NO Return 

The message "NO COPY WAS DONE." (CIERR 9113) assures you that your old
file, STATUS91, was not overwritten.

To copy a file to a different group.   

To copy a file to a different group, use the COPY command specifying the
group name of the new file:

     :COPY FROM=filename;TO=filename.groupname Return 

The following example copies the file REPORT to a new file called REPORT
in the PAYABLE group.

     :COPY FROM=REPORT;TO=REPORT.PAYABLE Return 

To rename a file 

To change the name of a file, use the RENAME command.  Enter the command
and the current file name, followed by the new file name.  You must be
the creator of the file in order to perform this task.

     :RENAME oldname, newname Return 

The following example renames a file MYFILE1 to MYFILE2:

     :RENAME MYFILE1, MYFILE2 Return 

To remove a file's security 

Users outside your group cannot access files that you have created.  To
remove the security on a file so that it can be copied or transferred by
someone other than the file's creator, use the RELEASE command.

     :RELEASE filename Return 

In the following example, the security on the file MYFILE has been
released.

     :RELEASE MYFILE Return 

Once a file's security has been released, any user of the system has
unlimited access to it.  Use the LISTFILE command with the SECURITY
parameter to display the file's security level:

     :LISTFILE MYFILE,SECURITY Return 

To reinstate a file's security 

After a file has been released and copied, you should reinstate its
security with the SECURE command.  You must be the creator of the file in
order to perform the following task.

     :SECURE filename Return 

In the following example, the security to the file MYFILE is reinstated.

     :SECURE MYFILE Return 

To copy a file to tape 

Make sure that a write-protected tape has been loaded into the DDS tape
drive.  To copy a file to tape, use the STORE command.  As part of this
task, use the FILE command to create a file equation to specify a tape
device.  Then use the SHOW option of the STORE command to list the name
of each file as it is copied to the tape.

The following example copies the file MYFILE to a tape drive designated
in the file equation as TAPE1.  As the file is copied to the tape device
onto a cassette tape, its name is listed on the screen.

   *   To copy a single file to tape:

            :FILE TAPE1;DEV=TAPE Return 
            :STORE MYFILE;*TAPE1;SHOW Return 

   *   To copy more than one file to tape:

            :FILE TAPE1;DEV=TAPE Return 
            :STORE filename, filename, filename;*TAPE;SHOW Return 

   *   To copy all files in a group to tape:

            :FILE TAPE1;DEV=TAPE Return 
            :STORE @.groupname;*TAPE1;SHOW Return 

   *   To copy all files in all groups of an account (requires account
       manager capabilities):

            :FILE TAPE1;DEV=TAPE Return 
            :STORE @.@.acctname;*TAPE1;SHOW Return 

   *   To copy a file from tape back onto the system, refer to the "To
       restore files" section of this chapter.

To delete a file that you have created 

To delete unwanted files use the PURGE command.  Enter the PURGE command
and the file name:

     :PURGE filename Return 

To delete an unwanted file that you have not created.  Enter the PURGE
command from an account with SM or AM capability:

     :PURGE filename.groupname.accountname Return 

Any problems? 

   *   Did you accidently delete the wrong file from the system?

       Ask the system administrator when the last system backup was
       performed.  The system administrator should be able to restore a
       previous version of a file that has been deleted.

   *   When using the PURGE command, did you get the following error
       message on your screen?

            FILE filename NOT FOUND, NO PURGE DONE. (CIWARN 383)

       Check for any typographical errors or misspellings in the file
       name.

   *   When using the RENAME command, did you get the following error
       message?

            DUPLICATE PERMANENT FILE NAME  (FSERR 100)
            RENAME FAILED DUE TO SYSTEM ERROR, NOT RENAMED.(CIERR 373)

       This error message indicates that the name to which you are
       renaming your file already exists.  Reenter the command line, this
       time selecting a unique file name.

   *   When using the RELEASE command, did you get the following error
       message?

            ACTION DISALLOWED SINCE NOT CREATOR OF FILE.  (CIERR 351)

       This error message indicates that you are not the creator of the
       file and do not have the authority to release the file's security.
       Have the creator enter the command or have the creator release the
       file for your use.  Do not forget to tell the creator when you are
       finished so that the file can be secured.

       If you are the administrator or operator for the system, check to
       see if you logged on with the appropriate logon.  MANAGER.SYS
       should allow you to access any file.



MPE/iX 5.0 Documentation