| Various Files Used for Vista Settings |
Back |
Session Files
If you start Vista by clicking an icon with no parameter, the connection window opens where you can select a session file or take the default saved from the last time you used Vista. In this case, standard.ses:

And we can choose (or specify) a host name. Then once we're ready, we can push Connect and away we go. At this point, these various files, located (by default) in Documents\TomBrennanSoftware\VistaTN3270 are used:
Now if we click a shortcut icon that indicates the session file, such as standard.ses, Vista will skip the connection window, open the session file, and connect to the last host name used by that session file. In this case, tn3270.company.com.
The session file, in blue above, contains most of the Vista parameters. It's a binary file, but in there we could find the window position and size, the font name and size, the colors you may have chosen, and most other settings on the Options window.
Keyboard, Toolbar, and Keypad Files
The session file also points to 3 other files, in this case standard.key which contains the keyboard layout, standard.bar which contains the toolbar layout, and standard.pad which contains the keypad layout. These all have graphic editors, shown below:



And you don't need to stick with the standard.* names, although that might be easiest if you only have one of each file type. If you want though, you can save multiple key files, for example, and point various session files to whatever one you need for a particular environment.
Note that the *.key, *.bar, and *.pad files are also binary like the *.ses file - so there's not much in there to see. Use the editors to modify the data in them.
Where is the Save Session Option?
When I worked with various terminal emulators before Vista, I would change a setting and invariably forget to click the Save Session button. So the next time I started the program my changes were lost. So with Vista, I've fixed that. When you make a change to any options, including even simple things like resizing the window, those changes are automatically saved. There is a File/Save-As function, but that's really for creating a new session file from the currently active one.
So where is the save session option? There is none.
Working with Multiple Vista Windows
The session file, such as standard.ses, is opened, read into memory, and then closed. It is not held open as (for example) the Word docx file you might be working on. This makes it possible to use the same session file for multiple windows, such as this image:

Note that the same shortcut can start multiple windows, but since the shortcut has a parm of standard.ses, every time we start a new window, the same session file is used.
Now this brings up an obvious issue. What happens when I make option or other changes that would automatically save the session file? Simple... each of the 3 Vista windows above will open/save/close the same session file. In other words, the last window to save "wins".
This may sound silly at first, but it saves a lot of hassle when you just want to start a new Vista window that looks just like the one you already have open.
Working with Multiple Session Files
Sometimes though, you may want to have separate session files for each Vista window. For example, let's say I want to color the border black for production, green for testing, and red for disaster recovery. The border color is stored in the session file, so we'll need 3 of them, such as below:
So above, I've created 3 shortcuts, pointing to A.ses, B.ses, and C.ses, along with those 3 session files. Note that we can still point all the session files to the standard key, bar, and pad files since in this example I don't need special changes for those between the A/B/C windows.
Now when I open shortcut A, it points to A.ses and whatever I save, such as the border color, doesn't affect the other 2 windows.
The VISTA.INI file
You may have noticed the file vista.ini in all the images above. Turns out that file is shared among ALL Vista windows. There is no pointer to it, and each Vista window will always use that file name.
This file is in text (yay!) and contains the hostnames, ports, LUnames, and encryption type for each hostname you see in the connection window. Please don't try to edit that list - it's a bit complex with the commas and all. Just make changes in the connection window and push Connect (or Save) and the changes are stored for you.
This file can also contain special INI options, which are things I've decided are little used enough that they don't deserve a checkmark or field on the Options window. Look up INI options in the Vista help if you are interested.
When you select a hostname in the connection window, the port and other information is obtained from vista.ini and displayed on the connection screen where it can be used (press Connect) or changed if needed.
So a list of 3 hostnames might look like this to the processing:
And on the connection screen those two new entries might look like this:


Hostname Aliases
The method above might work in most cases, but let's say you want to connect to the same hostname tn3270.company.com on two different ports, or two different LUnames? That's impossible with the data layout above, because there is only one spot for the port and LUname with each hostname.
That's where an Alias comes in handy. Instead of typing the actual connection host name, type an Alias name into the Host IP Name or Alias, whatever you want, such as Company Port 23:
Now of course you can't connect to Company Port 23 because it's not a valid DNS name or IP address. So instead click the Assign Alias button and type the real DNS or IP address there, such as:
Now when you connect to Company Port 23, it will use the tn3270.company.com DNS (or whatever you typed there) and connect successfully. Then we can create a new entry such as Company Port 992 as:
And then assign the SAME DNS name or IP address to that new entry.

This method allows us to have multiple port numbers, LUnames, and encryption methods to the same DNS or IP address.
Terminal Model Setting
You've probably noticed the Terminal Model settings in the images above, so let's mention those too. This is the one thing on the connection window that is NOT stored in vista.ini. Instead, it's stored in the session file. You may not really notice, but it may be good to know if there's ever any confusion.
Having separate session files for your different terminal models should solve any problems with that. The reason these settings are on the connection window is because it takes a reconnect in order to change them.
|