In this section: |
|
This section describes the DYNAM command and its subcommands.
The DYNAM command manipulates data sets under MVS.
DYNAM subcommand operand [operand]...
where:
Is required, and specifies one of the operations (subcommands) in the list below. The abbreviated form of the subcommand's syntax is given under the full form. Details on each subcommand are provided in the following sections as noted.
ALLOCATE ALLOC ALLO |
Allocates a data set. See The ALLOCATE Subcommand. |
CONCAT CONC |
Concatenates data sets. See The CONCAT Subcommand. |
FREE |
Frees data sets specified by ddnames or dsnames. Names may contain wildcard characters. See The FREE Subcommand. |
CLOSE CLO |
Closes data sets. Use this subcommand when data sets cannot be freed because of being open. See The CLOSE Subcommand. |
COPY |
Copies an entire data set or selected partitioned data set (PDS) members. This subcommand provides features such as record format conversion, either automatic or option controlled. See The COPY Subcommand. |
COPYDD |
Copies a sequential data set or PDS member. COPY handles all the features of COPYDD, and is recommended for use instead of COPYDD. See The COPYDD Subcommand. |
DELETE DEL |
Deletes an entire data set or selected PDS members. See The DELETE Subcommand. |
RENAME REN |
Renames an entire data set or selected PDS members. See The RENAME Subcommand. |
SUBMIT SUB |
Submits MVS jobs. See The SUBMIT Subcommand. |
COMPRESS COMP |
Compresses a PDS. See The COMPRESS Subcommand. |
May be a keyword, a keyword followed by its parameter, or a parameter without a keyword.
The following rules apply to the DYNAM command:
A,B (A,B) (A B) (A, B) (A,B C, D)
MVS obtains a lock for any allocated data set name; a shared lock for those specified as SHR, and an exclusive lock for OLD, NEW, or MOD.
Although data sets are allocated more than once in a job step, only one type of lock may be obtained. For example, if the data set is initially allocated as SHR and is then allocated as OLD in the same step, the MVS lock changes from shared to exclusive, and the data set is not available for use by other jobs until all allocations in the job are freed.
The DYNAM commands that manipulate data sets use an improved locking mechanism, similar to that implemented in ISPF:
Note: The DYNAM locking mechanism protects from simultaneous updating and possible corruption of data, but does not protect from updating and simultaneous reading. For example, it is possible to continue to read a PDS member recently deleted by another user.
The DYNAM allocation user exit is an optional site-supplied routine that may be called for each data set allocation made by DYNAM. The routine may test, alter, or reject the allocation request. For more information, see Information Builders Technical Memo 7860.1, The DYNAM User Exit.
How to: |
The DYNAM ALLOCATE command allocates a data set.
DYNAM ALLOCATE [disposition] [CLOSE]
DDNAME ddname [DEFER] [DSNAME dsname[(memname)]] [DUMMY] [EXPDT date] [HIPER OFF]
[INPT|OUTPT]
[LABEL type] [MEMBER memname] [status] [MSVGP msvgp]
[PARALLEL] [PASSWORD password] [PERM] [POSITION nnnn] [REFVOL dsname] [RETPD days] [REUSE] [UNIT unit] [VOLUME volser]
Space operands are:
[format]
[parameter]
[DIR n] [PRIMARY n1] [RELEASE] [ROUND] [SECONDARY n2] [SPACE space]
DCB operands are:
[BLKSIZE n] [BUFNO n] [DEN n] [DSORG dsorg] [LRECL n] [RECFM recfm] [REFDD ddname] [REFDSN dsname]
SMS and VSAM operands are:
[DATACLASS name] [DSNTYPE|{LIBRARY|PDS}]
[KEYOFF n] [LIKE dsname] [MGMTCLASS name] [RECORG recorg] [SECMODEL name] [STORCLASS name] [BUFND m] [BUFNI n]
Output printing operands are:
[DEST dest[.user]]
[FCB name [ALIGN|VERIFY]] [FORMS name]
[HOLD] [OUTLIM n] [OUTPUT name] [SYSOUT class] [USER user] [WRITER name]
where:
Can be abbreviated as ALLOC or ALLO.
Is one of the following:
CATALOG DELETE KEEP UNCATALOG | By default, for a data set status of NEW, if dsname is specified, the disposition is CATALOG; otherwise, the disposition is DELETE. Is incompatible with SYSOUT. CATLG and UNCAT are also valid as synonyms for CATALOG and UNCATALOG. DELETE, KEEP, and UNCATLOG follow the standard MVS meanings of delete after free, keep as is after free, and keep uncataloged. |
Is deallocation of the data set at close, rather than at the end of the step. The JCL analogy is FREE=CLOSE.
Is the DDNAME to be associated with an allocation; it must be specified. Synonym is FILENAME.
Assigns device(s) to the data set but defers mounting of the volume(s) until the data set is opened. The JCL analogy is DEFER in UNIT.
The member name is specified either in parentheses after dsname or using keyword MEMBER (see also MEMBER). If dsname is specified as an asterisk (*), terminal is allocated. This is used for output only. Synonym is DATASET.
Allocates a dummy data set.
Is the expiration date in format YYDDD, YYYY/DDD, or YYYYDDD. Is incompatible with RETPD and SYSOUT.
Prohibits allocation in a hiperspace. Is equivalent to UNIT NOHIPER, and is used when UNIT is also to be specified. For example, UNIT VIO HIPER OFF.
Data set is to be processed as input only (INPT) or output only (OUTPUT). The JCL analogy is IN in LABEL. Is incompatible with SYSOUT.
Data set is to be processed as input only (INPT) or output only (OUTPUT). JCL analogy: IN in LABEL. Is incompatible with SYSOUT.
Specifies type of volume labels. Can be one of the following: NL, SL, NSL, SUL, BLP, LTM, AL, or AUL. Is incompatible with SYSOUT.
Is the name of a PDS member to be allocated. See also DSNAME.
Is the data set status. Possible values are:
NEW | is the default data set status. Incompatible with SYSOUT. |
MOD | is an extended data set. |
OLD | is exclusive control of the data set. |
SHR | is shared access to the data set. |
Is the identification of a group of mass storage system (MSS) virtual volumes. Is incompatible with SYSOUT and VOLUME.
Each volume is to be mounted on a separate device. The JCL analogy is P in UNIT.
Password for a password-protected data set.
The allocation is to be permanent—that is, protected from being freed or concatenated by any DYNAM command issued by an MSO user. The operand is valid only in an MSO server initialization profile.
Data set sequence number on a tape volume, up to 9999. The JCL analogy is the first subparameter in LABEL.
Volume serial information is to be obtained from the named cataloged data set. The JCL analogy is VOL=REF=dsname. Is incompatible with SYSOUT and VOLUME.
Is the retention period, up to 9999 days. Is incompatible with EXPDT and SYSOUT.
If the ddname to be allocated is already in use, it is to be freed.
Is the device group name, device type, specific unit address, or NOHIPER. NOHIPER prohibits allocation in a hiperspace, and is meaningful for a temporary (NEW, DELETE) data set; see also HIPER OFF.
Are volume serial numbers. Are incompatible with REFVOL and SYSOUT. Synonyms are VOLume and VOLser.
Space operands may be:
The format of the primary space to be allocated. Possible values are:
ALX is up to five contiguous areas.
CONTIG is one contiguous area.
MXIG is one maximal contiguous area.
JCL analogy: ALX/CONTIG/MXIG in SPACE.
Represents units of primary and secondary space allocation.
The parameter for space allocation. Possible values are:
BLOCKS [n]
CYLINDERS
MEGABYTES
PAGES
TRACKS
n represents units of primary and secondary space allocation. If the parameter for BLOCKS is omitted, the average block length is copied from BLKSIZE. If the space unit is omitted but SPACE and BLKSIZE are specified, BLOCKS equal BLKSIZE is used. For PAGES, BLOCKS 4096 is used. BLKSIZE must be specified if the BLOCKS parameter is specified.
Synonyms are CYLs for CYLINDERS and TRKs for TRACKS.
The number of 256-byte records for the directory of a PDS.
The primary space quantity. See also SPACE.
The unused space is to be released when the data set is closed. Synonym is RLSE.
If space is requested in BLOCKS, MEGABYTES, or PAGES, it is to be rounded to whole cylinder(s).
Is the secondary space quantity. See also SPACE.
The primary (n1) and/or secondary (n2) space quantity in one of the following formats:
n1/(n1)/n1,n2/(n1,n2)/n1 n2/(n1 n2)/,n2/(,n2)
See also PRIMARY and SECONDARY.
DCB operands may be:
The block size, up to 32760. See also BLOCKS.
The number of buffers, up to 255.
n represents magnetic tape density: 0, 1, 2, 3, or 4 for 200, 556, 800, 1600, 6250 bpi respectively.
The data set organization. Default, for NEW only: PO if DIR or DSNTYPE specified; PS otherwise. Following values are syntactically correct:
VS | VSAM |
PO/POU | PDS or PDS unmovable. |
DA/DAU | Direct access or direct access unmovable. |
PS/PSU | Physical sequential or physical sequential unmovable. |
The logical record length, up to 32760.
The record format. The first letter must be D, F, U, or V, which may be followed by any valid combination of A, B, M, S, or T:
A | Records with ISO/ANSI control characters. |
B | Blocked records. |
D | Variable-length ISO/ANSI tape records. |
F | Fixed-length records. |
M | Records with machine code control characters. |
S | Standard fixed-length or spanned variable-length records. |
T | Track overflow. |
U | Undefined-length records. |
V | Variable-length records. |
DCB attributes are to be copied from the specified ddname. Under TSO, EXPDT and INPT/OUTPT specifications are also copied. Any of those can be overridden by the appropriate keyword on the same command. The JCL analogy is DCB=*.ddname. Is incompatible with REFDSN.
DCB attributes (DSORG, RECFM, OPTCD, BLKSIZE, LRECL, RKP, KEYLEN) and EXPDT are to be copied from the specified cataloged data set. Any of those can be overridden by the appropriate keyword on the same command. The JCL analogy is DCB=dsname. Is incompatible with REFDD.
SMS and VSAM operands are:
The name of a data class for an SMS-managed data set.
LIBRARY is for a new partitioned extended (PDSE), and PDS is for a new partitioned data set. A PDSE cannot contain load modules, should be SMS-managed, and allows concurrent updating of different members.
The offset of the key in each logical record for a new VSAM key-sequenced (RECORG KS) data set.
Allocation attributes (DSORG, RECORG, or RECFM, LRECL, KEYLEN, KEYOFF, SPace, DIR) are to be copied from the specified cataloged data set (model). Any of those can be overridden by the appropriate keyword on the same command.
The name of a management class for an SMS-managed data set.
The VSAM record organization: KS, ES, RR, or LS for key-sequenced, entry-sequenced, relative record, or linear space data sets, respectively.
The data set RACF profile is to be copied from the named existing RACF profile.
The name of a storage class for an SMS-managed data set.
The number of VSAM DATA buffers.
The number of VSAM INDEX buffers.
Output printing operands may be:
The remote destination for a SYSOUT data set. In conjunction with user ID, it is a node and a user at that node; the user ID is coded after the period (.) or using the USER keyword.
The name of an FCB (forms control buffer) image to be used for printing of a data set. The operator may be asked to check the printer forms alignment (ALIGN), or to verify the FCB image name displayed on the printer (VERIFY).
A SYSOUT form name. JCL analogy: third subparameter in SYSOUT, FORMS in OUTPUT JCL.
A SYSOUT data set is to be placed on the hold queue.
A limit for the number of logical records in a SYSOUT data set.
The name(s) of OUTPUT JCL statement(s) to be associated with a SYSOUT data set.
A SYSOUT data set is to be allocated and the specified output class (A-Z, 0-9) is to be assigned. If an asterisk (*) or NULL is coded, the class is copied either from CLASS in OUTPUT JCL if it is specified, or otherwise from MSGCLASS in JOB.
A SYSOUT data set is to be routed to the specified user ID. DEST is required to specify a user's node.
The name of an installation-written system output printing routine. The JCL analogy is the second subparameter in SYSOUT. Is incompatible with USER.
In addition to the shown fixed abbreviations and synonyms, keywords may be abbreviated up to the unique truncation. Those abbreviations are not fixed and may be changed when new keywords are added. They may be used interactively to save some keystrokes, but when a command is saved in a file, it is recommended that you use unabbreviated keywords.
Examples:
Allocate an existing data set:
DYNAM ALLOC DD MYDD DS MYID.DATA.SET SHR REU
Allocate a new data set. Defaults are NEW, CATALOG (dsname present), and DSORG PO (not-zero DIR present):
DYNAM ALLOC DD MYDD DS MYID.DATA.SET SPACE 6,2 TRACKS DIR 4 UNIT SYSDA - RECFM FB LRECL 80 BLKSIZE 1600
Allocate a terminal:
DYNAM ALLOC DD MYDD DS *
Allocate a SYSOUT data set with default output class. Upon freeing, the data set is sent to the user ID U1234 at node SYSVM:
DYNAM ALLOC DD MYDD SYSOUT * DEST SYSVM.U1234
How to: |
The DYNAM CONCAT command concatenates up to 16 data sets.
DYNAM CONCAT [PERM] DDNAME ddname1 ddname2 [ddname3...]
where:
Can be abbreviated as CONC.
Is optional. This marks the concatenation as permanent—that is, protected from being freed or concatenated again by any DYNAM command issued by an MSO user. Valid only in an MSO server initialization profile.
Are required; synonym is FILENAME.
Is the first ddname to be concatenated and associated with the resulting concatenated group.
Is the second ddname and any subsequent ddname to be concatenated.
For example:
DYNAM CONCAT DDN EDARPC MYEX NEWEX
How to: |
The DYNAM FREE command deallocates any number of specified data sets.
DYNAM FREE {DDNAME ddname [ddname...]|DSNAME dsname [dsname...]}
where:
Are required if there is no dsname; synonym is FILENAME.
Is the ddname of the data set to be freed.
Are required if there is no ddname; the synonym is DATASET.
Is the name of the data set to be freed. All ddnames associated with this dsname, except concatenated groups, are deallocated.
While at least one ddname or data set name is required, you may specify more than one ddname or data set name. Each specified name may contain asterisks (*) and question marks (?) as wildcards. Wildcards are special characters used to specify a subset of names rather than one name. The wildcards appear anywhere in a name and mean the following:
Represents any number of characters. For example, *Q* matches any name containing the character Q.
Represents any single character. For example, ?Q? matches any 3-character name containing the character Q in the middle.
If the ddname is not found, a message is issued only if a single ddname without wildcards is specified. A message is not displayed if a data set or more than one ddname is not found.
Examples:
DYNAM FREE DDN SYS0* TEMP?
DYNAM FREE DSN MYID.DATA.SET
How to: |
The DYNAM CLOSE command closes data sets that cannot be freed because they are opened.
DYNAM CLOSE {DDNAME ddname [ddname...]|DSNAME dsname [dsname...]}
where:
Can be abbreviated as CLO.
Are required if there is no dsname; the synonym is FILENAME.
Is the ddname of the data set to be closed.
Are required if there is no ddname; the synonym is DATASET.
Is the name of the data set to be closed. All ddnames associated with this dsname, except concatenated groups, are closed.
While at least one ddname or data set name is required, more than one ddname or data set name may be specified. Each specified name may contain wildcard characters. The same rules apply to the DYNAM CLOSE command as to the DYNAM FREE command.
How to: |
The DYNAM COPY command copies an entire MVS data set or selected PDS members.
DYNAM COPY dname1 {[TO] dname2 [[MEMBER] members]|[MEMBER] members]}[options]
where:
Is the dsname or ddname of the input data set. This is a positional parameter. It must precede all other operands.
May be omitted if dname2 does not match a reserved word, the MEMBER keyword, an option, or the TO keyword. To avoid confusion, use the TO keyword whenever dname2 is a ddname.
Is the dsname or ddname of the output data set. If the output data set is not a PDS and the dsname is specified, it is allocated as OLD. If the ddname is specified, and the status is SHR, ensure that other users do not access the data set during COPY. Unlike ISPF, DYNAM locks a non-PDS data set in order to prevent simultaneous updating by different DYNAM users.
May be omitted if members are specified in parentheses.
Can be a single member specification or a list of member specifications. If the members are enclosed in parentheses, blanks before the left parenthesis may be omitted.
May be one or more of the following options:
APPEND adds the input to the end of the existing data, if the output is a sequential data set.
FORCE copies input DCB attributes (RECFM, BLKSIZE, LRECL, and KEYLEN) to the output data set. By default, only missing values are assigned.
KEYMOD allows key modification according to input/output KEYLEN: truncation or padding with binary zeros.
REPLACE replaces all output members matching the selected member names.
TRUNCATE allows truncation of input records that are longer than the output record length. Since trailing blanks are truncated automatically when RECFM is different, the keyword is used either to cut records of the same format or to cut non-blank data.
A member specification has the following syntax
mem[,[newmem][,REPLACE]]
where:
Is the selected member name.
Is the optional new name for the output member.
Is optional and specifies an existing member to be replaced in the output PDS.
Since the comma may be used in member specifications, they are separated with one or more blanks when specified in a list. Therefore, a list of member specifications is always enclosed in parentheses. For example:
(MEM MEM,NEWMEM MEM,NEWMEM,R MEM,,R)
Note:
Examples:
Copies the entire data set, whether it is a PDS or not.
DYNAM COPY MYDD MYID.DATA.SET
All four commands are equivalent. Either input or output may be a sequential data set, or both are PDSs.
DYNAM COPY MYDD MYID.DATA.SET MEMBER MEM DYNAM COPY MYDD MYID.DATA.SET(MEM) DYNAM COPY MYDD(MEM) MYID.DATA.SET DYNAM COPY MYDD MEMBER MEM MYID.DATA.SET
Copies and renames one member.
DYNAM COPY MYID.DATA.LIB TO MYDD(MEM1,MEM2)
Copies two members.
DYNAM COPY MYID.DATA.LIB TO MYDD(MEM1 MEM2)
Copies two members into same PDS with renaming.
DYNAM COPY MYDD(OLD1,NEW1,R OLD2,NEW2) DYNAM COPY MYDD(OLD1,NEW1 OLD2,NEW2) REPL
How to: |
The DYNAM COPYDD command copies a sequential data set or PDS member.
DYNAM COPYDD ddname1[(mem1)] ddname2[(mem2)]
where:
Is the ddname of the input data set.
Is optional. It is the input member name.
Is the ddname of the output data set.
Is optional. It is the output member name.
Note:
How to: |
The DYNAM DELETE command deletes an entire MVS data set or selected PDS members.
DYNAM DELETE dsname
To delete individual members, use
DYNAM DELETE dname [MEMBER] members
where:
Can be abbreviated as DEL.
Is the data set name to be deleted and uncataloged.
Is the dsname or ddname of a PDS containing one or more members to be deleted. The ISPF-like lock is obtained.
May be omitted if the members are specified in parentheses.
Can be a single member name or a list of members. If the members are enclosed in parentheses, blanks before the left parenthesis can be omitted.
Examples:
DYNAM DELETE MYID.DATA.OLD DYNAM DEL MYID.DATA.LIB MEMBER OLD1,OLD2 DYNAM DELETE MYDD(OLD1,OLD2) DYNAM DEL MYDD(OLD1 OLD2 OLD3)
How to: |
The DYNAM RENAME command renames an entire MVS data set or selected PDS members.
DYNAM RENAME dsname1 dsname2
To rename individual members, use
DYNAM RENAME dname [MEMBER] members [REPLACE]
where:
Can be abbreviated as REN.
Is the data set name to be renamed and uncataloged.
Is the new name to be assigned to the data set and cataloged.
Is the dsname or ddname of a PDS containing one or more members to be renamed. The ISPF-like lock is obtained.
May be omitted if the members are specified in parentheses.
Can be a single member specification or a list of members. If the members are enclosed in parentheses, blanks before the left parenthesis can be omitted.
Is optional. This replaces all members matching the specified new names.
A member specification has the following syntax
oldmem,newmem[,REPLACE]
where:
Is the original member name.
Is the new member name.
Is optional and replaces existing members with the same name as newmem.
Since the comma is used in member specifications, each pair of members is separated with one or more blanks when specified in a list; therefore, a list of member specifications is always enclosed in parentheses.
Examples:
DYNAM RENAME MYID.DATA.OLD MYID.DATA.NEW DYNAM REN MYID.DATA.LIB MEMBER OLD,NEW,R DYNAM RENAME MYDD(OLD1,NEW1,R OLD2,NEW2) DYNAM REN MYDD(OLD1,NEW1 OLD2,NEW2) REPL
How to: |
The DYNAM SUBMIT command submits jobs to MVS.
DYNAM SUBMIT dname [MEMBER(members)]
where:
Can be abbreviated as SUB.
Is the dsname or ddname of the input data set(s) containing JCL to be submitted. The ddname specifies a concatenation of data sets.
May be omitted if the members are specified in parentheses.
May be a single member name or a list of members. When a member list is submitted, the resulting job stream is the concatenation of the members. If the members are enclosed in parentheses, blanks before the left parenthesis can be omitted.
Examples:
DYNAM SUBMIT MYDD MEMBER ASM,PROG,LKED DYNAM SUB MYDD(ASM,PROG,LKED) DYNAM SUB MYID.DATA.LIB(CREATE LOAD) DYNAM SUBMIT MYFILE
Note: The DYNAM SUBMIT command provides an interface with the submit user exit IKJEFF10 as described in the IBM TSO Extensions Version 2 Customization manual. For details, see Information Builders Technical Memo 7859, Enabling a Site-Specified Submit Exit Routine.
How to: |
The DYNAM COMPRESS command compresses the partitioned data sets (PDS).
DYNAM COMPRESS dname [dname]...
where:
Can be abbreviated as COMP.
Is the dsname or ddname of a PDS to be compressed. The ISPF-like lock is obtained.
If the dsname is specified, it is allocated as OLD. If the ddname is specified and status is SHR, make sure that another user does not access the PDS during the compress operation.
Note: DYNAM COMPRESS uses the IBM utility IEBCOPY, and therefore are only used when running with APF authorization.
Examples:
DYNAM COMPRESS MYDD DYNAM COMPRESS MYID.DATA.LIB DYNAM COMP MYDD MYID.DATA.LIB
iWay Software |