OpenVMS tips & advice

Since some people asked me about this, if it’s perhaps a good idea: a thread dedicated to tips and advice for OpenVMS, with regard to administration, maintenance, system (node and cluster) configuration and so on. Things like DCL and RMS will, naturally, stand central.

Feel free to ask about anything. Please stay on topic, so that it’ll remain nicely seamless and therefore readable. For more complex problems, separate threads seem to be appropriate and more in order; especially when it involves writing full fledged programs (in MACRO-32/64, C, C++, Pascal, FORTRAN, COBOL or whatever).

Here are a few tips when you use [FONT=“Courier New”]PHONE[/FONT], the OpenVMS Phone Facility.

You’re discussing something and an e-mail just came in from someone you were expecting from. Instead of terminating the call you can do the following:

Ctrl/Y
$ SPAWN

[FONT=“Courier New”]PHONE[/FONT] unfortunately doesn’t have a [FONT=“Courier New”]SPAWN[/FONT] command integrated, like for example [FONT=“Courier New”]MAIL[/FONT] and the TPU/EVE (Extensible Versatile Editor, via [FONT=“Courier New”]$ EDIT /TPU[/FONT] or [FONT=“Courier New”]$ EDIT /TPU /INTERFACE=DECWINDOWS[/FONT]) editor have. So, once you suspended the process and spawn a new process, you can check your mail.

After that, simply do:

$ LOGOUT
$ CONTINUE

That should continue the suspended [FONT=“Courier New”]PHONE[/FONT] process. You may need to hit Ctrl/W, to refresh the screen.

Another tip, if you have figures and percentages to discuss (with extensive use of the percent sign [%]), here’s how to change the default escape character or switch hook:

PHONE /SWITCH_HOOK="`"

This is something that people around me have shown interest for, namely remote DECwindows sessions.

