Skip to main content

I am on a Universe system and it does not save the TCL command stack from session to session.  How do i turn that on and have it shared for a user over multiple sessions?  Also, what file is the stack saved in?

I am on a Universe system and it does not save the TCL command stack from session to session.  How do i turn that on and have it shared for a user over multiple sessions?  Also, what file is the stack saved in?

Troy,

The command stack is kept in &SAVEDLISTS& and the featue is enabled - or disabled - by STACKWRITE. There is additional information on the file name (&SAVEDLISTS& is a  Type 1 file) and various options under &SAVEDLISTS&:

STACKWRITE
STACKWRITE is an X record that indicates whether the sentence stack processor should maintain the sentence stack after you log out.

Listing

STACKWRITE
001: X
002: ON | OFF

If field 2 of this record contains ON, the sentence stack is saved on logout. If this field contains OFF, the sentence stack is not saved.

Note: UniVerse loads the values for STACKWRITE when UniVerse starts. Any modifications to the values do not take effect until you restart UniVerse.

Hoping this helps

JJ


I am on a Universe system and it does not save the TCL command stack from session to session.  How do i turn that on and have it shared for a user over multiple sessions?  Also, what file is the stack saved in?

By default the stack saved in &SAVEDLISTS& has an id based on the user name and user number. So if you start a session with the same user name and user number as a saved stack entry, it will be loaded. If a match doesn't exist, then the stack would be empty. 

You could also look at the SAVE.STACK and GET.STACK commands. These commands allow for saving the stack under a name of your choosing and the ability to load it when starting a new uv session. 

Thanks,

Neil


I am on a Universe system and it does not save the TCL command stack from session to session.  How do i turn that on and have it shared for a user over multiple sessions?  Also, what file is the stack saved in?

OK, the WRITESTACK is set to ON.  I checked the &SAVEDLISTS& file and it is saving it to &&S.USERNAME.1 OR .2 OR .4.  i suspect maybe the port.  If I log back in though, it is not reloading it even if I get the same port.  I tried the SAVE.STACK and GET.STACK and that works, but cumbersome and need to do it.  Also, I am getting timed out at TCL.  Where is that set?


I am on a Universe system and it does not save the TCL command stack from session to session.  How do i turn that on and have it shared for a user over multiple sessions?  Also, what file is the stack saved in?

The following is an example on an internal test system. When you quit from UniVerse, is the entry in &SAVEDLISTS& being updated? If so, you are indicating that starting a new session in the same account with the same username and user number doesn't reload the saved stack entry? Can you try a similar test?

>.L
14 LOGIN
13 TEST1
12 XYZ
11 DEF
10 JDJ
09 WHO
08 QUIT
07 LOGIN
06 WHO
05 QUIT
04 LOGIN
03 WHO
02 QUIT
01 LOGIN
>.L STACKWRITE

     STACKWRITE
001 X
002 ON
>QUIT
# date
Tue Dec  3 14:43:26 EST 2024
# ls -l ?SAVEDLISTS?
total 56
-rw-r--r--    1 root     system           74 Dec  3 14:43 &&S.root.113
-rw-rw-rw-    1 root     system            0 Oct 22 2012  .Type1
-rw-r--r--    1 root     system           48 May 12 2021  NEIL
-rw-r--r--    1 root     system           32 Dec 21 2018  NEIL2
-rw-rw-rw-    1 root     system        10925 May 18 2023  NPM
-rw-rw-rw-    1 root     system            7 Jul  1 2016  TESTCASE.1
# uv
UniVerse Command Language 11.3
Copyright Rocket Software, Inc. or its affiliates, All Rights Reserved 1985-2021
morrisn logged on: Tue Dec  3 14:37:26 2024

IN LOGIN
>.L
16 LOGIN
15 TEST1
14 XYZ
13 DEF
12 JDJ
11 WHO
10 QUIT
09 LOGIN
08 WHO
07 QUIT
06 LOGIN
05 WHO
04 QUIT
03 LOGIN
02 QUIT
01 LOGIN
>WHO
113 morrisn From root
>


I am on a Universe system and it does not save the TCL command stack from session to session.  How do i turn that on and have it shared for a user over multiple sessions?  Also, what file is the stack saved in?

Troy

Also worth checking for anything on ON.EXIT, LOGOUT, OFF or any login pargraphs/PROCs that could be interfering if the stack is not being saved. I recommend testing in the default XDEMO or HS.SALES and looking for any difference in behaviour.

Regards

JJ


I am on a Universe system and it does not save the TCL command stack from session to session.  How do i turn that on and have it shared for a user over multiple sessions?  Also, what file is the stack saved in?

If you find you are having getting the sentence stack back, or getting the correct one if your @USERNO changes, you can use GET.STACK and SAVE.STACK commands to use a desired stack.

Note that in production, a LOGIN paragraph or PROC will launch an application and keep users from the command prompt. Over time, each login ID will accumulate a myriad of &&S.LoginName.UserNumber entries in &SAVEDLISTS& that will contain one or more copies of "LOGIN".


I am on a Universe system and it does not save the TCL command stack from session to session.  How do i turn that on and have it shared for a user over multiple sessions?  Also, what file is the stack saved in?

@ John Jenkins

The STACKWRITE value is read when the user logs in to an account. It is when the UniVerse user session starts, not when UniVerse starts.


I am on a Universe system and it does not save the TCL command stack from session to session.  How do i turn that on and have it shared for a user over multiple sessions?  Also, what file is the stack saved in?

Not an answer to your question, but offer an alternative solution to the underlying problem: instead of using "raw" TCL use a wrapper that accepts input and stores the commands executed wherever you like.  Make this the default if a user exits from your application instead of full TCL.

I have a program that does this, with lots of quality of life improvements for programmers, but it works for regular users too.  For each command executed, I store the user, date, time, account and command so there's a full audit trail.  At some customers I remove the delete option from the program, so it's "immutable" (as long as the users don't know where the data is being stored of course), and there's a weekly report to a security team of what people are up to at TCL.

https://github.com/ianmcgowan/SIMBIAN.BP/ - not an [AD], it's MIT licensed, go crazy with it :_)


I am on a Universe system and it does not save the TCL command stack from session to session.  How do i turn that on and have it shared for a user over multiple sessions?  Also, what file is the stack saved in?

You can also use your favourite shell (eg bash, zsh or Win pwsh) to invoke uvsh and get all their features including a command stack you can scroll through and edit using arrow keys, autocomplete, colour highlighting, functions, aliases, etc., etc.