Appendix A. NFS-to-OpenVMS Filename Mapping

 

This appendix is a supplement to the NFS-OpenVMS Client and NFS-OpenVMS Server chapters in this guide. Mapping is done for the NFSv2 and NFSv3 clients when presenting the device as an OpenVMS ODS-2 device. When the NFSv3 client can present the mounted device as an OpenVMS ODS-5 device there is no filename mapping done other than to observe the process’s parameter for case sensitivity.

The following filename mapping rules are necessary because:

  TCPware NFSv2 Client must map (translate) special characters in NFS server filenames that are not valid in OpenVMS filenames.

  TCPware Server must map special characters in filenames users create on the NFS system client host that are not valid in OpenVMS filenames.

OpenVMS ODS-2disk filenames can be 39 characters long (as can file extensions) and include only the following characters:

0 through 9, A through Z, a through z, dollar sign ($), hyphen (-), and underscore (_)

OpenVMS files also include version numbers (after the semicolon) that cannot exceed the value 32767. The Server preserves these version numbers, and hard-links the highest numbered version to an unversioned filename (see the Note at the bottom of Table A-2).

NFS filenames can have any of the ASCII characters except the null character (octal 000) and the slash (/, or octal 057), which delimits directory levels. BSD UNIX filenames can have up to 255 characters.

The Client and the Server use the same filename mapping schemes. Four types of mapping schemes are available:

  SRI International mapping, the default scheme between UNIX and OpenVMS systems

  ODS5 mapping, for OpenVMS systems exporting an ODS5 disk. There is almost no mapping needed as most of the characters are allowed. If the system or disk does not support ODS5, then this defaults to SRI mapping.

Table A-1 shows the default SRI International mapping.

  PATHWORKS non-case-sensitive mapping (NFS-OpenVMS Server only)

  PATHWORKS case-sensitive mapping (NFS-OpenVMS Server only)

Table A-1     NFS-to-OpenVMS Character Sequence Mapping 

ASCII character...

Is mapped in OpenVMS to...

With octal value...

Ctrl/A (soh)

$4A

001

Ctrl/B (stx)

$4B

002

Ctrl/C (etx)

$4C

003

Ctrl/D (eot)

$4D

004

Ctrl/E (enq)

$4E

005

Ctrl/F (ack)

$4F

006

Ctrl/G (bel)

$4G

007

Ctrl/H (bs)

$4H

010

Ctrl/I (ht)

$4I

011

Ctrl/J (nl)

$4J

012

Ctrl/K (vt)

$4K

013

Ctrl/L (np)

$4L

014

Ctrl/M (cr)

$4M

015

Ctrl/N (so)

$4N

016

Ctrl/O (si)

$4O

017

Ctrl/P (dle)

$4P

020

Ctrl/Q (dc1)

$4Q

021

Ctrl/R (dc2)

$4R

022

Ctrl/S (dc3)

$4S

023

Ctrl/T (dc4)

$4T

024

Ctrl/U (nak)

$4U

025

Ctrl/V (syn)

$4V

026

Ctrl/W (etb)

$4W

027

Ctrl/X (can)

$4X

030

Ctrl/Y (em)

$4Y

031

Ctrl/Z (sub)

$4Z

032

Ctrl/[ (esc)

$6B

033

Ctrl/(fs)

$6C

034

Ctrl/] (gs)

$6D

035

Ctrl/^ (rs)

$6E

036

Ctrl/_ (us)

$6F

037

SPACE (sp)

$7A

040

!

$5A

041

"

$5B

042

#

$5C

043

$

$$ (See Rule 9 in Table A-2)

044

%

$5E

045

&

$5F

046

'

$5G

047

(

$5H

050

)

$5I

051

*

$5J

052

+

$5K

053

,

$5L

054

-

same

055

.

. or $5N (See Table A-2)

056

/

not mapped (directory delimiter)

057

0 to 9

same

060 to 071

:

$5Z

072

;

$7B

073

$7C

074

=

$7D

075

$7E

076

?

$7F

077

@

$8A

100

A to Z

same

101 to 132

[

$8B

133

 

$8C

134

]

$8D

135

^

$8E

136

_

same

137

`

$9A

140

a to z

same

141 to 172

{

$9B

173

|

$9C

174

}

$9D

175

~

$9E

176

DEL

$9F

177

octal 200 to ¿

$200 to $277

200 to 277 (Multinational)

À to octal 377

$300 to $377

300 to 377 (Multinational)

 

The NFS-to-OpenVMS filename translation rules in Table A-2 are based on the character mapping scheme in NFS-to-OpenVMS Character Sequence Mapping . The OpenVMS-to-NFS mapping rules are the converse of these rules.

Table A-2     NFS-to-OpenVMS Filename Translation Rules

Rule

What happens to filenames from NFS to OpenVMS...

1

Lowercase characters become uppercase (unless Rule 2 applies; see also Rule 3):

foobar.txt becomes FOOBAR.TXT;1

2

Initial uppercase characters or a sequence of case-shifted characters get a $ prefix:

CaseShiftedFile becomes $C$ASE$S$HIFTED$F$ILE.;1

3

An unversioned file gets a version number preceded by a semicolon:

foobar.txt becomes FOOBAR.TXT;1

4

If a filename does not include a file extension dot (.), it gets one before the version number semicolon:

foobar becomes FOOBAR.;1

5

After being translated, if a filename (or its extension after the dot) has more than 39 characters or the version number (after the semicolon) is greater than 32767, the file will not show up in an OpenVMS listing.

6

The first dot in a filename is preserved, unless the result fails the 39-character extension limit test in Rule 5 (if so, the dot becomes $5N). Each successive dot becomes $5N, unless the filename exceeds the limits in Rule 5.

more.file.txt becomes MORE.FILE$5NTXT;1

7

If the filename is a directory name, each dot in it becomes $5N and the filename gets the .DIR extension:

dot.directory.list becomes DOT$5NDIRECTORY$5NLIST.DIR;1

8

Invalid OpenVMS characters become the escape character sequences in the second column of NFS-to-OpenVMS Character Sequence Mapping  ($ followed by a digit and a letter):

special#character&file becomes SPECIAL$5CCHARACTER$5FFILE.;1            (# becomes $5C and & becomes $5F)

9

Any existing $ becomes $$ (plus any $ added due to Rule 2 or 8 above):

dollar$Sign$5cfile becomes DOLLAR$$$S$IGN$$5CFILE.;1

Note!     Many UNIX applications use only unversioned filenames and simply overwrite existing files. Normally, if you create a file with a new version number in OpenVMS, the Client and Server include the version number when displayed on the NFS server. Also, if foobar;9 is the highest-numbered version in NFS, the Client creates an unversionedfoobar file and hard-links to it. You can limit this versioning by specifying the /NOVERSION qualifier with the Client NFSMOUNT command; this limits the number of versions created to one, unless an accompanying Attributes Data File (ADF) specifies otherwise.

Keep in mind that the highest numbered version is not necessarily the most recent one, such as when you create a file explicitly with a lower version number than an existing one. For example, the Client and Server normally do not append a version number at the end of a foobar;1 file and just keep it as foobar, unless you explicitly specify foobar;1 with an already existing higher version of the file.