Return to Works Index

DSI Works Area Utility

The area utility is a set of programs that allow a systematic control mechanism for both logicals and symbols that must be set up to access different sets (or areas) of databases. These setups may be for different customers, different applications or test versus production databases.

The area can be visualized as a table, where each row is a different logical or symbol and each column is a different area. Each logical or symbol is initialized for each area. When a new logical or symbol is added, it is added to all areas and all logicals and symbols are added to a new area.

The program DSILIB:AREA_ASSIGN is used to switch to an area and the program DSILIB:AREA_MAINT is used to maintain the area table.

The primary purpose is to prevent a logical from being defined in one area and not in another so that when a user switches from one area to another, there is no residual effect.If a logical or symbol does not contain a value in an area, then the area assign program will deassign the logical or symbol when switch to that area.

This should be used to control all logicals and symbols that are the same for each area. It should not be used for items which can be different for different users in the same area, as for example, a symbol for an operator number or a logical for a default print queue.

Area Table Maintenance

When the program DSILIB:AREA_MAINT is run, the following menu is displayed:

DSI Logical/Symbol Table Maintenance V1.0
  1  - Add new area
  2  - Add new entry
  3  - Update all entries for an area
  4  - Update all areas for an entry
  5  - Update one entry
  6  - Delete an area
  7  - Delete an entry
  8  - List all entries for an area
  9  - List all areas for an entry
  10 - Copy old area to new area
  E  - Exit
You must enter 1 thru 10, E or F10(Exit).

1 - Add new area

You will be prompted for the area to add. Upon pressing RETURN, the area will be added to the area table with all logicals deassigned and all symbols cleared.

Use either item 3, 4 or 5 to change the values.

2 - Add new entry

You will first be prompted for whether the new entry is a logical or a symbol. Next you will be prompted for the name of the new entry. The utility will then add the logical or symbol to all areas with no value.

3 - Update all entries for an area

After you enter the area you want to update, each logical and symbol will be displayed and can be changed. If you want the logical or symbol to be deassigned for this area, enter a minus sign. If you want the logical or symbol to contain a space, enter an asterisk.

4 - Update all areas for an entry

After you enter whether the entry is a logical or a symbol and the entry you want to update, the entry for each area will be displayed and can be changed. If you want the logical or symbol to be deassigned for this area, enter a minus sign. If you want the logical or symbol to contain a space, enter an asterisk.

5 - Update one entry

This prompts you for the area, logical or symbol, and the entry name and then allows you to change the entry.

6 - Delete an area

This prompts you for the area to delete and then asks "Sure DELETE area (Y/N) ?". After a Y is entered the area will be removed from the table.

7 - Delete an entry

This prompts you for Logical or symbol, the entry to delete and then asks "Sure DELETE entry (Y/N) ?". After a Y is entered the entry will be removed from all areas in the table.

8 - List all entries for an area

This item asks for the area name and then displays each entry in the area. 9 - List all areas for an entry This item asks for logical or symbol, the entry name and then displays the entry from all areas.

10 - Copy old area to new area

This item copies an existing area to a new area and retains all the values from the old area.

E - Exit

This exits the utility.

Area Assign Usage

To run the program DSILIB:AREA_ASSIGN, set up a symbol as follows:
$ AREA== "$DSILIB:AREA_ASSIGN

Now the command:

$ AREA TEST

will cause all the logicals and symbols in area TEST to be set to the specified state (either defined to the value or deassigned).

Generally an end user whose account is captive will have this run from either their LOGIN.COM or some other .COM file that is executed from their LOGIN.COM.

When the area command is given, the symbol DSI$_AREA_NAME will automatically be defined to be the area that was set up. This allows DCL procedures to save it off, change the area, and then re-initialize the logicals and symbols upon exiting.

The callable module ENTER_SUBMIT_TIME also processes the symbol DSI$_AREA_NAME and includes code to set up the area when the job runs in batch. This allows an interactive user, such as a programmer, to change to an area, run an program and have it submit a batch job that runs in the same area as the interactive job ran in. This eliminates the need to set up multiple usernames for different areas to run batch jobs.