Read-only profile pool extension variables

ISPF provides for a read-only extension of the application profile variable pool. This allows installations to maintain better control over application default profile variables. It also results in conservation of disk storage because a copy of these variables need not exist in the application profile of every application user.

To use the read-only extension, you do two things:

  1. First you must define the read-only extension. The read-only extension is actually a table, which you can create by using the ISPF TBCREATE table service. You add variables to this table as extension variables; that is, variables not specified when the table is created. This is illustrated in the CLIST procedure shown, using the SAVE keyword on the TBADD table service.

    You need to create the extension table only once. After the table is saved, you must define it to ISPF by using an ALLOCATE command or a LIBDEF service request.

  2. You then use DM variable services to put the name of the read-only extension table into system variable ZPROFAPP in the profile variable pool.

An example of a CLIST to create a read-only extension table named ROTABLE is shown in Figure 1. The table is to contain variables RDONLY1, RDONLY2, and RDONLY3 set to values of LKHFC, FLIST, and SPOOLFUL, respectively. After the procedure closes the table, it sets system variable ZPROFAPP to the table name, ROTABLE. The procedure then puts ZPROFAPP into the profile variable pool.

Figure 1. CLIST to create a read-only extension table
/* Example of creating a read-only extension table */
SET ROV1 = LKHFC
SET ROV2 = FLIST
SET ROV3 = SPOOLFUL
SET ROVLIST = &STR(ROV1 ROV2 ROV3)
ISPEXEC TBCREATE ROTABLE
ISPEXEC TBADD ROTABLE SAVE(&ROVLIST)
ISPEXEC TBCLOSE ROTABLE
SET &RC = &LASTCC
IF &RC = 0 THEN -
DO
  /* Put extension table name into system variable ZPROFAPP. */
  SET ZPROFAPP = ROTABLE
  ISPEXEC VPUT ZPROFAPP PROFILE
END

When a new application that uses the NEWAPPL keyword on the SELECT service is specified, ISPF interrogates variable ZPROFAPP in the new application's profile pool. If the variable value is not null, it is assumed to be the name of the profile extension table. ISPF searches the table input files for a table with the name specified by ZPROFAPP. The set of variables in this table becomes the read-only extension for the profile pool of the application just selected.

Although variable services are not effective for updating the read-only extension, you can create or update the table used as the extension by using DM table services. Updating the extension may be done only when the application is not active, because the table is open in nowrite mode while the application is active.

If a variable name is referred to and exists in both the profile pool and the read-only extension table, ISPF uses the variable from the user's profile pool. In other words, the search order is: first the profile pool, and then the read-only extension.

If a VPUT PROFILE is issued for a variable in the read-only extension, the update for that variable is made to the user area of the profile pool, not to the read-only extension. Only the profile pool variable update is saved and accessed, not the extension variable value.