A temporary data set is a data set that you create and delete within
a job. (For information about coding data set names with the DD *,
DATA, and SYSOUT parameters, see "Data Set Name for In-Stream or Sysout
Data Set.")
Note: SMS manages a temporary data set if you specify a
storage class
(with the DD STORCLAS parameter) or if an installation-written automatic
class selection (ACS) routine selects a storage class for the temporary
data set.
When you define a temporary data set, you can code the DSNAME parameter
or omit it; in either case, the system generates a qualified name
for the temporary data set.
When you use DSNAME for a temporary data set, code the name as
two ampersands (&&) followed by a character string 1 to 8
characters in length:
- The first character following the ampersands must be alphabetic
or national.
- The remaining characters must be alphanumeric or national.
The format of the qualified name the system generates depends on
whether or not you specified a data set name on the DSNAME parameter:
- All temporary data set names begin as follows:
SYSyyddd.Thhmmss.RA000.jjobname
where:
- yy
- indicates the year
- ddd
- indicates the Julian day
- hh
- indicates the hour
- mm
- indicates the minute
- ss
- indicates the second
- jjobname
- indicates the name of the job
Date fields and time fields in the system-generated
name reflect:
- For JCL allocations, when the job was processed by the Interpreter.
(For JES2 this is when an initiator selects the job for execution.
For JES3 this is at CI time.)
- For dynamic allocations, when the dynamic allocation request was
issued.
- If you do not specify a data set name, or
TEMPDSFORMAT(UNIQUE) is in effect, the full format of the temporary
data set name is:
SYSyyddd.Thhmmss.RA000.jjobname.Rggnnnnn
where:
- gg
- 01, or, in a sysplex:
- for JCL allocations, the system identifier of the system that
interpreted the job.
- for dynamic allocations, the system identifier of the system on
which the job executed.
- nnnnn
- a number that is unique within a system
- If you do specify a data set name and
TEMPDSFORMAT(INCLUDELABEL) is in effect, the full format of the
temporary data set name is:
SYSyyddd.Thhmmss.RA000.jjobname.dsetname.Hgg
where:
- dsetname
- the 1 to 8 character DSNAME coded following the two ampersands
(&&)
- gg
- 01, or, in a sysplex:
- for JCL allocations, the system identifier of the system which
interpreted the job.
- for dynamic allocations, the system identifier of the system on
which the job executed.
If you use DSNAME, note that the system-generated qualified name
for the temporary data set will
not be unique
under the following conditions:
- Multiple tasks or APPC transactions having identical jobnames
execute at exactly the same time, and
- The tasks or transactions contain DD statements with identical
temporary data set names.
To ensure that a temporary data set name is unique, do not code
a temporary data set name. Allow the system to assign one.
Only the job that creates a temporary data set has access to it
to read and write data and to scratch the data set.
Note: - In general, the system treats a single ampersand (&) followed
by a character string of 1 to 8 characters as a symbolic parameter.
(See Using system symbols and JCL symbols.) However, if you code a data set name
as a symbolic parameter (by coding DSNAME=&xxxxxxxx), and do not
assign a value to or nullify the symbolic parameter, the system will
process it as a temporary data set name.
- The SYSTEM TEMPDSFORMAT(UNIQUE|INCLUDELABEL) option
in the parmlib member ALLOCxx enables allocation to use a more unique
format for the data set name when DSN=&&mydsn is specified.
The unique data set name allows jobs with the same data set names
specified to run at the same time, without requiring the JCL programmer
to remove the DSN=&&mydsn or to add data set name referback
syntax. The system setting for this option may affect the data set
name generated for a temporary data set.
- &&dsname
- Specifies the name of a temporary data set.
- &&dsname(member)
- Specifies the name of a temporary partitioned data set (PDS)
or partitioned data set extended (PDSE) and a member within that data
set.
- member
- 1 - 8 alphanumeric or national characters, or a character X'C0'.
The first character must be alphabetic or national.