Re: UNIX to OpenVMS Script translation (596 Views)
Reply
Occasional Visitor
Andre de Wolf MVSS
Posts: 2
Registered: ‎06-02-2011
Message 1 of 9 (596 Views)

UNIX to OpenVMS Script translation

I've been given the attached UNIX script to translate to OpenVMS. I'm not very good with my unix command line so is there a tool available to more easy translate a unix script to VMS?
Honored Contributor
labadie_1
Posts: 1,221
Registered: ‎08-07-2003
Message 2 of 9 (596 Views)

Re: UNIX to OpenVMS Script translation

Hi

May be you could explain in pseudo-code what this script should do, as sed, syslog, armdsp, model or trace event do not have strict equivalence in OpenVMS (even if sed has been ported).
Honored Contributor
Steven Schweda
Posts: 9,091
Registered: ‎02-23-2005
Message 3 of 9 (596 Views)

Re: UNIX to OpenVMS Script translation

> [...] the attached UNIX script [...]

".rtf"? Did this script begin on a Windows
system, or was that your idea?

> [...] sed, syslog, armdsp, model or trace
> event do not have strict equivalence in
> OpenVMS [...]

At least. Also "/usr/sbin/ioscan",
"/usr/sbin/cmviewcl", and a host of others.
Define "translate to OpenVMS". What are you
actually trying to do?

> [...] is there a tool available [...]

No.
Honored Contributor
labadie_1
Posts: 1,221
Registered: ‎08-07-2003
Message 4 of 9 (596 Views)

Re: UNIX to OpenVMS Script translation

Steven

The VMS equivalent of
/usr/sbin/ioscan
is
$ mc sysman io auto

if memory serves me.

Honored Contributor
Hoff
Posts: 4,958
Registered: ‎01-29-2006
Message 5 of 9 (596 Views)

Re: UNIX to OpenVMS Script translation

This looks to be an under-commented and under-documented shell script (and probably using bash, though unfortunately lacking the hashbang) for HP Integrity servers and PA-RISC servers running HP-UX, and some sort of distributed web-based management of those servers.

This script provides a primitive web-based front end for an application that processes the network configuration and the hardware configuration, as well as looking at the server logs in some detail.

From what I see of it, it'll be a complete rewrite.

Most everything that this script is doing is specific to Unix, and a whole lot of what I see here is specific to HP-UX on PA-RISC and Integrity servers.

You'll need a programmer here that's somewhat familiar with bash HP-UX and very familiar with OpenVMS I/O and device configuration, and this "port" will be a complete rewrite of this script. As part of this "port", I'd look to move to a scripting language supported on all of the target platforms, and toward (somewhat) common source code.

All of the VMS scripting languages are either down-revision, or unsupported. Perl, php, Python, Lua, etc. And a DCL port would be full-parallel maintenance of two scripts.

As for the GNV bash implementation, that's a headache. Often a large one. All headaches and bash problems and limitations and omissions aside, this target task and involving tools such as ioscan, sasmgr, sautil and other HP-UX tools, will find GNV and its bash entirely inadequate. These tools are all platform-specific.

I'd likely also look at integrating this work with SNMP, but there may well be other scripts around that provide this path into the server.
Honored Contributor
Hoff
Posts: 4,958
Registered: ‎01-29-2006
Message 6 of 9 (596 Views)

Re: UNIX to OpenVMS Script translation

ASCII text-format conversion of the OP's RTF-format script attached.

ps: the target OpenVMS box here will also either need to have a web server configured and running (usually Apache or WASD) or the converted shell script will need to embed a web server.

(And yes, there are scripting languages around with libraries for easily embedding http services without requiring a web server. This approach is particularly useful if you can't load or can't assume or can't tie into a "traditional" web server on the target OpenVMS systems, and for whatever reason.
Honored Contributor
Hein van den Heuvel
Posts: 6,588
Registered: ‎05-19-2003
Message 7 of 9 (596 Views)

Re: UNIX to OpenVMS Script translation

Andre,

For starters, forget the Unix commands.
Just look at the output generated and see how you might generate similar, or the same, data for OpenVMS.
Some things will not map, many will.
This is not going to be a '5 minutes' job though!
Get ready for some tedious interpretationa and re-formatting.


Acclaimed Contributor
Dennis Handly
Posts: 25,184
Registered: ‎03-06-2006
Message 8 of 9 (596 Views)

Re: UNIX to OpenVMS Script translation

Also look at the names of the functions:
crashinfo ioscanSummary syslogSummary
This may or may not be useful.
Occasional Visitor
Andre de Wolf MVSS
Posts: 2
Registered: ‎06-02-2011
Message 9 of 9 (596 Views)

Re: UNIX to OpenVMS Script translation

Thanks very much all for your replies! Unfortunately it is as bad as I thought, but at least with the help of your answers it seems to be easier to start from scratch rather then trying to translate the script.
Kind Regards, Andre
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.