07-29-2012 04:48 AM
Here is a coding sample using getpwnam, glob, chown C calls which has been tested under both Linux Fedora 17 and OpenVMS IA64 V8.3-1H1.
Executed as is, the program in the URL below is purely useless. It only serves the purpose on how to use the getpwnam, glob and chown or for support staffs willing a ready to use program to troubleshoot these C calls. You will find all details at:
You will find all details at http://vouters.dyndns.org/tima/Linux-OpenVMS-C-Imp
In the hope this can help you in your daily work.
Solved! Go to Solution.
08-01-2012 11:56 AM
The same functionality using the Java language :
This code sample serves the same purposes as its C counterpart.
It works on both Linux Fedora 17 and OpenVMS IA64 V8.3-1H1. It uses Java/JNA to interface the getpwnam, chown and perror C calls. Because it uses JNA which can't be built using Java 1.5, this code only runs on OpenVMS Integrity servers.
Wish you fun with.
08-26-2012 04:48 AM
I just added the Windows environment to my Chown.java. Now both the the C and Java code indifferently run on Windows/OpenVMS/Linux. There two differences between the two codes. One is that the C version handles symlinks and fully dereferences them whereas the Java code is unable to (File class not designed for). The other is that the Java code indifferently accepts a Unix/OpenVMS/Windows input file syntax indifferently on Linux/OpenVMS/Windows.
Wish you fun with both codes.
11-10-2012 08:18 AM
As a quick personal exercise, here is the equivalent in Perl of the C program. You will find the Perl code at http://vouters.dyndns.org/tima/Linux-Windows-Cygwi
Perl/VMS as shipped by HP being fairly old and not supporting symlinks, the code in URL above is totally unrunnable on OpenVMS using HP's provided software.
In the hope this work can interest someone.