% VAX-11 Librarian V04-00pRrG7yG7N5NFSNAMEyG7 1 NFSNAMECThe NFSNAME utility takes a general Unix filename specification andCconverts it to a VAX/VMS file specification, applying the rules forEcharacter translation used by TGV Multinet-NFS v3.0. These rules areCspelled out in detail in Section 4.3 of the NFS Client Users Guide.Format:4 NFSNAME unix_filespec [VMS_symbol] 2 Parameters unix_filespec? A string of up to 255 characters containing a valid Unix fileG specification. The s pecification need not be a real file on a mountedE Unix disk, and may include a relative directory specification. The? last part of the filespec is assumed to be a file name, not a; directory name. There is no checking for file existence.F If the Unix file specifcation contains any lower case characters, itG must be enclosed in quotation marks (" ") as a command line argument.VMS-symbol (optional)F The name of a local VMS symbol into which the converted VAX/VMS fileA spec ification will be written. If no symbol name is given, the) filespec will be written to SYS$OUTPUT.2 Return_valueC If unix_filespec includes a rooted directory specification (e.g.,H /users/smith/data), the root directory is compared to the volume names@ of all mounted NFS disks. If a match is found, the NFS device> specification is included in the VAX/VMS file specification.E If no match for a rooted directory is found, a VMS rooted directory+ specification is returned with no device.D If only a relative directory specification is provided, then a VMSA directory specification with no device will always be returned.$ See EXAMPLES for more information. 2 AlgorithmD The Unix/VMS filename conversion algorithm is described in detail,G with a table of character conversions, in both the NFS Server and NFS1 Client Users Guides provided with TGV Multinet.G 1) '$' is the escape character. It is used to mark the beginning of" special characte r sequences.F 2) If a '$' appears in the Unix filespec, it is replaced with '$$'.K 3) Lower case letters in the Unix filespec are replaced with upper case.F 4) A change between lower case and upper case is marked with a '$'.G 5) In the Unix filespec, the first '.' maps to the VMS filename/typeJ delimiter '.'. All succeeding '.' chararacters in the Unix filespec7 are converted to the character escape code '$5N'.B 6) In a directory name, all '.' characters in the Unix name are) converted to the escape code '$5N'.D 7) The Unix special directories '.' and '..' are converted to theA null string and the special VMS directory '-' respectively.H 8) The Unix directory delimiter '/' is converted to the VMS directory delimiter '.'.E 9) Special characters which do not appear in the VAX/VMS characterA set are converted to '$nx' escape codes, where n is a digitG between 4 and 9, and x is an arbitrarily assigned character. See9 the TGV Multinet NFS manuals for the complete list.F 10) Eight bit characters (ASCII code > 127) in the Unix filespec are= converted to escape codes '$nnn' where nnn is the octal' representation of the ASCII code.H 11) If the Unix filename contains no '.' delimiters, and the resultingD VMS filename is more than 39 characters long, '$.' is inserted3 after the 38th character of the VMS filename. 2 ExamplesH Assume that the Unix disk '/usr' has been NFS-mounted as device NFS2:.@ $ NFSNAME "/usr/smith/Data.DIR/testFile.run255~" VMSFILE $ SHOW SYM VMSFILED VMSFILE = "NFS002:[SMITH.$D$ATA$5N$DIR]TEST$F$ILE.RUN255$9E"G The user has provided a full (rooted) Unix file specification, with aE root directory that has been mounted on the VAX/VMS system via NFS.A The user has also provided the name of a VMS symbol to hold the converted filespec. $ NFSNAME "bin/myprog" [.BIN]MYPROG@ Here the  user provided a relative directory specification, andB requested that the converted filename be written to the terminalB (SYS$OUTPUT). Notice that this Unix string contained no special9 characters, so it was converted directly to upper case.+ $ NFSNAME "/jones/source/TauXSec.c"# [JONES.SOURCE]$T$AU$XS$EC.CG Here the user provided a rooted directory, but one which has not beenH mounted via NFS. With no device available, a rooted VAX/VMS directory string is return ed.2 Installation_NotesF NFSNAME is a self-contained program, which does not require MultinetG or other third-party software. It does require VMS 5.0 or later, and@ the VAX/VMS Fortran complier and run-time library. NFSNAME isC distributed as a BACKUP save-set, NFSNAME.BCK, which contains theC source and include files for the program, an installation command procedure, and this help file.= Users should restore the save-set to a subdirectory and runA @MAKE_NFSNAME to pro duce the command executable, a link library= containing Fortran-callable subroutine, and a help library.F A system logical name, NFSNAME_DIR, should be defined (/SYS/EXEC) toG point to the directory to which the software was installed. SystemD managers must define a foreign command in SYLOGIN.COM in order for& users to access the NFSNAME command:* $ NFSNAME :== $NFSNAME_DIR:NFSNAMEH System managers should also add NFSNAME_DIR:NFSNAME.HLB to the list ofE installed help libraries, by modifying SYSTARTUP_V5.COM (or a local# command procedure invoked from it? $ DEFINE/SYS/EXEC HLP$LIBRARY_n NFSNAME_DIR:NFSNAME.HLBA where "_n" may be left off if no other local help libraries are> installed, and n=(1,2,3,...) specifies additional local help libraries. 3 CopyrightH Copyright (c) 1993 Trustees of the California Institute of TechnologyE This product is provided on an as-is basis, and no warranty is madeF for merchantibility, fitness  of use, or suitability for a particularG purpose. This product may be copied, modified, and distributed freelyD provided that (a) no cliams for product use are made, and (b) thatA copyright notices contained in in any parts of this product are retained unaltered. 3 SupportG NFSNAME was written by Michael H. Kelsey, currently (1993) a graduateH student at the California Institute of Technology. E-mail support forG this product is available from kelsey@cithex.caltech.edu (Internet),6 CITHEX::KELSEY (DECnet), and KELSEY@CITHEX (BITNET).ww