HP 3000 Manuals

Working with Files [ HP 3000 Series 9X8LX Computer Systems Task Reference ] MPE/iX 5.0 Documentation


HP 3000 Series 9X8LX Computer Systems Task Reference

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 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 

To delete a file using wildcards 

To delete a directory and the files or directories it contains using
wildcards, use the PURGEDIR command, for example:

:purgedir /MYACCT/MYGRP/@ 

This example deletes all directories rooted to /MYACCT/MYGRP.

To delete all empty directories under the CWD (Current Working Directory)
with TMP in their name:

:purgedir @TMP@ 

To delete all directories under the CWD with names beginning with TMP,
and all objects below these directories:

:purgedir TMP@; TREE 

To delete all directories under the CWD with names ending with TMP, and
all objects below these directories:

:purgedir ./@TMP 

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