User's Guide

CMRENAME

Rename Disk Files

Function:

Renames cataloged disk files.

Parameters:

INFILE
Input name. A name specifying the disk file(s) to rename, that is, a file name or an alias name. A "*" may be specified as the file name root or extension but not both. If the file name root is not "*" and the extension is left unspecified, an image name is implied.

OUTFILE
Output name. A name specifying the new file name(s). If a wildcard (*) is used, it must correspond to the wildcard usage of INFILE. A "*" may be specified as the file name root or extension but not both. If the file name root is not "*" and the extension is left unspecified, an image name is implied.

CONFLG(NO)
Confirmation mode. Indicates whether the user will be prompted to confirm or deny the rename if OUTFILE already exists.


  = YES:  Confirm the rename.  The user will be 
          informed if OUTFILE already exists or will
          be prompted to confirm or deny the rename.
  = NO:   Do not confirm the rename.  If OUTFILE 
          already exists, the file will not be 
          renamed.

AFTYPE("*")
File type. List of associated files to be renamed.


  = *:           All associated files.  Rename all
		 associated files.
  = NONE:        No associated files.  Do not rename
		 any associated files.
  = extensions:  User-specified extensions.  Rename
		 only the associated files with the
		 specified extensions.

If the name specified in INFILE is an image name, the associated files renamed depend upon the combination of the IMAGEFLG and AFTYPE parameters. If INFILE is not an image name, the AFTYPE and IMAGEFLG parameters are ignored.

When IMAGEFLG is set to YES, the image and all associated files are renamed if AFTYPE is "*" (default). When IMAGEFLG is set to YES and AFTYPE is NONE, only the image, DDR, and HISTORY files are renamed. To rename a specific list of associated files, their extensions should be specified in AFTYPE. The image, DDR, and HISTORY files may or may not be renamed, depending upon the value of IMAGEFLG.

IMAGEFLG(YES)
Image flag. This option allows a user to rename a list of associated files that excludes the image, DDR, and HISTORY.


  = YES:  Rename image and associated files.  The image
	  and its DDR and HISTORY files are renamed to
	  the output name specification.
  = NO:   Rename only associated files.  The image, DDR,
	  and HISTORY files are not renamed unless
	  specified in the AFTYPE parameter.

If INFILE is not an image name, AFTYPE and IMAGEFLG parameters are ignored.

COPYFLG(NO)
Copy flag. Copy the files instead of renaming. Large files with symbolic links can be renamed faster then they can be copied. This parameter is relevant only on UNIX systems where multiple disk packs are used.


  = YES:  Copy the files. 
  = NO:   Rename the files.

Examples:

  1. LAS> cmrename infile=ny90 outfile=newyork

    The disk file NY90;IMG and all its associated files will be renamed. The new files will have the same extensions as the original files. For example:

    	   NY90;IMG      will be renamed to NEWYORK;IMG
    	   NY90;DDR      will be renamed to NEWYORK;DDR
    	   NY90;HIS      will be renamed to NEWYORK;HIS
    	   NY90;DLTF     will be renamed to NEWYORK;DLTF
    	   NY90;GOF.LINE will be renamed to NEWYORK;GOF.LINE
    	   NY90;MISC     will be renamed to NEWYORK;MISC
    

  2. LAS> cmrename infile=ny90 outfile=newyork aftype=none imageflg=yes

    Only the NY90 image file and the associated DDR and HISTORY files will be renamed. The new files will have the same extensions as the original files. For example:

    	   NY90;IMG will be renamed to NEWYORK;IMG
    	   NY90;DDR will be renamed to NEWYORK;DDR
    	   NY90;HIS will be renamed to NEWYORK;HIS
    

  3. LAS> cmrename infile=ny90 outfile=newyork aftype=(gof.line) imageflg=yes

    The image, DDR, and HISTORY files will be renamed. In addition, only the disk files associated with the image NY90 that have the extensions specified in AFTYPE will be renamed. The new files will have the same extensions as the original files. For example:

    	   NY90;IMG       will be renamed to NEWYORK;IMG
    	   NY90;DDR       will be renamed to NEWYORK;DDR
    	   NY90;HIS       will be renamed to NEWYORK;HIS
    	   NY90;GOF.LINE  will be renamed to NEWYORK;GOF.LINE
    

  4. LAS> cmrename infile=ny90 outfile=newyork aftype=(dltf,gof.line,misc) imageflg=no

    Only the disk files associated with the specified extensions from the image NY90 will be renamed. The image, DDR, and HISTORY files will not be renamed. The new files will have the same extensions as the original files. For example:

    	   NY90;DLTF      will be renamed to NEWYORK;DLTF
    	   NY90;GOF.LINE  will be renamed to NEWYORK;GOF.LINE
    	   NY90;MISC      will be renamed to NEWYORK;MISC
    

  5. LAS> cmrename infile=*;dltf outfile=*;savdltf

    All files with extension DLTF will be renamed to files with extension SAVDLTF. The new files will have the same file name root as the original files. For example:

    	   ALASKA;DLTF  will be renamed to ALASKA;SAVDLTF
       	   NEWYORK;DLTF will be renamed to NEWYORK;SAVDLTF
    	   NY90;DLTF    will be renamed to NY90;SAVDLTF
    	   TEST;DLTF    will be renamed to TEST;SAVDLTF
    

  6. LAS> cmrename infile=test;dltf outfile=alaska;dltf

    The disk file TEST;DLTF will be renamed to ALASKA;DLTF.

Description/Algorithm:

CMRENAME renames cataloged disk files.

Nonfatal Error Message:

  1. [cmrename-nrenamed] No files renamed

    This message is displayed upon completion if no files were successfully renamed. The specific errors will have been previously listed.

Fatal Error Messages:

  1. [cmrename-fatal] Fatal error encountered

    The error message that is displayed immediately preceding this message is the specific error that was encountered. Processing is terminated.

  2. [cmrename-name] Specification error

    Invalid parameter specification. A "*" may be specified for the file name or extension but not both. The extension may be left unspecified if the file name is not "*". If the INFILE file name is "*", the OUTFILE file name must be "*". If the INFILE extension is "*", the OUTFILE extension must be "*". If the INFILE extension is unspecified, the OUTFILE extension must also be unspecified.

User Notes:

  1. A "*" may be specified for the file name root when an extension is specified, or a "*" may be specified for the extension when a file name root is specified. A "*" may not be specified for both the file name root and the extension. The extension may be left unspecified if the file name root is not "*".

  2. If the INFILE file name root is "*", the OUTFILE file name root must also be "*". If the INFILE extension is "*", the OUTFILE extension must also be "*". If the INFILE extension is unspecified, the OUTFILE extension must also be unspecified.

  3. If the INFILE specification is not an image name, AFTYPE and IMAGEFLG are ignored. If the INFILE specification is an image name and AFTYPE is the "*" (default), all files associated with the image are renamed. In order to rename only the image, DDR, and HISTORY files, AFTYPE must be NONE; otherwise, additional associated files may be specified in AFTYPE.