This document describes structure, use and maintenance of the editor work file under the various operating systems. The following topics are covered:
See also:
SYSEDT Utility in the Natural Utilities documentation
Installing the Software AG Editor in the Natural Installation documentation.
EDBP - SAG Editor Buffer Pool Definitions in the Natural Parameter Reference documentation
Software AG Editor in the Natural Editors documentation
The editor work file is a relative record dataset with fixed length records. It is divided into three parts:
Note:
If you use an editor auxiliary buffer pool defined by the profile
parameter EDPSIZE
, no editor
work file is required.
The control record contains buffer pool control information including the buffer pool parameters.
During the first initialization of the work file or during a buffer
pool cold start (triggered by editor buffer pool subparameter
COLD
), the
values defined in the editor buffer pool parameter
EDBP
and/or
in the corresponding macro
NTEDBP
are saved in the work file control record.
You can modify the control record by using the Generation Parameters function of the SYSEDT Utility.
For buffer pool warm restarts, the parameters are read from the control record.
The work records contain logical file records which have been moved out of the buffer pool due to a lack of free buffer pool blocks.
Logical work file records are lost during a restart of the buffer pool or if a timeout occurs for the logical file.
The recovery records hold checkpoint information of editor sessions. If the system terminates abnormally, this information can be used by the editor recovery facility to recover logical files. Recovery records are lost during a cold restart of the buffer pool.
The recovery facility is used by Natural ISPF only. If you do not
intend to use this product, you can run without the recovery part by defining
the editor buffer pool subparameter
PWORK=100
.
One editor work file corresponds to one Editor Buffer Pool. If you intend to use a global editor buffer pool, the editor work file must be shared by all users using the same global editor buffer pool.
The editor work file must be large enough to contain the editor sessions of all users. A minimum number of 100 records per editor user is recommended. The record length of the work file must be fixed, can be defined from 504 to 16384 bytes, and must be a multiple of 8.
Note:
The record length of datasets or PDS members, which will be edited
with Natural ISPF, cannot be larger as the record length of this editor work
file.
The size of a work file record is specified either when allocating the editor work file (under z/OS and z/VSE; default size is 4088) or by definition in the buffer pool parameter macro (under BS2000/OSD; default size is 4096).
The total number of editor work file records depends on the allocated dataset space for the editor work file.
There are two alternative ways of formatting the editor work file:
offline by using the batch format utility,
online during buffer pool initialization.
This method is to be preferred, because no online user has to wait until
formatting is finished. Optionally, the Natural parameter module may be
assembled and linked to the batch format utility to specify editor buffer pool
parameters by means of macro
NTEDBP
.
Otherwise, the default parameter values apply.
During reformatting, however, the work file must not be in use, which means that the system(s) using the corresponding buffer pool have been terminated before reformatting.
When the editor buffer pool is in uninitialized or terminated state, then during the first session which uses the Software AG editor, a "buffer pool cold start" is performed on one of the following conditions:
if the work file has not been formatted yet,
if the control record indicates "cold start" (which can
also be specified by using the Editor Buffer Pool Services utility
SYSEDT
),
if the buffer pool subparameter
COLD=ON
was
specified.
Otherwise, a buffer pool warm start is performed if a valid control record is found during buffer pool initialization. In this case, all buffer pool parameters are taken from the work file control record and no records are formatted.
If you want to change the size of the editor work file (for example,
because it is too small), the COPY
function of the Editor Work
File Batch Utility can be used to avoid a buffer pool cold start; that is, the
loss of the recovery records.
To copy an existing editor work file, perform the following steps:
Modify any buffer pool parameters by using the
SYSEDT Utility,
for example, PWORK
if you want to change the percentage
of work records in the file.
Terminate the editor buffer pool by using the System Administration Facilities of the SYSEDT Utility and ensure that no Natural session is using the editor after the buffer pool termination.
Close (if necessary) and deallocate the editor work file.
Rename the editor work file by using the VSAM utility
IDCAMS
(ALTER
command).
Define a new editor work file with the original name and possibly a different size, but with the same record length.
Run the Editor Work File Batch Utility with the new file after having added:
PARM=COPY
in the EXEC JCL card and a
//CMCOPY DD... under z/OS or //DLBL CMCOPY... under z/VSE
card for the renamed editor work file CMCOPY
to be
copied into the new work file CMEDIT
.
Check the job log for potential errors.
Reallocate and (if necessary) reopen the editor work file.
Use the SYSEDT
utility (see the Natural Utilities documentation) to check
if the buffer pool and the work file have been restarted successfully.
Important:
All Natural sessions must be restarted if you want them to use
the editor after the buffer pool restart.
If you want to change the size of the editor work file, format a new editor work file and copy the recovery records from the old work file into the new one as follows:
Shutdown all systems that use the editor.
Terminate the editor buffer pool.
Rename the current editor work file.
Create a new editor work file with the original name.
Execute the editor work file formatting program (see also
Installing the Software AG
Editor in the Natural Installation
documentation) with the COPY
instead of the FORMAT
function after having added:
Example:
/CAT NATEDT.WORKFILE,NATEDT.COPYFILE /FILE NATEDT.WORKFILE,LINK=CMEDIT,SPACE=nnn /LOGON /FILE NATEDT.COPYFILE,LINK=CMCOPY /FILE NATEDT.WORKFILE,LINK=CMEDIT /SYSFILE SYSLST=LST.NATEDFM2 /SYSFILE SYSDTA=(SYSCMD) /EXEC (NATEDFM2,NATvrs.MOD) COPY /LOGOFF N
One editor work file corresponds to one VM/CMS user. A work file is
created during the first editor initialization and has the default name
CMEDIT DATA A1
.
It must be large enough to contain the editor sessions of the VM/CMS
user. Name, size and number of work file records are specified in the editor
buffer pool parameter EDBP
or by macro
NTEDBP
in the Natural parameter module
NATPARM
.
For optimum performance, a multiple of 800 is recommended.
SMARTS work files are located in the SMARTS Portable File System. The
path must be specified with the SMARTS environment variable
$NAT_WORK_ROOT
. The name of the editor work file
is specified with the EDBP
subparameter
DDNAME
.
Formatting of an editor work file is only possible during buffer pool initialization (online). There is currently no tool under SMARTS to format an editor work file offline.