  L /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *  *  *  *<  *                %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\=  *                %% \___________________________________%% \ >  *                %% |                                   %%  \?  *                %% |               CHFNAM              %%   \ @  *                %% |           chfnam.c  c2003         %%    \@  *                %% |            Lyle W. West           %%    |@  *                %% |                                   %%    |@  *                %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%    |@  *                \                                        \   |@  *                 \                                        \  |@  *                  \                                        \ |@  *                   \________________________________________\|  *  *  *9  *  Copyright (C) 2003 Lyle W. West, All Rights Reserved. J  *  Permission is granted to copy and use this program so long as [1] thisH  *  copyright notice is preserved, and [2] no financial gain is involvedH  *  in copying the program.  This program may not be sold as "shareware"G  *  or "public domain" software without the express, written permission   *  of the author.  *J  *  CHFNAM is a customized replication of the DCL RENAME command. While itJ  *  does not utilize any of the qualifiers provided by RENAME, the primaryE  *  purpose is to rename a given file, or using wildcards, a group of K  *  of files, without changing the modification/revision date of the target F  *  file(s) from the date/time info present prior to executing CHFNAM.  *  L  *  CHFNAM has been designed as a system management tool and is not intendedJ  *  to be accessed by general users. As described below, certain privs areI  *  required to succesfully execute CHFNAM. Additionally, if the image is J  *  located where global access is available, it is prudent for the sysmgr   *  to have trusted users enter:  *,  *      DEFINE /JOB /EXEC SECURE_LNM ENABLED  *D  *  prior to attempting execution. CHFNAM requires SYSPRV and BYPASSI  *  to successfully complete required RMS calls. If SETPRV is enabled for I  *  the caller, the above privs will be enabled for the duration of image K  *  activation. If not, user will see 'RMS-E-PRV' message at exit. If image L  *  is built with SECURE defined, user will see 'SYSTEM-x-AUTHFAIL' if thereE  *  is a descrepancy with LNM definition (see source, #ifdef SECURE).   *E  *  Note that this information is not documented elsewhere. This is a G  *  poor mans substitute for an identifier, most unpriv'ed users cannot K  *  access another users job table. There may be some user with the ability J  *  to determine the need for this logical to be defined in the JOB table,E  *  but not be able to define it with EXEC priv. See the source code     *  (search for 'ifdef SECURE').  *H  *  It will also be necessary to build CHFNAM with the SECURE attributesK  *  enabled. This is done for you automatically with the following command:   *  *      $ @BUILD SECURE [DEBUG]   *J  *  CHFNAM has been a very good addtion to my toolset, but if you chose toN  *  use it, I strongly encourage you to use the security functions by default.  *K  *  Online help is available only after the foreign symbol is defined; From   *  DCL simply enter:   *  *      CHFNAM /HELP  *G  *  Naturally, being freeware, there are restrictions which will affect -  *  successful execution of CHFNAM. They are:   *  E  *      - Previous versions of CHFNAM required user to set default to C  *        the directory to which changes were to be performed. This (  *        restriction no longer applies.  *E  *      - It is expected CHFNAM will be invoked as a foreign command.   *  E  *      - User must have Control access or privileges enabled (BYPASS =  *        and SYSPRV) for SYS$PARSE and SYS$RENAME rms calls. D  *        BYPASS should only be required if a rename operation is to*  *        be performed on directory files.  *J  *      - Input and output filenames must appear on the command line. User*  *        is not prompted for these names.  *  I  *      - Input file must not be open by any process, or the program will I  *        exit with the error 'RMS-E-IFI'. Only highest version of target L  *        file will be renamed. (user should purge previous versions first).  *  M  *      - Input/output files are expected to both reside in current (default) F  *        directory. If user desires to relocate output file, then useH  *        CHFNAM to rename file and preserve rev date, then actually useI  *        BACKUP to relocate file to desired destination and preserve all &  *        associated timestamp values.  *  J  *      - CHFNAM does minor support of RMS wildcard usage for the '*' charN  *        only. Usage of '%' is not intentionally implemented, but may suffice0  *        under certain usage situations (YMMV).  *  6  *  Below is an example of CHFNAM usage with wildcard:  *     *      $ chfnam *.axp_exe *.exe  *  5  *        Target: DKA100:[LWEST.TOOLS.DECW]*.AXP_EXE; =  *                      CATCLOCK.AXP_EXE;1 --> CATCLOCK.EXE;1 8  *                           GMT.AXP_EXE;1 --> GMT.EXE;1:  *                         XEYES.AXP_EXE;2 --> XEYES.EXE;1=  *                      XFONTSEL.AXP_EXE;1 --> XFONTSEL.EXE;1 :  *                         XHTML.AXP_EXE;1 --> XHTML.EXE;1=  *                      XMEASURE.AXP_EXE;1 --> XMEASURE.EXE;1 ;  *                        XNLOCK.AXP_EXE;1 --> XNLOCK.EXE;1 :  *                         XSNOW.AXP_EXE;1 --> XSNOW.EXE;17  *                            XV.AXP_EXE;1 --> XV.EXE;1   *    *F  *  As shown above, an unplanned but handy usage of CHFNAM is to resetG  *  the version numbers of all or specific (wildcards) files in a given   *  directory:  *  *      $ chfnam *.c (or)   *      $ chfnam *.*  *M  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */   