Operating System - OpenVMS
1828867 Members
2709 Online
109985 Solutions
New Discussion

set term/inq in sylogin.com - feature or bug?

 
SOLVED
Go to solution
Markus Waldorf_1
Regular Advisor

set term/inq in sylogin.com - feature or bug?

Hello,

Maybe this is a bit trivial, but could there be a bug in sylogin.com of 7.3-1.

I was wondering why I would always have to do a $set term/inq manually in order to get e.g. edit/tpu working. The command should be in sylogin.com, but somehow doesn't seem to apply.

After some debugging of sylogin.com (results below) I came to the following:

The line:
$ IF F$LOCATE("|''TT_DEVPREFIX'|",TT_NOINQUIR) .eq. F$Length(TT_NOINQUIR)
should probably read
$ IF F$LOCATE("|''TT_DEVPREFIX'|",TT_NOINQUIR) .NE. F$Length(TT_NOINQUIR)

A few more questions:

Sylogin.com states that
$! In SYSTARTUP_VMS.COM, add the following line:
$! $ DEFINE/EXECUTIVE/SYSTEM SYS$SYLOGIN SYS$STARTUP:SYLOGIN
$! This will cause SYLOGIN.COM to be executed for all DCL logins

To me it seems that sylogin.com is always executed, even if I don't have
$ sho sym sys$sylogin
%DCL-W-UNDSYM, undefined symbol - check validity and spelling


some results:

$ TT_DEVNAME = F$GETDVI("TT","TT_PHYDEVNAM")
$ sho sym tt_devname
TT_DEVNAME = "_TNA5:"
$ TT_DEVPREFIX = F$EXTRACT(1,2,TT_DEVNAME)
$ sho sym tt_devprefix
TT_DEVPREFIX = "TN"
$ write sys$output F$GETDVI("TT","DEVCLASS")
66
$ tt_page = f$getdvi("TT","TT_PAGE")
$ sho sym tt_page
TT_PAGE = 24 Hex = 00000018 Octal = 00000000030
$ devbufsiz = f$getdvi("TT","DEVBUFSIZ")
$ sho sym devbufsiz
DEVBUFSIZ = 80 Hex = 00000050 Octal = 00000000120
$ SET TERMINAL/INQUIRE/PAGE='tt_page'/WIDTH='devbufsiz'

$
$ write sys$output F$LOCATE("|''TT_DEVPREFIX'|",TT_NOINQUIR)
21
$ write sys$output F$Length(TT_NOINQUIR)
25
$ write sys$output F$LOCATE("|XX|",TT_NOINQUIR)
25

extract from sylogin.com:

$ IF F$LOCATE("|''TT_DEVPREFIX'|",TT_NOINQUIR) .eq. F$Length(TT_NOINQUIR)
$ THEN
$ ! Determine if this is a terminal
$ IF F$GETDVI("TT","DEVCLASS") .eq. 66
$ THEN
$ ! Determine what sort of terminal this is, and avoid resetting
$ ! the user's default display size settings in the process...
$ tt_page = f$getdvi("TT","TT_PAGE")
$ devbufsiz = f$getdvi("TT","DEVBUFSIZ")
$ SET TERMINAL/INQUIRE/PAGE='tt_page'/WIDTH='devbufsiz'
$ EndIf
$ EndIf



9 REPLIES 9
Karl Rohwedder
Honored Contributor
Solution

Re: set term/inq in sylogin.com - feature or bug?

Markus,

to me the line in SYLOGIN containing the F$LOCATE looks correct: the list specifies the devices, for which a /INQUIRE is not needed, if your device is not in this list (.eq.f$length),then a /INQUIRE must be performed.

The TN device is in this list, because TELNET from another VMS host sends the terminal characteristics so a /INQUIRE is not needed.

May be you should adapt this list to your needs.

mfg Kalle
Uwe Zessin
Honored Contributor

Re: set term/inq in sylogin.com - feature or bug?

> $ sho sym sys$sylogin
> %DCL-W-UNDSYM, undefined symbol - check validity and spelling

