This Natural profile parameter specifies the maximum number of work
files to be used during the session. It corresponds to the
NTWORK
macro in the Natural parameter module.
| Possible settings | See WORK Parameter Syntax. | |
|---|---|---|
| Default setting | See default values of the keyword subparameters described below. Depending on the access method and the environment, there may be different default settings. | |
| Dynamic specification | yes | The parameter WORK can only be
specified dynamically. In the
Natural
parameter module, the macro NTWORK must be
used.
|
| Specification within session | no | |
Notes:
WORK or NTWORK can be specified
multiple times.
AM.
AM=STD, they can be allocated dynamically during the session by a
Natural program using the DEFINE WORK
FILE statement or the application programming interface
USR2021 (in library SYSEXT).
This document covers the following topics:
With the WORK parameter, you first specify
one or more logical work file numbers and then several keyword subparameters,
which define the characteristics for these work files:
| WORK=((work-file-numbers),keyword-subparameters,...) |
Where:
Note:
To provide different work file definitions,
WORK can be specified multiple times.
WORK=((2,12,18),AM=STD,DEST='WORK**') WORK=((1,3,6-11,15),AM=COMP,OPEN=INITOBJ,CLOSE=CMD)
With an NTWORK macro, you first specify one
or more logical work file numbers, and then several keyword subparameters,
which define the characteristics for these work files:
NTWORK (work-file-numbers),keyword-subparameters,...
Where:
Note:
To provide different work file definitions,
NTWORK can be specified multiple times.
NTWORK (2,12,18),AM=STD,DEST='WORK**'
NTWORK (1,3,6-11,15),AM=COMP,OPEN=INITOBJ,CLOSE=CMD
The following keyword subparameters are available for all environments:
AM |
CLOSE |
DEST |
LRECL |
OPEN |
PAD |
PADCHRI |
PADCHRO |
TRUNC
AM=value specifies the
type of access method to be used.
| Value | Access Method |
|---|---|
STD |
Standard sequential files (batch, TSO, TIAM). |
COMP |
Com-plete work files. |
SMARTS |
SMARTS work files. Work file on a SMARTS Portable File System (PFS). |
CICS |
CICS transient data or temporary storage. |
PC |
Entire Connection. |
USER |
Third-party vendor work-file interface. |
OFF |
Unassigned. No automatic assignments if
FAMSTD=OFF is set.
Note: |
0 |
Unassigned. Automatic assignments if
FAMSTD=OFF is set.
This is the default value. |
Notes:
AM=STD), provided that they have
been predefined in the JCL. See also FAMSTD - Overwriting of Print and Work File Access
Method Assignments.
CLOSE=value specifies when
the file is to be closed:
| Value | Explanation: The file is closed ... |
|---|---|
OBJ |
when processing of the object in which it was first
accessed is finished, or when command mode, NEXT mode or
MAINMENU is reached.
|
CMD |
when command mode, NEXT mode or
MAINMENU is reached.
This is the default value. |
FIN |
at session end.
Note: |
USER |
This value specifies that a work file is closed only
if the file is open and one of the following conditions is true:
|
DEST=value specifies the
external data set name.
| Value | Explanation |
|---|---|
| 1 - 8 characters or 1 - 7 characters, depending on access method and environment. | Name of the external data set.
Note: |
The meaning of the subparameter DEST
depends on the access method specified with the AM subparameter:
| Access Method | Meaning of Keyword Subparameter DEST |
|---|---|
AM=STD |
DEST is the logical data set
name (DDNAME, LINK name, DTF name).
Notes:
|
AM=CICS |
There is no default value for work files under CICS.
Here, the DEST subparameter is mandatory; that is, CICS
work files defined without a valid DEST specification
are ignored.
Note: |
AM=COMP |
DEST defines the name of the
Com-plete SD-file. The length is restricted to a maximum of 8 characters.
Notes:
|
LRECL=value specifies the
record length of the data set.
| Value | Explanation |
|---|---|
0
or 5 - 32767 |
Record length of the data set (in bytes). |
0 |
This is the default value. |
Note:
This subparameter is used particularly to check for truncation
and padding. For more information on AM=STD, see the keyword
subparameter LRECL in the
section Keyword
Subparameters for AM=STD in All Environments.
OPEN=value specifies when
the file is to be opened:
| Value | Explanation: The file is opened ... |
|---|---|
INIT |
for output at session initialization. |
OBF |
according to the default OPEN
value for the different environments (batch, CICS, Com-plete, TSO).
|
OBJ |
when the execution of the first object which accesses
the file starts.
This is the default value. |
INITOBF |
for output at session initialization. Any subsequent
re-opening of the file sets the default OPEN value for
the different environments (batch, CICS, Com-plete, TSO).
|
OBJ1 |
when the execution of the first object on level 1 which accesses the file starts. Otherwise, it is opened when it is first accessed. |
ACC |
when it is first accessed by a statement. |
INITOBJ |
for output at session initialization. Any subsequent re-opening of the file will be performed when the execution of the first object which accesses the file starts. |
INITOBJ1 |
when the execution of the first object on level 1 which accesses the file starts. Otherwise, it is opened when it is first accessed. |
INITACC |
for output at session initialization. Any subsequent re-opening of the file will be performed when it is first accessed by a statement. |
PAD=value specifies
whether the output records are padded or not (applies only to data sets of
fixed record length).
| Value | Explanation |
|---|---|
ON |
Output records that are shorter than
the record length (LRECL) of the data set will be padded
with padding characters defined by keyword subparameter
PADCHRO.
This is the default value. |
OFF |
Error NAT1510 will be issued if an output record is shorter than the data set record length. |
PADCHRI=value specifies
the character which is used for padding of input records.
| Value | Explanation |
|---|---|
|
|
One character
|
x'40' |
Blank.
This is the default value. |
PADCHRO=value specifies
the character which is used for padding of output records if
PAD=ON is defined for the
work file.
| Value | Explanation |
|---|---|
|
|
One character
|
x'00' |
This is the default value. |
TRUNC=value specifies
whether the output records are truncated or not.
Possible values:
| Value | Explanation |
|---|---|
ON |
Output records that are longer than the
record length (LRECL) of the data set will be
truncated.
|
OFF |
Error NAT1512 will be issued if an
output record is longer than the data set record length.
This is the default value. |
The following keyword subparameters are available for
AM=STD in all
environments:
BLKSIZE=value specifies
the default block size of the data set.
| Value | Explanation |
|---|---|
|
|
Default block size of the data set (in bytes). |
4628 |
This is the default value. |
Note:
The BLKSIZE specification only applies
if no block size is predefined in the JCL or (under z/OS only) in the data set
DCB.
LRECL=value specifies the
record length of the data set.
| Value | Explanation |
|---|---|
|
|
Record length of the data set (in bytes). |
0 |
This is the default value. |
Notes:
RECFM=V(B) the
LRECL value includes a 4-byte record descriptor
word.
LRECL=0 is defined, the following applies:
With RECFM=V(B), LRECL defaults to
BLKSIZE-4. With RECFM=U, LRECL
defaults to BLKSIZE. With RECFM=F(B), the maximum
record length in the Natural program being executed is taken when the file is
opened. If no record length from a program is available when the file is
opened, for example with OPEN=INIT, this leads to an
error.
OPEN=INIT, a sufficient LRECL value
must be defined in the JCL or with the LRECL subparameter defined
for the file.
LRECL specification only applies
if no record length is predefined in the JCL or (z/OS only) in the DCB data
set.
RECFM=value specifies the
default record format of the data set.
Supported formats:
| Value | Format |
|---|---|
F |
Fixed |
V |
Variable |
U |
Undefined |
B |
Blocked |
S |
Spanned |
A |
ASA |
M |
Machine control characters |
Possible values or combinations of values:
| Value | Explanation |
|---|---|
F, FA, FM, FB, FBA, FBM, V, VA,
VM, VB, VBA, VBM, VBS, VBSA, VBSM, U, UA, UM |
These values or combinations of values that can be specified. |
VB |
Variable blocked.
This is the default value. |
Note:
The RECFM specification only applies if
no record format is predefined in the JCL or (under z/OS only) in the data set
DCB.
The following keyword subparameters are available for
AM=STD in z/OS
environments:
BUFNO |
DISP |
FREE |
REREAD |
VMAX
BUFNO=value specifies the
default number of z/OS I/O buffers of the data set.
| Value | Explanation |
|---|---|
0 or 1 -
255 |
Default number of z/OS I/O buffers of the data set. |
0 |
With BUFNO=0, z/OS
allocates five I/O buffers per default.
This is the default value. |
Notes:
BUFNO specification applies only
if the BUFNO parameter is not specified in the JCL for
the data set.
DISP=value specifies that
the work file is opened for modification.
| Value | Explanation |
|---|---|
MOD |
New records are added at the end of the
file.
Note: |
NOMOD |
The work file is rewritten from the
start.
This is the default value. |
FREE=value specifies
whether the data set is de-allocated when the file is closed.
| Value | Explanation |
|---|---|
ON |
The FREE option
is set for the CLOSE SVC, which means that the data set is de-allocated when it
is closed (and not at step termination).
|
OFF |
The FREE option
is not set for the CLOSE SVC.
This is the default value. |
REREAD=value specifies the
REREAD option for the closing of the tape file.
| Value | Explanation |
|---|---|
ON |
The REREAD
option is set for the CLOSE SVC. This causes the volume to be
repositioned to reprocess the data set.
This is the default value. |
OFF |
The REREAD
option is not set for the CLOSE SVC.
|
VMAX=value controls the
LRECL
setting for an output file with variable record format (RECFM=V).
| Value | Explanation |
|---|---|
ON |
Providing a non-zero
BLKSIZE value exists for the file, VMAX=ON
sets LRECL=BLKSIZE-4 for variable record format, regardless of the
LRECL setting in the DCB or the
LRECL subparameter.
|
NAT |
LRECL is set to
the length +4 of the largest record in the application program if
this value is less than LRECL in the DCB for the data
set.
|
OFF |
LRECL from the
DCB for the data set is used.
This is the default value. |
The following keyword subparameters are available for
AM=STD in z/VSE
environments:
BLOCKS |
DISP |
LABEL |
REWIND |
SYSNR
BLOCKS=value specifies the
number of file blocks or file tracks to be allocated for a dynamic
NATVSE work file.
| Value | Explanation |
|---|---|
1 - 9999 |
Number of file blocks or file tracks to be allocated. |
20 |
This is the default value. |
Note:
See
NATVSE Dynamic Work File Allocation (DYNALLOC)
Support in the Operations
documentation.
DISP=(value1,value2)
specifies the disposition of a dynamic NATVSE work file controlled
by VSAM/SAM.
| Value Pair | Explanation |
|---|---|
(NEW,KEEP) |
File is to be reset at open and to be
kept at close.
This is the default value. |
(NEW,DELETE) |
File is to be reset at open and to be made inaccessible at close. |
(OLD,DELETE) |
File is not to be reset at open and to be made inaccessible at close. |
(OLD,KEEP) |
File is not to be reset at open and to be kept at close. |
Note:
See
NATVSE Dynamic Work File Allocation (DYNALLOC)
Support in the Operations
documentation.
LABEL=value specifies the
tape label processing.
| Value | Explanation |
|---|---|
ON |
The tape is in standard label format.
This is the default value. |
OFF |
The tape is unlabeled with front tape mark. |
NOTM |
The tape is unlabeled without front tape mark. |
REWIND=value specifies the
action to be taken when a tape file is closed.
| Value | Explanation |
|---|---|
ON |
The tape is rewound when the file is
closed.
This is the default value. |
OFF |
The tape is not rewound when the file is closed. |
UNLOAD |
The tape is unloaded when the file is closed. |
SYSNR=value specifies the
logical VSE SYS number.
| Value | Explanation |
|---|---|
1 - 99 |
Logical VSE SYS number.
By default, the SYS number is identical to the work file number. |
The following keyword subparameter is available for
AM=STD in BS2000
environments:
DISP
DISP=value specifies the
open mode of the file.
| Value | Explanation |
|---|---|
EXT |
The open mode is set to
EXTEND.
|
NOEXT |
The open mode is set to the default
value OUTPUT.
This is the default value. |
The following keyword subparameters are available for
AM=CICS:
DISP=(value1,value2)
specifies the CICS temporary storage queue disposition.
| Value Pairs | Explanation |
|---|---|
(NEW,KEEP) |
The storage queue is deleted when the
file is opened.
This is the default value. |
(NEW,DELETE) |
The storage queue is deleted when the file is opened and when it is closed. |
(OLD,DELETE) |
The storage queue is deleted when the file is closed. |
(OLD,KEEP) |
The storage queue is not deleted. |
Note:
The DISP specification does not apply to CICS
extra-partition transient data queues.
TYPE=value specifies the
type of CICS storage medium to be used.
| Value | Explanation |
|---|---|
MAIN |
Temporary main storage. |
AUX |
Temporary auxiliary storage. |
TD |
Transient data. |
Note:
The default value used depends on the setting of the
subparameter DEST. If the
DEST subparameter value matches a valid CICS transient
data queue, the TYPE subparameter defaults to
TD, otherwise MAIN will be taken as default
value.
The following keyword subparameters are available for
AM=COMP:
BLKSIZE=value specifies
the default block size of the data set.
| Value | Explanation |
|---|---|
|
|
Default block size of the data set (in bytes). |
4628 |
This is the default value. |
BLOCKS=value specifies the
number of storage blocks to be allocated.
| Value | Explanation |
|---|---|
1 - 9999 |
Number of storage blocks to be allocated. |
20 |
This is the default value. |
TYPE=value specifies the
type of storage access to be used.
| Value | Explanation |
|---|---|
SHR |
Shared access; that is, the work file is accessible by all users. |
TID |
The work file is only available to the current Com-plete terminal ID. |
DYN |
The work file is only available to the current terminal stack level. |
The following keyword subparameters are available for
AM=SMARTS:
DEST=value specifies the
work file name.
| Value | Explanation |
|---|---|
| 1 - 8 characters. | Work file name. |
Notes:
DEST clause is restricted
to an 8 character maximum, it is useless to define a file with absolute PFS
path specification.
DEST clause
is relative to the work file root directory. The work file root directory is
specified with the environment variable
NAT_WORK_ROOT.
DEFINE WORK FILE
statement.
DISP=(value1,value2,value3)
specifies the mode of the work file.
| Value | Explanation | |
|---|---|---|
value1 |
value1 specifies whether
an existing file should be deleted or new data should be appended to the
file.
|
|
NEW |
An existing file will be deleted if the
file is opened for writing.
This is the default value. |
|
OLD or
MOD |
New data written are appended at the end of the file. | |
value2 |
value2 specifies whether
a file should be kept or removed after access.
|
|
KEEP |
Permanent file that will be kept after
close.
This is the default value. |
|
DELETE |
Temporary file that will be removed after close. | |
value3 |
value3 specifies whether
a user has exclusive access to the file or not.
|
|
SHR |
Shared access; that is, the work file
is accessible by all users.
This is the default value. |
|
OWN |
Exclusive access, the work file is accessible to the current Comp-lete user ID. Files with exclusive access are located in an additional directory which has the name of the current user ID. | |
DISP=(NEW,KEEP,SHR)
If you specify only the first value (with or without parentheses), the other values will assume their default settings:
DISP=(MOD)
or
DISP=MOD
Both specifications correspond to:
DISP=(MOD,KEEP,SHR)
TYPE=value specifies the
type of storage access to be used.
| Value | Explanation |
|---|---|
BIN |
Each line is written to the work file
without terminating end-of-line character.
This is the default value. |
TXT |
Each line is written to the work file
with a terminating end-of-line character (x'15').
|