Operating System - OpenVMS
1754355 Members
4908 Online
108813 Solutions
New Discussion юеВ

Device 'KB:' in VAX BASIC

 
cckcwong
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
my_terminal="KB:"
STAT_L=SYS$ASSIGN(my_terminal,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.
6 REPLIES 6
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
by VAX BASIC.

-- Rob
John Gillings
Honored Contributor

Re: Device 'KB:' in VAX BASIC

>I didn't know that synonym was accepted
>by VAX BASIC

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:

$ DEFINE KB SYS$INPUT

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

cckcwong,

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
Hoff
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
cckcwong
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 : )
cckcwong
Occasional Contributor

Re: Device 'KB:' in VAX BASIC

Very useful. Thanks a lot.