|
|
|
|
|
|
| Author |
Message |
Mark Berryman *nix forums addict
Joined: 04 Aug 2005
Posts: 50
|
Posted: Fri Mar 03, 2006 4:16 pm Post subject:
Unix to VMS filename translation
|
|
|
Is there any way to turn off the period to underscore translation in the VMSIFY
routine?
I am using the HP kit of Perl 5.8.6 and as the following example shows, a
period in a directory name is being converted to an underscore.
use VMS::Filespec;
$udir1 = '../dir1/dir.period/file';
$udir2 = '../dir1/dir^.period/file';
$vdir1 = vmsify($udir1);
$vdir2 = vmsify($udir2);
printf "$vdir1\n$vdir2";
$ perl test.pl
[-.dir1.dir_period]file
[-.dir1.dir^_period]file
Even when the exta period is escaped it gets translated to an underscore. This
happens if I invoke VMSIFY directly and also happens behind the scenes (the
Unix filespec is being passed to the copy function in the program where I
discovered this issue).
Is there any way to turn this off or am I going to have to modify code?
Also, it would appear that the Perl version of vmsify is not the same as the C
version (e.g. there is no underscore translation in the Perl version). Is this
a known issue?
Mark Berryman |
|
| Back to top |
|
 |
John E. Malmberg *nix forums Guru Wannabe
Joined: 30 May 2005
Posts: 264
|
Posted: Fri Mar 03, 2006 5:04 pm Post subject:
Re: Unix to VMS filename translation
|
|
|
Mark.Berryman@Mvb.Saic.Com wrote:
| Quote: | Is there any way to turn off the period to underscore translation in the VMSIFY
routine?
I am using the HP kit of Perl 5.8.6 and as the following example shows, a
period in a directory name is being converted to an underscore.
|
Which kit? The special one for the SYMLINK SDK or the normal one?
| Quote: | use VMS::Filespec;
$udir1 = '../dir1/dir.period/file';
$udir2 = '../dir1/dir^.period/file';
$vdir1 = vmsify($udir1);
$vdir2 = vmsify($udir2);
printf "$vdir1\n$vdir2";
$ perl test.pl
[-.dir1.dir_period]file
[-.dir1.dir^_period]file
Even when the exta period is escaped it gets translated to an underscore. This
happens if I invoke VMSIFY directly and also happens behind the scenes (the
Unix filespec is being passed to the copy function in the program where I
discovered this issue).
Is there any way to turn this off or am I going to have to modify code?
|
Some of the support is in the current blead perl. It is not complete,
but is getting better all the time. Activation of the support requires
setting the DECC$ feature logicals.
The patches needed for the core modules to honor the DECC$ for Perl
5.8.7 have previously been posted to this mailing list, but were not in
a format suitable for inclusion into the main perl code. With out that
support, what is present in blead is not real useful.
$ perl test.pl
[-.dir1.dir_period]file
[-.dir1.dir^_period]file
$ define decc$efs_charset enable
$ perl test.pl
[-.dir1.dir^.period]file
[-.dir1.dir^^.period]file
$ perl --version
This is perl, v5.8.7 built for VMS_AXP
| Quote: | Also, it would appear that the Perl version of vmsify is not the same as the C
version (e.g. there is no underscore translation in the Perl version). Is this
a known issue?
|
Yes. That version of vmsify is for non-VMS systems only. Neither can
properly handle EFS character sets, and both are also getting some of
the ODS-2 translations wrong.
-John
wb8tyw@qsl.net
Personal Opinion Only |
|
| Back to top |
|
 |