First of all, this is not very hard or overly complicated, but can rather give problems with specific versions (with or without ECO patch levels and such), in terms of ease of use. It also depends how. For example, X over [URL=“http://en.wikipedia.org/wiki/DECnet”]DECnet is considerably easier than forwarded via TCP/IP with SSH.

This is what I used:[LIST][]host, the [FONT=“Courier New”]GEIN::[/FONT] node of “[URL=“http://forums.psx-dude.net/showpost.php?p=101387&postcount=2”]Deathrow”:
Compaq AlphaServer DS10L, with a DEC Alpha EV6/21264 processor clocked at 466 MHz and 256 MB RAM running OpenVMS Alpha V7.3-1
[LIST][
]Process Software MultiNet V5.0, rev. A-X (TCP/IP stack and services)
[]DECwindows/Motif V1.2-6 (X server and windowing environments)[/LIST]
[
]client, my laptop:
Acer Aspire 6920G, with an Intel Core2 Duo T8300 processor clocked at 2400 MHz and 4 GB RAM running Windows 7 SP1 x86-64
[LIST][]SSH (V2) with [URL=“http://tldp.org/HOWTO/XDMCP-HOWTO/ssh.html”]X forwarding, via [URL=“http://www.chiark.greenend.org.uk/~sgtatham/putty”]PuTTY V0.61 as the terminal emulator
[
]Xming V6.9.0.31 as the X server (locally)[/LIST][/LIST]

Things like configuring font servers I’ve skipped. Although it should be possible, if you tunnel it; however, Xming somehow choked on it (the last time I quickly tried it). What I do recommend, is that you run it as a single window, which looks better for the CDE-based DECwindows (else the Windows window title bar and widgets will ruin it a bit).

The whole idea is: [LIST=1][]Start Xming;
[
]Use PuTTY, with X forwarding enabled, to connect to a remote host (“Deathrow” in this example);
[]Once logged in, I used/you can use the [FONT=“Courier New”]DEMO[/FONT] account (which is [FONT=“Courier New”][DEMO_GROUP,DEMO][/FONT]);
[
]Type the following command:

$ MCR DECW$STARTLOGIN

Or, the full command via [FONT=“Courier New”]RUN[/FONT]:

$ RUN SYS$SYSTEM:DECW$STARTLOGIN.EXE;1

For repeated, common, usage you can also define a symbol in your [FONT=“Courier New”]LOGIN.COM[/FONT]:

$ OPEN /APPEND LOGIN_PROCEDURE SYS$LOGIN:LOGIN.COM
$!
$! Whatever you wish or prefer: "startx" is obviously very 
$! UNIX and Linux-derived (if that's what you're used to, 
$! and can't get around it, then by all means use it).  
$ WRITE LOGIN_PROCEDURE "$ STARTX :== $SYS$SYSTEM:DECW$STARTLOGIN"
$ CLOSE LOGIN_PROCEDURE
$!
$! To verify it went well:
$ SEARCH SYS$LOGIN:LOGIN.COM STARTX
$! 
$! Either define the symbol, without having to log out 
$! and in, or simply execute LOGIN.COM:
$ @SYS$LOGIN:LOGIN 

[/LIST]

Without going into too much detail, when you’ve done that, you should get the DECwindows (CDE) login prompt. Simply log in as you’d normally do within the CLI (DCL) environment. Eventually, below is the result you should get in the Xming window:

[CENTER][SIZE=“1”]

[COLOR=“DimGray”](click to enlarge)[/COLOR][/SIZE][/CENTER]

When you’re done, you simply log off in the DECwindows session (with the “EXIT” button in the CDE dock) and then stop the DECwindows processes, if necessary:

$ SHOW USER /FULL `myself`
$!
$! Or, more specifically: 
$ PIPE SHOW USER /FULL `myself` | SEARCH SYS$PIPE DECW,X,CDE
$!
$ STOP `DECwindows process`

Feel free to post your screenshots on the forum (preferably in a separate thread), to share your success. :slight_smile:

This is quite important under OpenVMS, to get the (emulated) terminal device right. I could recommend anyone to use VT100 emulation by default, especially if you use a terminal emulator like PuTTY.

In OpenVMS, make sure to run or incorporate the following in your [FONT=“Courier New”]LOGIN.COM[/FONT]:

$ SET TERMINAL /INQUIRE /VT100

By doing this, the DEC LK-type keyboard keys are mapped correctly, or better surely. Particularly useful for text editing, I’d actually say a must (especially for functionality like the “Do” button).

Thanks for posting the tutorial about how to enable DECwindows session. Here is are my screenshots :

Emgee, thank you really for helping me out. I know consider you as my mentor in OpenVMS. You rock dude. :thumbs up

Well done! I hope this will be a motivation to others, to try it out as well. Now I guess the desktop customizations, with XV and what-not, can begin.

Make sure to also try out the classic DECwindows sometime (instead of the CDE-based “New Desktop”). Before you log in, at the DECwindows login shell, you can pick it from the “Options > Session” drop-down/context menu. Just so you know, the classic DECwindows is still included with the latest release of OpenVMS (V8.4).

By the way, have you also tried SSH with X forwarding under Linux? It should be very easy (with X and so forth readily available), especially for the remote font server configuration.

Thanks for another tip, Yes I was able to try it out with my Backtrack 5 r2 Linux but the problem is, after it launches the desktop especially the classic and the new desktop, it crashes, dunno why?

How did you invoke SSH, could you show us the command? Did you get any errors? You may want to enable extra verbose output (e.g. the [FONT=“Courier New”]-vvv[/FONT] flag), to see what may go wrong.

my command was: ssh -X username@deathrow.vistech.net

I was able to go through the login page but after that it crashes. anyways regarding ur advice, lemme try that first

Have you tried the [FONT=“Courier New”]-Y[/FONT] flag already?

ssh -Y `username`@deathrow.vistech.net

hurrah it worked, thanks dude. :bash

That’s good to hear! Did you eventually also manage to do it with the Encompasserve [FONT=“Courier New”]EISNER::[/FONT] node? So you’ll see what the more modern OpenVMS Alpha V8.3 (2006) looks like. With the HP logos superimposed where the Compaq — and before that, DEC “[COLOR=“DarkRed”][[/COLOR]d[COLOR=“DarkRed”]|[/COLOR]i[COLOR=“DarkRed”]|[/COLOR]g[COLOR=“DarkRed”]|[/COLOR]i[COLOR=“DarkRed”]|[/COLOR]t[COLOR=“DarkRed”]|[/COLOR]a[COLOR=“DarkRed”]|[/COLOR]l[COLOR=“DarkRed”]][/COLOR]” — logos used to be, as one of the most apparent immediate differences, visually speaking.

not yet, but I’ll try that then.:fly2:

Another quick tip. For interactive compilation and assembling, you can invoke MACRO-32/64, BASIC, C, C++ or any other compiler or assembler by simply feed it the interactive process (terminal) input. In the below example I’ll be using the C compiler:

$ CC SYS$INPUT
#include <stdio.h>

int main()
{
        printf("SYS$INPUT C test
");
        return(0);
}

[ Exit ] (Ctrl/Z)

After that, a file called “[FONT=“Courier New”].OBJ[/FONT]” should be in your current [FONT=“Courier New”]DEFAULT[/FONT] directory. You can link and execute it, best would be also to rename it (like “[FONT=“Courier New”]a.out[/FONT]” typically in UNIX/-derived environments), as seen below:

$ RENAME .OBJ TEST.OBJ
$ LINK TEST
$ RUN TEST
SYS$INPUT C test

The nice thing is you instantly see the compiler warning and error outputs, as you type. For example:

$ CC SYS$INPUT
#define <stdio.h>

void main()

#define <stdio.h>
........^
%CC-W-BADMACRONAME, "#define" directive is not followed by an identifier and 
is being ignored.
at line number 1 in file SYS$INPUT:.;
{
        print("Hello
");
        return(1);
}

[ Exit ] (Ctrl/Z)

        print("Hello
");
........^
%CC-I-IMPLICITFUNC, In this statement, the identifier "print" is implicitly 
declared as a function.
at line number 5 in file SYS$INPUT:.;

        return(1);
........^
%CC-W-VOIDRETURN, The function "main" has return type void, and so must not 
contain a return statement with an expression.
at line number 6 in file SYS$INPUT:.;

As you may, or may not, know: On the pure command line interpreter level, on the file system and with DCL, there’s little support for foreign character sets and special symbols. Below a little demonstration of what is readily available and possible:

$! My default terminal device type is VT102, from the VT100-series:  
$ PIPE SHOW TERMINAL | SEARCH SYS$PIPE DEVICE
Terminal: _FTA1886:   Device_Type: VT102         Owner: EMGEE

Now we’re trying to write some words containing foreign (read: non-English) characters:

$ CREATE EUROPEAN_PLACES_VT100.TXT
Th|ringen
Gvteborg
Cefaly
Elsa_
Eland
[ Exit ]  (Ctrl/Z)

As you can see, the characters aren’t recognized correctly.

Now we’re going to try the same, but then with VT400 emulation:

$ SET TERMINAL /DEVICE_TYPE=VT400
$ PIPE SHOW TERMINAL | SEARCH SYS$PIPE Device_Type
Terminal: _FTA1886:   Device_Type: VT400_Series  Owner: EMGEE
$!
$ CREATE EUROPEAN_PLACES_VT400.TXT
Thüringen
Göteborg
Cefalù
Elsaß
Åland
[ Exit ]  (Ctrl/Z)

That works.

Let’s try to create a file on the disk with a special character:

$ CREATE RØST.TXT
%CREATE-E-OPENOUT, error opening DISK$USERS:[USERS.EMGEE]RØST.TXT; as output
-RMS-E-CRE, ACP file create failed
-SYSTEM-W-BADFILENAME, bad file name syntax

As you can see, an ODS-2 volume won’t support this.

Let’s try the same on an ODS-5 volume:

$ CREATE SYS$LOGIN_ODS5:RØST.TXT
Test
[ Exit ]  (Ctrl/Z)

Now to verify:

$ DIRECTORY SYS$LOGIN_ODS5:RØST.TXT

Directory DISK$USERS_ODS5:[USERS.EMGEE]

RØST.TXT;1

Total of 1 file.
$!
$! (In case you were wondering, "SYS$LOGIN_ODS5" is one of my personal logicals.)

That works, ODS-5 supports this.

nice more tutorials…

This is one of the main reasons why I don’t like this forum to disappear coz it helps me who is an OpenVMS n00b learn more. XD

Btw for Linux users edit this configuration first:

/etc/ssh/ssh_config

Make sure that these values are set to yes:

#   ForwardX11
#   ForwardX11Trusted

You can compress the x11 data if it is kinda slow:

ssh -X -C user@hostname

:candle:

That’s indeed useful. Not to nitpick for the sake of nitpicking, but that’s of course not just ‘for Linux’ though. That will work for just about any operating system that can run a modern SSH client, typically based on something like OpenSSH.

ah yes =))