Operating System - OpenVMS
1753902 Members
9229 Online
108810 Solutions
New Discussion юеВ

Procedure to create Symbols for Unix to VMS Commands

 
Jeff Osick
New Member

Procedure to create Symbols for Unix to VMS Commands

Has anyone bothered to create a DCL procedure to create VMS symbols for Unix commands to their VMS equivilents ?
ie: cd :== "set def"
I've seen lots of translation "tables" on the web but no actual procedure that maps them.
Thanks
2 REPLIES 2
Steven Schweda
Honored Contributor

Re: Procedure to create Symbols for Unix to VMS Commands

I suspect that more (or better?) searching
would find more.

Some of us tend to avoid these kinds of
things, for a variety of reasons. For
example, "cd" really needs more than a
one-line symbol definition, because a
(no-argument)
cd
is really more like
set default sys$login
than it is like (plain)
set default
(which is not well behaved).

A clean mapping between non-equivalent sets
may not exist, and a messy mapping may cause
more pain than gain.

I'll admit that I have a few of these things
in my LOGIN.COM ('pwd == "show default"', for
example), but my method is to wait until I've
typed the UNIX-like command many times, and
even then, I still only add the ones where
the mapping is pretty clean. I also
celebrate quietly every time I do something
like
set default [.fred]
create /directory []
which I can't do elsewhere. (But I'm easily
entertained.)

I generally find it more satisfactory to (try
to) switch my brain to accommodate the
current environment, rather than try to make
the current environment act (vaguely) like
some other environment.

And there's always GNV "bash" (for some
values of "always").
Joseph Huber_1
Honored Contributor

Re: Procedure to create Symbols for Unix to VMS Commands

Well especially cd can't be emulated by just a DCL alias (cd ../../foo/src ?).
For many GNU shell and text utilities the best is to install GNV.
Many of the GNV commands work from DCL, except those which expect wildcard filespecs expanded.
For those I define DCL aliases like

$ bash :== $GNU:[bin]bash
$ ls == "bash -c ""ls"
$ rm == "bash -c ""rm"
$ cat == "bash -c ""cat"
$ gdiff == "bash -c ""diff"
$ grep == "bash -c ""grep"
$! egrep == "bash -c ""egrep"
$! fgrep == "bash -c ""fgrep"
$ touch == "bash -c ""touch"

so "ls */" works as expected.

Since "cd" is a bash built-in, it can't be cused like this.
I use a dcl$path:cd.com
http://www.mpp.mpg.de/~huber/util/com/cd.com

which is 'almost Unix".
It needs /util/main/unix_to_vms.C from the above website.
http://www.mpp.mpg.de/~huber