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.
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 - ExitYou must enter 1 thru 10, E or F10(Exit).
Use either item 3, 4 or 5 to change the values.
$ AREA== "$DSILIB:AREA_ASSIGNNow the command:
$ AREA TESTwill 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.