Operating System - OpenVMS
Showing results for 
Search instead for 
Did you mean: 

Device 'KB:' in VAX BASIC

Occasional Contributor

Device 'KB:' in VAX BASIC

We are going to migrate the old VAX VMS 6.2 System to ALPHA Open VMS 7.2. When we recompile and run the VAX BASIC program, we encounter runtime error. The statement causes error is shown as below.

DECLARE STRING my_terminal
DECLARE WORD term_chan

It seems the device "KB:" is no longer valid. Does anybody know that is there any other device name can replace "KB:"? Please help.
Robert Brooks_1
Honored Contributor

Re: Device 'KB:' in VAX BASIC

Well, it might help to know what, exactly, you plan to do with this channel after it's assigned, but taking a shot in the dark, you might have a bit of success with "TT:", although SYS$INPUT, SYS$OUTPUT, and SYS$ERROR
are also potential candidates.

Was this software originally written on RSTS/E?
"KB:" is definitely a carryover from RSTS/E; I didn't know that synonym was accepted by VAX BASIC, although there are a lot of RSTS/E-compatible language elements supported

-- Rob
John Gillings
Honored Contributor

Re: Device 'KB:' in VAX BASIC

>I didn't know that synonym was accepted

Nothing to do with BASIC, it's SYS$ASSIGN opening the channel. I suspect it was a site, or user specific logical name, probably something like:


You don't need to change the code, just define the logical name (though it might make sense to change it to something that won't generate another posting just like this one 10 years down the track when someone has the task of migrating to Itanium V8.3)
A crucible of informative mistakes
Robert Gezelter
Honored Contributor

Re: Device 'KB:' in VAX BASIC


Most likely, there is a definition for KB in some logical name table.

I recommend that a check be done on the operating context of the program(s) on the VAX. In particular, check any command files associated with running the code, as well as the commands used at login or system startup.

- Bob Gezelter, http://www.rlgsc.com
Honored Contributor

Re: Device 'KB:' in VAX BASIC

Issue SHOW LOGICAL KB on the OpenVMS VAX box, and see.

In all likelihood, KB: is now TT: -- but you'll want to confirm what other magic might happen with your local KB definition in your local OpenVMS environment.

I'd use TT: in preference to SYS$INPUT, as that latter logical name isn't necessarily a terminal.

All of which here means you can change your code, or you can find the old definition and haul it over.

Migrating to OpenVMS Alpha V8.3 (current) would be recommended; V7.2 is old and no longer supported; no new fixes have been created for that release for some years now. In any event, there have been BASIC ECO kits around over the years; get current with ECOs for whatever version you end up on.

Stephen Hoffman
HoffmanLabs LLC
Occasional Contributor

Re: Device 'KB:' in VAX BASIC

I use 'TT:' instead of 'KB:' in my BASIC program and it works fine. Thank you very much for all your valuable advice from the bottom of my heart : )