SMG-bases utilities and applications usually offer a history buffer: you can use the up and down keys to recall previous commands. However, this buffer is not persistant. As soon as you exit from the application or utility there is nothing to recall when you re-enter the very same application or utility.

To handle this, a replacement image for SMGSHR was developed, which at image exit writes the history buffer into a file in your login directory and which at image start pre-loads the file content into the history buffer.

Get a demo of the replacement image, send an email to: xhb dash info at vms2linux dot de.

Many VMS supplied utilities and third part applications or tools use SMG, for example NCL, CMS and Rdb/SQL$. Here a simple SMG program illustrate the feature of xhb. This program accepts any string as input and uses a SMG recall buffer, which is shown before the user is prompted to enter input.


Using smgDemo without the replacement image:
$ dir sys$login:.history
%DIRECT-W-NOFILES, no files found
$ run smgdemo
smgDemo> hello
Recall buffer:
1: hello
smgDemo> world
Recall buffer:
1: world
2: hello
smgDemo> goodbye
Recall buffer:
1: goodbye
2: world
3: hello
smgDemo> ^Z
%RMS-E-EOF, end of file detected
$ dir sys$login:.history
%DIRECT-W-NOFILES, no files found
$ run smgdemo
smgDemo> hello
Recall buffer:
1: hello
smgDemo> ^Z
%RMS-E-EOF, end of file detected
$ dir sys$login:.history
%DIRECT-W-NOFILES, no files found
$ 

Using smgDemo with the replacement image:
$ dir sys$login:.history
%DIRECT-W-NOFILES, no files found
$ run smgdemo
Recall buffer:
1: ! Xhb, Limited Trial Version, Copyright hb 2013
smgDemo> hello
Recall buffer:
1: hello
2: ! Xhb, Limited Trial Version, Copyright hb 2013
smgDemo> world
Recall buffer:
1: world
2: hello
3: ! Xhb, Limited Trial Version, Copyright hb 2013
smgDemo> goodbye
Recall buffer:
1: goodbye
2: world
3: hello
4: ! Xhb, Limited Trial Version, Copyright hb 2013
smgDemo>  ^Z
%RMS-E-EOF, end of file detected
$ dir sys$login:.history

Directory DISK$USER:[USER]

SMGDEMO.HISTORY;1   

Total of 1 file.
$ type sys$login:smgdemo.history
goodbye
world
hello
$
$ run smgdemo
Recall buffer:
1: goodbye
2: world
3: hello
4: ! Xhb, Limited Trial Version, Copyright hb 2013
smgDemo>  ^Z
%RMS-E-EOF, end of file detected