Operating System - OpenVMS
1752778 Members
6087 Online
108789 Solutions
New Discussion юеВ

Re: UNIX to OpenVMS Script translation

 
Andre de Wolf MVSS
New Member

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?
8 REPLIES 8
labadie_1
Honored Contributor

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).
Steven Schweda
Honored Contributor

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.
labadie_1
Honored Contributor

Re: UNIX to OpenVMS Script translation

Steven

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

if memory serves me.

Hoff
Honored Contributor

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.
Hoff
Honored Contributor

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.
Hein van den Heuvel
Honored Contributor

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.


Dennis Handly
Acclaimed Contributor

Re: UNIX to OpenVMS Script translation

Also look at the names of the functions:
crashinfo ioscanSummary syslogSummary
This may or may not be useful.
Andre de Wolf MVSS
New Member

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