- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Using Perl on OpenVMS for remote file access
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2006 12:22 AM
тАО07-31-2006 12:22 AM
Using Perl on OpenVMS for remote file access
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2006 11:05 AM
тАО07-31-2006 11:05 AM
Re: Using Perl on OpenVMS for remote file access
$ perl -e "@a = glob '0""user password""::sys$manager:*.dat'; print join qq/\n/, @a;"
0"user password"::sys$sysroot:[sysmgr]accountng.dat
0"user password"::sys$sysroot:[sysmgr]decw$terminal_default.dat
0"user password"::sys$sysroot:[sysmgr]iogen$prefix.dat
0"user password"::sys$sysroot:[sysmgr]vmsimages.dat
0"user password"::sys$common:[sysmgr]amds$driver_access.dat
0"user password"::sys$common:[sysmgr]decw$autoconfig.dat
0"user password"::sys$common:[sysmgr]decw$fs_config.dat
0"user password"::sys$common:[sysmgr]decw$rgb.dat
0"user password"::sys$common:[sysmgr]dtss$config_template.dat
0"user password"::sys$common:[sysmgr]net$configure-lock.dat
0"user password"::sys$common:[sysmgr]vms$audit_server.dat
0"user password"::sys$common:[sysmgr]vms$images_master.dat
0"user password"::sys$common:[sysmgr]vmsimages.dat
As far as TCP/IP using Perl, that shouldn't really be any different on VMS than on other platforms.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-31-2006 11:38 AM
тАО07-31-2006 11:38 AM
Re: Using Perl on OpenVMS for remote file access
As Craig writes, just use 'glob' and 'stat' and 'open' as normal and provide with a remote filespec.
And of course you can always use the back-ticks:
perl -e "print foreach (`dir 0""hein password""::login.com`)"
So what did you try?
What seemed to be the problem?
Any error messages?
Any behaviour you can not explain or deal with?
Groetjes,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-01-2006 01:58 AM
тАО08-01-2006 01:58 AM
Re: Using Perl on OpenVMS for remote file access
It is not working as expected. Here are my findings:
This command is silently not working with -e, so i made it to be -w. See result:
perl -w "@a = glob '0""kees password""::pcmrar_ontw:[exe]*.exe'; print join qq/\n/, @a;"
Can't open perl script "@a = glob '0"kees password"::pcmrar_ontw:[exe]zip.exe'; print join qq/\n/, @a;": file
specification syntax error
%RMS-F-SYN, file specification syntax error
Tryed to put it in a script (one.pl):
@a = glob('0""kees password""::pcmrar_ontw:[exe]*.exe');
foreach(@a)
{
my $bewerk = $_;
print("glob vond $bewerk\n");
}
$ perl -w one.pl
glob failed (can't start child: invalid argument) at one.pl line 1.
Perl Version:
perl -V
This is perl, v5.8.6 built for VMS_AXP
The other suggestion works, but i am not able to make a script of it.
perl -e "print foreach (`dir 0""kees password""::pcmrar_ontw:[exe]zip.exe`)"
Directory 0"kees password"::PCMRAR_ONTW:[EXE]
ZIP.EXE;641 197 31-JAN-2000 14:29:11.09
Total of 1 file, 197 blocks.
Here i want to see if there are warnings, now it's not working anymore.
perl -w "print foreach (`dir 0""kees password""::pcmrar_ontw:[exe]zip.exe`)"
Can't open perl script "print foreach (`dir 0"kees password"::pcmrar_ontw:[exe]zip.exe`)": file specification
syntax error
%RMS-F-SYN, file specification syntax error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-01-2006 02:21 AM
тАО08-01-2006 02:21 AM
Re: Using Perl on OpenVMS for remote file access
Kees,
Try putting the perl in a script first.
I like using the -e for 'one liners' a lot, but the quotes can easily get too confusing.
The double quotes (for the name/pass) in the quoted string (for the filespec) in the quoted string (for the program) gets you about 3 levels deep and wondering whether you need to double up or triple up or what.
On a Unix platform you can put the program itself in single quotes, and use double quotes for interpretted symbols withing the program. However, on VMS the single quotes on hte command line start a substitution so can not be used.
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-01-2006 03:09 AM
тАО08-01-2006 03:09 AM
Re: Using Perl on OpenVMS for remote file access
The -w switch cannot be substituted for the -e switch. -w enables warnings and -e instructs Perl to run a "one-liner", i.e., take a string from the command line as a program instead of expecting the name of a file containing a program. You can certainly use them together, however:
$ perl -we "$x = 'hello'; "
Name "main::x" used only once: possible typo at -e line 1.
The problem in your one.pl script is that you left in the doubled up double quotes, which is necessary when DCL sees the string before Perl does, but dead wrong otherwise. As Hein points out, one-liners of any complexity can put you in a strange world that is the intersection of DCL syntax and Perl syntax; you need to be pretty comfortable with both to survive there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-02-2006 01:00 AM
тАО08-02-2006 01:00 AM
Re: Using Perl on OpenVMS for remote file access
I spend a lot of time expirimenting with quotes, but it is not working.
But i found a way to get files from a remote host with FTP.
The problem is that i want to rewrite DCL scripts to Perl and try to avoid using system calls. Now i spend a lot of time searching the internet for solutions and find that if there is one for windows or unix, its not working on VMS.
Thanks again! (i will make a new thread about Perl in VMS)