I've had a problem with Universe that I haven't been able to figure out. When I log onto an account I get a message with some verbiage:
>uv
UniVerse Command Language 11.3
Copyright Rocket Software, Inc. or its affiliates, All Rights Reserved 1985-2016
BARS.DWHS logged on: Mon Nov 27 19:17:38 2023
ESC[?1hESC=ESC[HESC[2JESC[1;30HDry Storage Main Menus
When I have my terminal type set to xterm I get this annoying ESC[?1h string that puts the terminal into application mode. That changes what the arrow keys send and messes up some of my input routines.
Where the %#$^ is that coming from? I don't even know what that UV logon message is called which is probably why I haven't found any documentation for it in any of the manuals. I'd look for some banner file but it's not just text. It's under UV program control because it knows the term type and changed what is sent based on that.
Can anyone clue me in to where to look?
Thanks!
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
Joe,
The characters are coming from the terminfo file.
A bit of background first of all
The UNIX terminfo facility lets you build efficient, portable, and hardware-independent routines in your programs. terminfo comprises a database of terminal capabilities and the library routines that provide access to this database. Each supported terminal's capabilities are defined in a separate file that is compiled into binary format for efficiency.
terminfo files enable programs to send appropriate escape sequences to a terminal by referencing functional descriptions of the terminal's capabilities. At execution time, the escape sequence needed for a particular capability is taken from the terminfo definition for the terminal. On input, a program can determine what function key or control key has been entered by comparing the input sequence
against the terminfo definition.
UniVerse provides extensions to the BASIC language that let you use standard UNIX terminfo capabilities and terminal capabilities available only to UniVerse applications. UniVerse also provides tools that simplify the creation and modification of terminal definitions.
In short based on your description then what it means is that there something wrong with xterm terminfo definition or the terminal emulator you are using does not recogonise xterm correctly.
UniVerse does provide the ability to decompile / change and recompile the terminfo library.
I would suggest you read the section in the UniVerse Administratrion Manual on the terminfo library as a starting point. In terms of working out what is actually at fault, it could take a while if you don't have any prior knowledge of terminfo.
What terminal emulator are you using. Have you tried using Dynamic Connect to see if the problem happens when using that emulator.
Regards,
------------------------------
Jonathan Smith
UniData ATS
Rocket Support
------------------------------
I've had a problem with Universe that I haven't been able to figure out. When I log onto an account I get a message with some verbiage:
>uv
UniVerse Command Language 11.3
Copyright Rocket Software, Inc. or its affiliates, All Rights Reserved 1985-2016
BARS.DWHS logged on: Mon Nov 27 19:17:38 2023
ESC[?1hESC=ESC[HESC[2JESC[1;30HDry Storage Main Menus
When I have my terminal type set to xterm I get this annoying ESC[?1h string that puts the terminal into application mode. That changes what the arrow keys send and messes up some of my input routines.
Where the %#$^ is that coming from? I don't even know what that UV logon message is called which is probably why I haven't found any documentation for it in any of the manuals. I'd look for some banner file but it's not just text. It's under UV program control because it knows the term type and changed what is sent based on that.
Can anyone clue me in to where to look?
Thanks!
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
Hi Joe,
I don't think what you are describing is related to the UV login banner is it looks to display correctly.
I'm guessing you have a LOGIN paragraph/proc which starts your application and the behavior is related to displaying the "Dry Storage Main Menus" string on the screen. The display of "Dry Storage Main Menus" should not be part of the UV login banner.
ESC[?1hESC=ESC[HESC[2JESC[1;30HDry Storage Main Menus
As noted in another post, the issue is likely that your xterm terminal type is not recognizing how the character sequences used to display the application menus.
Neil
------------------------------
Neil Morris
Universe Advanced Technical Support
Rocket Software
------------------------------
Joe,
The characters are coming from the terminfo file.
A bit of background first of all
The UNIX terminfo facility lets you build efficient, portable, and hardware-independent routines in your programs. terminfo comprises a database of terminal capabilities and the library routines that provide access to this database. Each supported terminal's capabilities are defined in a separate file that is compiled into binary format for efficiency.
terminfo files enable programs to send appropriate escape sequences to a terminal by referencing functional descriptions of the terminal's capabilities. At execution time, the escape sequence needed for a particular capability is taken from the terminfo definition for the terminal. On input, a program can determine what function key or control key has been entered by comparing the input sequence
against the terminfo definition.
UniVerse provides extensions to the BASIC language that let you use standard UNIX terminfo capabilities and terminal capabilities available only to UniVerse applications. UniVerse also provides tools that simplify the creation and modification of terminal definitions.
In short based on your description then what it means is that there something wrong with xterm terminfo definition or the terminal emulator you are using does not recogonise xterm correctly.
UniVerse does provide the ability to decompile / change and recompile the terminfo library.
I would suggest you read the section in the UniVerse Administratrion Manual on the terminfo library as a starting point. In terms of working out what is actually at fault, it could take a while if you don't have any prior knowledge of terminfo.
What terminal emulator are you using. Have you tried using Dynamic Connect to see if the problem happens when using that emulator.
Regards,
------------------------------
Jonathan Smith
UniData ATS
Rocket Support
------------------------------
Hi Neil and Johnathon,
Thanks for the help!
As I understand it, when Universe starts the first thing it does is execute the UV.LOGIN proc if one exists in the UV account. I modified the UV.LOGIN to print "TEST" and this is what I got:
UniVerse Command Language 11.3
Copyright Rocket Software, Inc. or its affiliates, All Rights Reserved 1985-2020
EIS logged on: Tue Nov 28 08:53:08 2023
ESC[?1hESC=TEST
So the banner displays, something outputs the escape sequence and then the UV.LOGIN proc is executed. What's happening between starting up UV and Universe executing the UV.LOGIN proc?
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
Hi Neil and Johnathon,
Thanks for the help!
As I understand it, when Universe starts the first thing it does is execute the UV.LOGIN proc if one exists in the UV account. I modified the UV.LOGIN to print "TEST" and this is what I got:
UniVerse Command Language 11.3
Copyright Rocket Software, Inc. or its affiliates, All Rights Reserved 1985-2020
EIS logged on: Tue Nov 28 08:53:08 2023
ESC[?1hESC=TEST
So the banner displays, something outputs the escape sequence and then the UV.LOGIN proc is executed. What's happening between starting up UV and Universe executing the UV.LOGIN proc?
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
Hi Joe,
The ESC[?1h= is an escape sequence, the escape sequence is something that the combintation of terminal emulator / terminal setting and terminfo file should interpret into some screen action. The combination is not recogonizing the sequence as an action so just outputs the string.
For example the terminfo file for a vt100 terminal defines the escape sequence to turn on Bold Lettering as 'bold=\\E[1m'. So in your code you may use an @ sequence to told on bold, and the background that action would generate the Bold escape sequence if you were using a vt100 terminal and the terminal emulator should then recogonise that sequence and do whatever it needs to do turn on Bold.
So the escape sequence that is being displayed indicates that your terminfo information for xterm is not correct or the combination of terminal type and terminal emulator are not working as they should for a xterm setting type. My advice would be either try a different terminal type / terminal emulator. If you cannot do that and are limited in choice by the type you have to use and emulator you have to use, you will need to work out from the terminfo file which action / sequence is incorrect.
Regards,
------------------------------
Jonathan Smith
UniData ATS
Rocket Support
------------------------------
Hi Joe,
The ESC[?1h= is an escape sequence, the escape sequence is something that the combintation of terminal emulator / terminal setting and terminfo file should interpret into some screen action. The combination is not recogonizing the sequence as an action so just outputs the string.
For example the terminfo file for a vt100 terminal defines the escape sequence to turn on Bold Lettering as 'bold=\\E[1m'. So in your code you may use an @ sequence to told on bold, and the background that action would generate the Bold escape sequence if you were using a vt100 terminal and the terminal emulator should then recogonise that sequence and do whatever it needs to do turn on Bold.
So the escape sequence that is being displayed indicates that your terminfo information for xterm is not correct or the combination of terminal type and terminal emulator are not working as they should for a xterm setting type. My advice would be either try a different terminal type / terminal emulator. If you cannot do that and are limited in choice by the type you have to use and emulator you have to use, you will need to work out from the terminfo file which action / sequence is incorrect.
Regards,
------------------------------
Jonathan Smith
UniData ATS
Rocket Support
------------------------------
Hi Johnathan,
I do understand how terminals work :). I wrote the terminal drivers for CompuSheet+ and all the emulators for AccuTerm (except for the VTxx terminals that were written by Pete).
That specific escape sequence changes what the keypad sends from the default of "ESC[" to ESCO".
I can stop it by telling setting AccuTerm to not allow application mode. That's just a patch though. I want to see why the code to start application mode being sent. It's something that Universe is doing that I can't find it documented anywhere.
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
Hi Johnathan,
I do understand how terminals work :). I wrote the terminal drivers for CompuSheet+ and all the emulators for AccuTerm (except for the VTxx terminals that were written by Pete).
That specific escape sequence changes what the keypad sends from the default of "ESC[" to ESCO".
I can stop it by telling setting AccuTerm to not allow application mode. That's just a patch though. I want to see why the code to start application mode being sent. It's something that Universe is doing that I can't find it documented anywhere.
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
This will be something that the application you are using is doing. It's not something that UniVerse itself has an option to do.
------------------------------
Jonathan Smith
UniData ATS
Rocket Support
------------------------------
Hi Neil and Johnathon,
Thanks for the help!
As I understand it, when Universe starts the first thing it does is execute the UV.LOGIN proc if one exists in the UV account. I modified the UV.LOGIN to print "TEST" and this is what I got:
UniVerse Command Language 11.3
Copyright Rocket Software, Inc. or its affiliates, All Rights Reserved 1985-2020
EIS logged on: Tue Nov 28 08:53:08 2023
ESC[?1hESC=TEST
So the banner displays, something outputs the escape sequence and then the UV.LOGIN proc is executed. What's happening between starting up UV and Universe executing the UV.LOGIN proc?
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
You mean LOGIN not UV.LOGIN
------------------------------
Will Johnson
Systems Analyst
Rocket Forum Shared Account
------------------------------
This will be something that the application you are using is doing. It's not something that UniVerse itself has an option to do.
------------------------------
Jonathan Smith
UniData ATS
Rocket Support
------------------------------
Ok, let me ask this a different way. How can I execute a program that runs after the uv command and before it executes the UV.LOGIN proc in the UV account? That's what's happening here. UV starts up, something runs that's doing some terminal initialization and then the UV.LOGIN is executed.
That's the problem. If it's something our application is doing, I can't find it.
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
You mean LOGIN not UV.LOGIN
------------------------------
Will Johnson
Systems Analyst
Rocket Forum Shared Account
------------------------------
Hi Will,
When Universe starts up, its looks for a global UV.LOGIN proc in the VOC of the UV account and executes it. It does this for all accounts and it's run first before any account specific procs or paragraphs like a local LOGIN proc. In my original example I was logging on the the BARS.DWHS account. There's a BARS.DWHS proc in the VOC that starts the menu. (It's a Pick flavored account so it looks for a proc matching the account name). There is no LOGIN in that account so as far as I know nothing else is being executed that I have any control over.
I'm probably missing something. Does anyone know where the UV startup process is documented?
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
Hi Joe,
I don't think what you are describing is related to the UV login banner is it looks to display correctly.
I'm guessing you have a LOGIN paragraph/proc which starts your application and the behavior is related to displaying the "Dry Storage Main Menus" string on the screen. The display of "Dry Storage Main Menus" should not be part of the UV login banner.
ESC[?1hESC=ESC[HESC[2JESC[1;30HDry Storage Main Menus
As noted in another post, the issue is likely that your xterm terminal type is not recognizing how the character sequences used to display the application menus.
Neil
------------------------------
Neil Morris
Universe Advanced Technical Support
Rocket Software
------------------------------
Hi Neil,
The ESC[?1hESC= sequence are being sent by something before the main UV.LOGIN proc is executed. I have no idea what is doing it but it only happens when I first login to UV. For example, logging to a different account with LOGTO doesn't do it. That eliminates any account login proc or paragraph. I also know it's not the UV UV.LOGIN global proc. I can also execute it manually and I don't get those characters.
By the way "ESC[?1hESC=" are being sent by the UV initialization. The "ESC[2JESC[1;30H" are from the menu that does a clear screen and then positions the cursor.
I understand it's coming from the xterm terminfo item but it looks to me to be part of Universe's terminal initialization and not something in my application or control.
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
I've had a problem with Universe that I haven't been able to figure out. When I log onto an account I get a message with some verbiage:
>uv
UniVerse Command Language 11.3
Copyright Rocket Software, Inc. or its affiliates, All Rights Reserved 1985-2016
BARS.DWHS logged on: Mon Nov 27 19:17:38 2023
ESC[?1hESC=ESC[HESC[2JESC[1;30HDry Storage Main Menus
When I have my terminal type set to xterm I get this annoying ESC[?1h string that puts the terminal into application mode. That changes what the arrow keys send and messes up some of my input routines.
Where the %#$^ is that coming from? I don't even know what that UV logon message is called which is probably why I haven't found any documentation for it in any of the manuals. I'd look for some banner file but it's not just text. It's under UV program control because it knows the term type and changed what is sent based on that.
Can anyone clue me in to where to look?
Thanks!
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
Hi Joe,
As far as I know there are four parts you need to check:
- UV account, SYS.MESSAGE file, record 001029. This contains the first part of what you see (i.e. the "UniVerse Command Language…" and the subsequent couple of lines). If you use ED on it and enter the "up-arrow mode" (i.e. type "^" at the command prompt in the editor to display any control codes that are in the file) you can check if the odd escape sequence has been embedded in this record that is displayed every time someone logs in.
- UV account, VOC file, UV.LOGIN record. This record is executed whenever anyone logs into any UniVerse account on the system. It may contain something that displays the codes you see.
- Your current account, LOGIN record. This may contain something that displays these codes when you login to the specific account.
- Finally, if you're using a Pick-flavoured account, I believe UniVerse also looks for a VOC entry in the account which has the same name as the account itself. This is then treated as a login process and gets run when a user logs into the specific account!
Hopefully one of these four areas will reveal the source of your problems!
------------------------------
Martin Shields
Senior Technical Consultant
Meier Business Systems PTY LTD
Carnegie VIC AU
------------------------------
Hi Joe,
As far as I know there are four parts you need to check:
- UV account, SYS.MESSAGE file, record 001029. This contains the first part of what you see (i.e. the "UniVerse Command Language…" and the subsequent couple of lines). If you use ED on it and enter the "up-arrow mode" (i.e. type "^" at the command prompt in the editor to display any control codes that are in the file) you can check if the odd escape sequence has been embedded in this record that is displayed every time someone logs in.
- UV account, VOC file, UV.LOGIN record. This record is executed whenever anyone logs into any UniVerse account on the system. It may contain something that displays the codes you see.
- Your current account, LOGIN record. This may contain something that displays these codes when you login to the specific account.
- Finally, if you're using a Pick-flavoured account, I believe UniVerse also looks for a VOC entry in the account which has the same name as the account itself. This is then treated as a login process and gets run when a user logs into the specific account!
Hopefully one of these four areas will reveal the source of your problems!
------------------------------
Martin Shields
Senior Technical Consultant
Meier Business Systems PTY LTD
Carnegie VIC AU
------------------------------
Hi Martin,
I had hopes for the SYS.MESSAGE 001029 record but it's just the part that displays before the escape sequence. Keep in mind that the escape sequence displays before the UV UV.LOGIN proc is executed. It doesn't do it for the wy50-vp emulation but I did see a different sequence running on a different emulation. It really looks like UV is trying to initialize the terminal to something other than a default Linux Console.
It's probably something internal to UV that's not documented anywhere. At this point I think I'll give up and work around it. The problem I've had is that it doesn't seem to be consistent. I have three virtual machines and it seems like the characters that the arrow keys send change and they stop working.
I'll come up with a work around for now. Maybe at some point someone will figure it out.
Thanks to everyone that tried to help. I really appreciate the time you've all spent.
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
Hi Martin,
I had hopes for the SYS.MESSAGE 001029 record but it's just the part that displays before the escape sequence. Keep in mind that the escape sequence displays before the UV UV.LOGIN proc is executed. It doesn't do it for the wy50-vp emulation but I did see a different sequence running on a different emulation. It really looks like UV is trying to initialize the terminal to something other than a default Linux Console.
It's probably something internal to UV that's not documented anywhere. At this point I think I'll give up and work around it. The problem I've had is that it doesn't seem to be consistent. I have three virtual machines and it seems like the characters that the arrow keys send change and they stop working.
I'll come up with a work around for now. Maybe at some point someone will figure it out.
Thanks to everyone that tried to help. I really appreciate the time you've all spent.
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
Hi Joe,
In that case there'd be an issue with the terminal type configured. The work-around might be to set the TERM environment variably before going into UV as something like "vt220" (i.e. something other than xterm or whatever it is being set to at the moment). IIRC vt220 should work okay with an xterm client, but you may need to try a few alternatives to work it out.
Best of luck,
Martin.
------------------------------
Martin Shields
Senior Technical Consultant
Meier Business Systems PTY LTD
Carnegie VIC AU
------------------------------
Ok, let me ask this a different way. How can I execute a program that runs after the uv command and before it executes the UV.LOGIN proc in the UV account? That's what's happening here. UV starts up, something runs that's doing some terminal initialization and then the UV.LOGIN is executed.
That's the problem. If it's something our application is doing, I can't find it.
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
Hi Joe,
This is odd behavior indeed. I am not currently aware of UniVerse executing anything between the display of the logon banner and the execution of the UV.LOGIN proc/paragraph. Given the problem was specific to the 'xterm' terminal type, my assumption was that the escape characters were based on attempts to send output to the terminal. What method was used in the UV.LOGIN proc/paragraph to print the string "TEST"? Could you insert something else before that like executing DATE and then maybe TIME? Would be interested to see where those escape sequences occur. If you haven't done something like this already.
Thanks,
Neil
------------------------------
Neil Morris
Universe Advanced Technical Support
Rocket Software
------------------------------
Hi Will,
When Universe starts up, its looks for a global UV.LOGIN proc in the VOC of the UV account and executes it. It does this for all accounts and it's run first before any account specific procs or paragraphs like a local LOGIN proc. In my original example I was logging on the the BARS.DWHS account. There's a BARS.DWHS proc in the VOC that starts the menu. (It's a Pick flavored account so it looks for a proc matching the account name). There is no LOGIN in that account so as far as I know nothing else is being executed that I have any control over.
I'm probably missing something. Does anyone know where the UV startup process is documented?
------------------------------
Joe Goldthwaite
Consultant
Phoenix AZ US
------------------------------
@Joe Goldthwaite
My understanding of the UV login process flow for interactive connections is this ...
When you first connect to a UV account, the UV.LOGIN command is read from the UV account VOC. If it exists, it is executed WITHIN the account you are entering (not within the UV account, as you might expect).
Then the account level login marcro search happens, running the first VOC entry that matches
- The userid logging in
- The account id being logged into
- the LOGIN command
So check the UV.LOGIN macro and look at the VOC of the entry account will process those commands.
How exactly are you printing "TEST" in the UV.LOGIN macro, btw?
Are you using the DISPLAY command or something else?
------------------------------
Gregor Scott
Software Architect
Pentana Solutions Pty Ltd
Mount Waverley VIC AU
------------------------------
Hi Joe,
In that case there'd be an issue with the terminal type configured. The work-around might be to set the TERM environment variably before going into UV as something like "vt220" (i.e. something other than xterm or whatever it is being set to at the moment). IIRC vt220 should work okay with an xterm client, but you may need to try a few alternatives to work it out.
Best of luck,
Martin.
------------------------------
Martin Shields
Senior Technical Consultant
Meier Business Systems PTY LTD
Carnegie VIC AU
------------------------------
Joe,
In case it helps,
ESC [ H and ESC [ 1 H are vt100 family 'home text cursor' sequence
ESC [ J is similarly a clear from cursor to end of screen
ESC [ K is clear from cursor to end of line
As the vt100-family does not have a single clear screen & home cursor command it is common for terminfo to generate the 'cursor to home and clear from cursor to end of screen' to get the same effect.
You can check what sequences are being generated by the O.S and UniVerse and their effects. For example at the O.S level type tput clear. This should cause the O.S terminfo file to generate a 'clear screen' sequence and send the cursor to the top LH corner. In UniVerse using PRINT @(-1) should have the same effect. You can check the contents of the string being sent by assigning it to a variable and looping through the string printing out the ASCII code values, both in BASIC and by redirecting the output from tput to a file and using od -cx on the result.
You can check the O.S terminal info database file using O.S utilities (these vary depending on the Unix version) and the UniVerse overlays using uvtic and uvtidc - see Rocket Knowledge article 000025796 for details.
As mentioned before by others, I suspect the xterm emulation is the issue here once you confirm that TERM is set to the correct terminal type and exported. I have seen xterm emulate clear screen in the past by sending 25 newlines, just to shunt the visible screen out of sight. I recommend loading Dynamic Connect - which is part of the U2 Clients package, available for free download from Rocket Business Connect under 'Resources -> Product Availability' , and using that. If everything works then its definitely xterm.
You may also find this item of use https://unix.stackexchange.com/questions/375743/why-clear-do-not-clear-whole-screen
Regards
JJ
------------------------------
John Jenkins
Thame, Oxfordshire
------------------------------