Mark Berryman *nix forums addict
Joined: 04 Aug 2005
Posts: 50
|
Posted: Fri Mar 03, 2006 7:51 pm Post subject:
Re: Unix to VMS filename translation
|
|
|
John E. Malmberg wrote:
| Quote: | Mark.Berryman@Mvb.Saic.Com wrote:
Is there any way to turn off the period to underscore translation in
the VMSIFY
routine?
I am using the HP kit of Perl 5.8.6 and as the following example
shows, a
period in a directory name is being converted to an underscore.
Which kit? The special one for the SYMLINK SDK or the normal one?
|
The normal kit.
| Quote: |
use VMS::Filespec;
$udir1 = '../dir1/dir.period/file';
$udir2 = '../dir1/dir^.period/file';
$vdir1 = vmsify($udir1);
$vdir2 = vmsify($udir2);
printf "$vdir1\n$vdir2";
$ perl test.pl
[-.dir1.dir_period]file
[-.dir1.dir^_period]file
Even when the exta period is escaped it gets translated to an
underscore. This
happens if I invoke VMSIFY directly and also happens behind the
scenes (the
Unix filespec is being passed to the copy function in the program
where I
discovered this issue).
Is there any way to turn this off or am I going to have to modify code?
Some of the support is in the current blead perl. It is not complete,
but is getting better all the time. Activation of the support
requires setting the DECC$ feature logicals.
The patches needed for the core modules to honor the DECC$ for Perl
5.8.7 have previously been posted to this mailing list, but were not
in a format suitable for inclusion into the main perl code. With out
that support, what is present in blead is not real useful.
$ perl test.pl
[-.dir1.dir_period]file
[-.dir1.dir^_period]file
$ define decc$efs_charset enable
$ perl test.pl
[-.dir1.dir^.period]file
[-.dir1.dir^^.period]file
$ perl --version
This is perl, v5.8.7 built for VMS_AXP
So, for 5.8.6, there is no switch or logical that controls this aspect |
of the filename translation? I need to modify to the code to get what I
need?
On a related note (since I'm going to have to change code anyway): does
any one know why the logical DECC$FILENAME_UNIX_ONLY impacts the -e
switch? As in:
$
$ DEFINE DECC$FILENAME_UNIX_ONLY FALSE
$ perl -e "print 1;"
1
$ DEFINE DECC$FILENAME_UNIX_ONLY TRUE
%DCL-I-SUPERSEDE, previous value of DECC$FILENAME_UNIX_ONLY has been
superseded
$ perl -e "print 1;"
Can't open perl script "-e": no such file or directory
%RMS-E-FNF, file not found
$
Mark Berryman |
|
| Back to top |
|
 |
Craig A. Berry *nix forums Guru Wannabe
Joined: 27 May 2005
Posts: 143
|
Posted: Fri Mar 03, 2006 8:21 pm Post subject:
Re: Unix to VMS filename translation
|
|
|
At 12:51 PM -0700 3/3/06, Mark Berryman wrote:
| Quote: | On a related note (since I'm going to have to change code anyway): does any one know why the logical DECC$FILENAME_UNIX_ONLY impacts the -e switch? As in:
$
$ DEFINE DECC$FILENAME_UNIX_ONLY FALSE
$ perl -e "print 1;"
1
$ DEFINE DECC$FILENAME_UNIX_ONLY TRUE
%DCL-I-SUPERSEDE, previous value of DECC$FILENAME_UNIX_ONLY has been superseded
$ perl -e "print 1;"
Can't open perl script "-e": no such file or directory
%RMS-E-FNF, file not found
|
My guess would be we're doing a syntax-only parse and considering it
a switch rather than a file when the parse fails. With
DECC$FILENAME_UNIX_ONLY enabled, "-e' is probably considered a valid
filename, so we follow a different path, the one expecting it to be
the name of a Perl script. That will need to be verified by stepping
through the code, and of course something ought to be done about it.
--
________________________________________
Craig A. Berry
mailto:craigberry@mac.com
"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser |
|
| Back to top |
|
 |
John E. Malmberg *nix forums Guru Wannabe
Joined: 30 May 2005
Posts: 264
|
Posted: Fri Mar 03, 2006 10:37 pm Post subject:
Re: Unix to VMS filename translation
|
|
|
Craig A. Berry wrote:
| Quote: | At 12:51 PM -0700 3/3/06, Mark Berryman wrote:
On a related note (since I'm going to have to change code anyway): does any one know why the logical DECC$FILENAME_UNIX_ONLY impacts the -e switch? As in:
$
$ DEFINE DECC$FILENAME_UNIX_ONLY FALSE
$ perl -e "print 1;"
1
$ DEFINE DECC$FILENAME_UNIX_ONLY TRUE
%DCL-I-SUPERSEDE, previous value of DECC$FILENAME_UNIX_ONLY has been superseded
$ perl -e "print 1;"
Can't open perl script "-e": no such file or directory
%RMS-E-FNF, file not found
|
With Perl 5.8.6, the null device on OpenVMS is coded as NLA0:.
When that and later versions of Perl are processing a "-e" line on the
command, they try to open the NULL device. If they fail, Perl prints
out the message that you see instead of pointing out it could not open
the NULL device.
If you rebuild Perl 5.8.6 to use /dev/null as the null device you will
get past that point.
However even the variant perls that I am playing with are not able to
handle DECC$FILENAME_UNIX_ONLY yet, and probably will not for a while.
Too much of perl is using VMS file specifications internally to C
runtime functions, and not just in VMS.C. I Doubt that anyone soon is
going to get all those cases fixed.
| Quote: | My guess would be we're doing a syntax-only parse and considering it
a switch rather than a file when the parse fails.
|
Nope.
I supposed no one tested the case where Perl was unable to open the NULL
device, so no one noticed the error message was misleading.
-John
wb8tyw@qsl.net
Personal Opinion Only |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Wed Dec 03, 2008 2:18 am | All times are GMT
|
|
Mortgages | Mortgage | Quick Collect | Debt Consolidation | Loans
|
|
Copyright © 2004-2005 DeniX Solutions SRL
|
|
|
|
Other DeniX Solutions sites:
Unix/Linux blog |
electronics forum |
medicine forum |
science forum |
|
|
Privacy Policy
|
Powered by phpBB © 2001, 2005 phpBB Group
|
|