You have confused a logical name with a symbol - use:
$ show logical sys$sylogin
.
Wim Van den Wyngaert
Honored Contributor

Re: set term/inq in sylogin.com - feature or bug?

I use a lot of RLOGIN instead of TELNET (no password required, handy). I also get a TN device and I have to do set term/inq to avoid problems (problem origin VMS 5.5 and 6.2, not in all sessions and I don't remember what exactly went wrong but I think it was TPU).
Btw : I always do set term/insert.

Wim
Wim
Jan van den Ende
Honored Contributor

Re: set term/inq in sylogin.com - feature or bug?

Markus,


$ DEFINE/EXECUTIVE/SYSTEM SYS$SYLOGIN SYS$STARTUP:SYLOGIN


and


To me it seems that sylogin.com is always executed, even if I don't have


Similar to so VMS file elements, SYS$SYLOGIN has a -- default -- file specification, in this case SYS$MANAGER:SYLOGIN.COM, but _IF_ the logical name is defined, _THEN_ that is executed.
There can be many reasons to specify an alternate location, eg, if the cluster for whatever reason has > 1 system disks.

PS. in my opinion it would have been more correct to also include the file TYPE ( .COM ) in the logical name.
At least that allows simply specifying SYS$SYLOGIN as the file to be SEARCHed, EDITted, PURGEd, or whatever.
In the default definition
$ @SYS$SYLOGIN
will work, because for "@" the default filetype is .COM, but for all other commands is is needed to evaluate the logical name and add ".COM" or use an F$PARSE construct.
I prefer to make things easy on myself whenever and whereever possible!

for an explanation of the parse mechanism:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=830390

hth.

Proost.

Have one on me.

Jan
Don't rust yours pelled jacker to fine doll missed aches.
Wim Van den Wyngaert
Honored Contributor

Re: set term/inq in sylogin.com - feature or bug?

Did some testing without doing the set term/inq on 7.3.

Got differences in hangup, insert/overstrike.

It seems that the settings of tna0 are used as a template. But modifying them and do a show afterwards and it seems that the change is not remembered. Strange.

Wim
Wim
Ian Miller.
Honored Contributor

Re: set term/inq in sylogin.com - feature or bug?

the telnet protocol passes settings from to the remote system. The default SYLOGIN does not do SET TERM/INQ for telnet devices because its assuming those settings are going to be fine.
Personally I remove TN from the noinquire list but it depends on your setup.

The logic is
IF the device name prefix is not in the list
THEN
IF the device is a terminal
THEN
do a inquire preserving the display size

F$LOCATE returns the length of its 2nd parameter if the first string paramter is not found.
____________________
Purely Personal Opinion
Markus Waldorf_1
Regular Advisor

Re: set term/inq in sylogin.com - feature or bug?

Hi,

I was under the impression that a "set term/inq" should always be done if there was a DEVCLASS of 66 attached to one of the scanned DEVPREVIX's. But I understand now that it shouldn't be necessary. So it seems the problem is with the VT emulation client, which could be a settings problem.

Also the logic behind having a logical for sylogin.com is clear to me know.

Thanks for all your answers!
Thomas A. Williams
Regular Advisor

Re: set term/inq in sylogin.com - feature or bug?

I guess I'm missing something in the "set terminal/inquire" logic. I'm coming in via either telnet (TN device), or SSH (FT) device, so the "/inquire" isn't done. That means DEC_CRT, Advanced video, etc. doesn't get set. I need the "set term/inquire" to set these up. Can someone explain why the F$LOCATE is there? I've tried Attachmate Extra, WRQ Reflection, and Hyperterminal, and they all come back with a device type of "unknown" when I do a "show terminal". After a "set term/inq", I get a VT Device type.
Hoff
Honored Contributor

Re: set term/inq in sylogin.com - feature or bug?

There are cases when you have your terminal set up as you want it, and the arriving inquire sequence messes up what you have for a display.

If you don't like what you have happening or your particular sequence survives the inquire sequence, then certainly change the DCL of SYLOGIN -- that's kinda the point of SYLOGIN, after all. It's site specific.

This thread seems to continue over in http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1121667