Platform-Specific Commands and Features

In this section:

This topic describes platform-specific commands that may be included in a procedure for various purposes. However, it always best to avoid the use of platform-specific commands, as they can affect the portability of an application to new environments.

The nature of z/OS, PDS Deployment, and security requires operating system commands to be a limited command set, and use of the keyword DYNAM to preface commands, where other environments are free to simply jump to the operating system command level and executable anything the application user has access to. DYNAM commands are also allowed in z/OS HFS Deployment.

On platforms other than z/OS PDS Deployment, native commands are directly available using the -SYSTEM, -UNIX, -VMS, -WINNT, and -AS/400 series of commands.

File references that are symbolic logical names for the purpose of -READ, -WRITE, TABLE (using external files), and HOLD AS require a DYNAM ALLOC (PDS) or FILEDEF to create the logical reference.

For more information about reporting, see the Creating Reports With WebFOCUS Language manual. For more information about Dialogue Manager, see the Developing Reporting Applications manual.


Top of page

x
DYNAM Command (z/OS PDS and HFS Deployments)

In this section:

 

This section describes the DYNAM command and its subcommands.



x
Syntax: How to Use the DYNAM Command

The DYNAM command manipulates data sets under MVS.

DYNAM subcommand operand [operand]...

where:

subcommand

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.

operand

May be a keyword, a keyword followed by its parameter, or a parameter without a keyword.

The following rules apply to the DYNAM command:

  • The subcommand, keywords, and parameters are separated with one or more blanks. Keywords are coded in free format.
  • A parameter may be a list of subparameters (for example, VOLUME for a multi-volume data set). Separate subparameters in the list using commas. To include blanks between subparameters (with or without the comma), enclose the entire list in parentheses. For example:
    A,B (A,B) (A B) (A, B) (A,B C, D)
  • A DYNAM command may span several lines. Enter a hyphen (-) at the end of each line to be continued. When the lines are concatenated, blanks after the hyphen and leading blanks from the next line are removed. Blanks before the hyphen are removed if they are preceded by a comma. The total length of a DYNAM command may not exceed 2,048 characters.
  • Most keywords may be truncated up to the shortest unambiguous length. The commonly used abbreviations are fixed. Note that the unique truncation of a keyword may not always be valid as new keywords are added. It is recommended that the full keyword be used in files.
  • Fixed abbreviations are given in the following sections on the subcommands. For example, DDNAME may be abbreviated as DD, DDN, DDNA, DDNAM, or DDNAME.
  • Certain keywords have synonyms. For example, the keywords FILENAME and DDNAME are synonyms, and so are DATASET and DSNAME.
  • As in TSO, a data set name is enclosed in single quotation marks. Prefix substitution is not supported; specify only the fully qualified data set names in JCL.
  • Some DYNAM commands accept either the ddname or data set name (dsname) as the same parameter. In such cases, the parameter is considered a ddname if it is not longer than 8 bytes, does not contain periods (.), and is not enclosed in single quotation marks ('). Otherwise, the parameter is considered a data set name. Thus, to specify an unqualified data set name, enclose it in single quotation marks.


x
Use of Data Sets

z/OS PDS Deployment 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.



x
DYNAM Allocation User Exit

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.



x
The ALLOCATE Subcommand

The DYNAM ALLOCATE command allocates a data set.



x
Syntax: How to Use the ALLOCATE Subcommand
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:

ALLOCATE

Can be abbreviated as ALLOC or ALLO.

disposition

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.

CLOSE

Is deallocation of the data set at close, rather than at the end of the step. The JCL analogy is FREE=CLOSE.

DDNAME ddname DD

Is the DDNAME to be associated with an allocation; it must be specified. Synonym is FILENAME.

DEFER

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.

DSNAME dsname [(memname)]

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.

DUMMY

Allocates a dummy data set.

EXPDT date

Is the expiration date in format YYDDD, YYYY/DDD, or YYYYDDD. Is incompatible with RETPD and SYSOUT.

HIPER OFF

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.

INPT

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.

OUTPT

Data set is to be processed as input only (INPT) or output only (OUTPUT). JCL analogy: IN in LABEL. Is incompatible with SYSOUT.

LABEL type

Specifies type of volume labels. Can be one of the following: NL, SL, NSL, SUL, BLP, LTM, AL, or AUL. Is incompatible with SYSOUT.

MEMBER memname

Is the name of a PDS member to be allocated. See also DSNAME.

status

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.

MSVGP msvgp

Is the identification of a group of mass storage system (MSS) virtual volumes. Is incompatible with SYSOUT and VOLUME.

PARALLEL

Each volume is to be mounted on a separate device. The JCL analogy is P in UNIT.

PASSWORD password

Password for a password-protected data set.

PERM

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.

POSITION nnnn

Data set sequence number on a tape volume, up to 9999. The JCL analogy is the first subparameter in LABEL.

REFVOL dsname

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.

RETPD days

Is the retention period, up to 9999 days. Is incompatible with EXPDT and SYSOUT.

REUSE REU

If the ddname to be allocated is already in use, it is to be freed.

UNIT unit

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.

VOLUME volserVOL

Are volume serial numbers. Are incompatible with REFVOL and SYSOUT. Synonyms are VOLume and VOLser.

Space operands may be:

format

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.

n

Represents units of primary and secondary space allocation.

parameter

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.

DIR n

The number of 256-byte records for the directory of a PDS.

PRIMARY n1

The primary space quantity. See also SPACE.

RELEASE

The unused space is to be released when the data set is closed. Synonym is RLSE.

ROUND

If space is requested in BLOCKS, MEGABYTES, or PAGES, it is to be rounded to whole cylinder(s).

SECONDARY n2

Is the secondary space quantity. See also SPACE.

SPACE space SP

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:

BLKSIZE n

The block size, up to 32760. See also BLOCKS.

BUFNO n

The number of buffers, up to 255.

DEN n

n represents magnetic tape density: 0, 1, 2, 3, or 4 for 200, 556, 800, 1600, 6250 bpi respectively.

DSORG dsorg

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.

LRECL n

The logical record length, up to 32760.

RECFM recfm

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.

REFDD ddname

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.

REFDSN dsname

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:

DATACLASS name

The name of a data class for an SMS-managed data set.

DSNTYPE {LIBRARY|PDS}

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.

KEYOFF n

The offset of the key in each logical record for a new VSAM key-sequenced (RECORG KS) data set.

LIKE dsname

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.

MGMTCLASS name

The name of a management class for an SMS-managed data set.

RECORG recorg

The VSAM record organization: KS, ES, RR, or LS for key-sequenced, entry-sequenced, relative record, or linear space data sets, respectively.

SECMODEL name

The data set RACF profile is to be copied from the named existing RACF profile.

STORCLASS name

The name of a storage class for an SMS-managed data set.

BUFND m

The number of VSAM DATA buffers.

BUFNI n

The number of VSAM INDEX buffers.

Output printing operands may be:

DEST dest[.user]

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.

FCB name [ALIGN/VERIFY]

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).

FORMS name FORM

A SYSOUT form name. JCL analogy: third subparameter in SYSOUT, FORMS in OUTPUT JCL.

HOLD

A SYSOUT data set is to be placed on the hold queue.

OUTLIM n

A limit for the number of logical records in a SYSOUT data set.

OUTPUT name

The name(s) of OUTPUT JCL statement(s) to be associated with a SYSOUT data set.

SYSOUT class

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.

USER user

A SYSOUT data set is to be routed to the specified user ID. DEST is required to specify a user's node.

WRITER name

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


x
The CONCAT Subcommand

The DYNAM CONCAT command concatenates up to 16 data sets.



x
Syntax: How to Use the CONCAT Subcommand
DYNAM CONCAT [PERM] DDNAME ddname1 ddname2 [ddname3...]

where:

CONCAT

Can be abbreviated as CONC.

PERM

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.

DDNAME DDN DD

Are required; synonym is FILENAME.

ddname1

Is the first ddname to be concatenated and associated with the resulting concatenated group.

ddname2

Is the second ddname and any subsequent ddname to be concatenated.

For example:

DYNAM CONCAT DDN EDARPC MYEX NEWEX


x
The FREE Subcommand

The DYNAM FREE command deallocates any number of specified data sets.



x
Syntax: How to Use the FREE Subcommand
DYNAM FREE  {DDNAME ddname [ddname...]|DSNAME dsname [dsname...]}

where:

DDNAME DDN DD

Are required if there is no dsname; synonym is FILENAME.

ddname

Is the ddname of the data set to be freed.

DSNAME DSN DS

Are required if there is no ddname; the synonym is DATASET.

dsname

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


x
The CLOSE Subcommand

The DYNAM CLOSE command closes data sets that cannot be freed because they are opened.



x
Syntax: How to Use the CLOSE Subcommand
DYNAM CLOSE  {DDNAME ddname [ddname...]|DSNAME dsname [dsname...]}

where:

CLOSE

Can be abbreviated as CLO.

DDNAME DDN DD

Are required if there is no dsname; the synonym is FILENAME.

ddname

Is the ddname of the data set to be closed.

DSNAME DSN DS

Are required if there is no ddname; the synonym is DATASET.

dsname

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.



x
The COPY Subcommand

The DYNAM COPY command copies an entire MVS data set or selected PDS members.



x
Syntax: How to Use the COPY Subcommand
DYNAM COPY dname1 {[TO] dname2 [[MEMBER] members]|[MEMBER] members]}[options]

where:

dname1

Is the dsname or ddname of the input data set. This is a positional parameter. It must precede all other operands.

TO

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.

dname2

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.

MEMBER

May be omitted if members are specified in parentheses.

members

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.

options

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:

mem

Is the selected member name.

newmem

Is the optional new name for the output member.

REPLACE

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:

  • All conversions between different DCB attributes (RECFM, BLKSIZE, and LRECL) are performed automatically.
  • If the entire PDS is copied or any selected member's directory entry contains a TTRN in user data (for example, a load module), the IBM utility IEBCOPY is invoked. In this case, all options except REPLACE are ignored, format conversion is not possible, and copying members to the same PDS is not supported. Note that IEBCOPY requires APF authorization in order to be performed.
  • If the main member and its alias names are copied, the relationship remains the same on the output PDS.
  • If a specified ddname has been allocated with a member name, the data set is treated as sequential.

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


x
The COPYDD Subcommand

The DYNAM COPYDD command copies a sequential data set or PDS member.



x
Syntax: How to Use the COPYDD Subcommand
DYNAM COPYDD ddname1[(mem1)] ddname2[(mem2)]

where:

ddname1

Is the ddname of the input data set.

mem1

Is optional. It is the input member name.

ddname2

Is the ddname of the output data set.

mem2

Is optional. It is the output member name.

Note:

  • If the specified ddname has been allocated with a member name, the data set is treated as sequential.
  • Identically named members are always replaced on the output PDS.
  • All conversions between different DCB attributes (RECFM, BLKSIZE, and LRECL) are performed automatically.
  • Since the DYNAM COPY command has more features than COPYDD, it is recommended that you use COPY instead of COPYDD.



x
The DELETE Subcommand

The DYNAM DELETE command deletes an entire MVS data set or selected PDS members.



x
Syntax: How to Use the DELETE Subcommand
DYNAM DELETE dsname

To delete individual members, use

DYNAM DELETE dname [MEMBER] members

where:

DELETE

Can be abbreviated as DEL.

dsname

Is the data set name to be deleted and uncataloged.

dname

Is the dsname or ddname of a PDS containing one or more members to be deleted. The ISPF-like lock is obtained.

MEMBER

May be omitted if the members are specified in parentheses.

members

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)


x
The RENAME Subcommand

The DYNAM RENAME command renames an entire MVS data set or selected PDS members.



x
Syntax: How to Use the RENAME Subcommand
DYNAM RENAME dsname1 dsname2

To rename individual members, use

DYNAM RENAME dname [MEMBER] members [REPLACE]

where:

RENAME

Can be abbreviated as REN.

dsname1

Is the data set name to be renamed and uncataloged.

dsname2

Is the new name to be assigned to the data set and cataloged.

dname

Is the dsname or ddname of a PDS containing one or more members to be renamed. The ISPF-like lock is obtained.

MEMBER

May be omitted if the members are specified in parentheses.

members

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.

REPLACE

Is optional. This replaces all members matching the specified new names.

A member specification has the following syntax

oldmem,newmem[,REPLACE]

where:

oldmem

Is the original member name.

newmem

Is the new member name.

REPLACE

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


x
The SUBMIT Subcommand

The DYNAM SUBMIT command submits jobs to MVS.

The ddname for DYNAM SUBMIT is normally allocated using a DYNAM ALLOC command. On HFS-deployed servers, if a DYNAM ALLOC is not found for the ddname, DYNAM SUBMIT will check whether a FILEDEF was issued for the ddname.



x
Syntax: How to Use the SUBMIT Subcommand
DYNAM SUBMIT dname [MEMBER(members)]

where:

SUBMIT

Can be abbreviated as SUB.

dname

Is the dsname or ddname of the input data set(s) containing JCL to be submitted. The ddname specifies a concatenation of data sets.

MEMBER

May be omitted if the members are specified in parentheses.

members

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.



x
The COMPRESS Subcommand

The DYNAM COMPRESS command compresses the partitioned data sets (PDS).



x
Syntax: How to Use the COMPRESS Subcommand
DYNAM COMPRESS dname [dname]...

where:

COMPRESS

Can be abbreviated as COMP.

dname

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

Top of page

x
Comparison of TSO Commands, JCL, and DYNAM

This section shows examples of TSO commands and JCL, compared to the equivalent DYNAM commands.



Example: Allocating an Existing File

TSO:

TSO ALLOC F(EDARPC) DA('MYUSER.EDARPC.DATA') SHR

JCL:

//EDARPC DD DSN=MYUSER.EDARPC.DATA,DISP=SHR

DYNAM:

DYNAM ALLOC FILE EDARPC DA MYUSER.EDARPC.DATA SHR


Example: Creating a New Data Set

TSO:

TSO      ALLOC F(EDARPC) DA('MYUSER.EDARPC.DATA')-
SPACE(5,3) TRACKS CATALOG DIR(2) -
UNIT(SYSDA) USING(NEWDCB) -
LRECL(80) RECFM(F B) BLKSIZE(1600)

JCL:

//EDARPC DD DSN=MYUSER.EDARPC.DATA,DISP=(NEW,CATLG),
//   SPACE=(TRK,(5,3,2)),UNIT=SYSDA,
//   CB=(LRECL=80,RECFM=FB,BLKSIZE=1600)

DYNAM:

DYNAM ALLOC FILE EDARPC DA MYUSER.EDARPC.DATA -
SPACE 5,3 TRACKS CATLG DIR 2UNIT SYSDA -
LRECL 80 RECFM FB BLKSIZE 1600


Example: Freeing Files

TSO:

TSO FREE F(EDARPC)

DYNAM:

DYNAM FREE FILE EDARPC


Example: Concatenating Files

TSO:

TSO ALLOC F(EDARPC) DA('MYUSER.EDARPC.DATA'-
    'MYUSER.PROGRAMS.DATA') SHR

JCL:

//EDARPC DD DSN=MYUSER.EDARPC.DATA,DISP=SHR
//   DD DSN=MYUSER.PROGRAMS.DATA,DISP=SHR

DYNAM:

DYNAM ALLOC FILE EDARPC DA MYUSER.EDARPC.DATA SHR
DYNAM ALLOC FILE PROGRAMS DA MYUSER.PROGRAMS.DATA SHR
DYNAM CONCAT FILE EDARPC PROGRAMS


x
FILEDEF Command Under UNIX, Windows, IBM i, z/OS, and OpenVMS

In this section:

How to:

A logical name (or ddname) is a shorthand name that points to the physical file name as the operating system actually knows the file. Logical names simplify code by allowing short names to be used in place of the longer physical file name.

The FILEDEF command assigns a logical name (or ddname) to a physical file name and specifies file attributes. FILEDEF assignments are in effect for the duration of a connection (except when a server is running in Pool Mode). They are released when the connection to the server is closed or a FILEDEF CLEAR is issued.

FILEDEF with the device name PRINTER is used in conjunction with OFFLINE requests to control printing attributes (such as the printer assignment and number of copies), and is further detailed in How to Use the FILEDEF Command in UNIX, Windows, IBM i, z/OS, and OpenVMS.



x
Syntax: How to Use the FILEDEF Command in UNIX, Windows, IBM i, z/OS, and OpenVMS
FILEDEF ddname devicetype fileid [([LRECL n] [RECFM fm] [APPEND]]

or

FILEDEF ddname DISK app/[appa.../]physfile.ftm
FILEDEF ddname CLEAR

where:

ddname

Is the logical name. It may contain 1 to 8 alphanumeric characters.

devicetype

Identifies the type of device with which to interact. Specifies DISK for a file that resides on disk. Other device types are PRINTER, TRMIN, and TRMOUT, which have special meanings and options. For more information, see Other FILEDEF Features.

CLEAR

Clears the specified ddname.

app/[appa...]

Is an application name (APP form of FILEDEF). It can be a nested application name.

physfile.ftm

Is a physical file located in the application (APP form of FILEDEF).

fileid

Is the physical full path name of the file as it is known on the particular operating system, using the native style of that operating system (non APP form of FILEDEF).

For instance, for Windows:

c:\mydir\myfile.dat
\\mymachine\\mydir\myfile.dat 

For UNIX, z/OS, and IBM i IFS:

/home/myhome/mydir/mtfile.dat 

For OpenVMS:

DISK$MYDISK:[MYHOME.MYDIR]MYFILE.DAT 

For IBM i QSYS

QSYS:MYLIB/MYFILE
QSYS:MYLIB/MYFILE(MYMEMB)

On UNIX, z/OS, and IBM i IFS file systems, where file names are case-sensitive and lowercase file names are the norm and are expected for the product, appropriate lowercase names should be used when coding the file name. The use of relative file names for server use is not supported, as they are easily confused on some platforms as APP names. The use of an APP MAP command and APP-based naming will let you simulate relative names, yet also be portable to other platforms by simply adjusting the MAP value.

To support physical directory (or file) names with embedded blanks (common on Windows, but also possible on some other operating systems), the complete fileid must be enclosed in single quotation marks. In most instances, a physical operating system name has a unique characteristic that can be used to detect if a physical name is being used so it will not be confused with an APP name. However, IBM i native library names are not always unique enough, so they require an explicit prefix (QSYS:) to ensure proper access.

Note: APP usage can handle any number of directories below APPROOT when nested applications are on (internal default or when edaserver.cfg has nested_app=y). APP usage is limited to the number of directory levels allowed by the nested_app configuration of a server. Any other usage is not permitted.

LRECL n

Specifies the record length, n, in bytes. This parameter is optional. If you omit it, the default is 80 bytes. Note that the left parenthesis preceding the optional parameters is required.

RECFM fm

Describes the record format. Specifies F for fixed format, V for variable format. This parameter is optional. If you omit it, the default is fixed format. Note that the left parenthesis preceding the optional parameters is required.

APPEND

Enables you to open the specified file and add new material at the end of the file. This parameter is optional. If you omit it and the specified file exists, it will be overwritten. Note that the left parenthesis preceding the optional parameters is required.

Note that FOCUS data sources (files with the .foc extension) that do not conform to the default naming conventions are identified using the USE command, not FILEDEF.



x
Other FILEDEF Features

PRINTER as a device type is used to change the default output file for the OFFLINE print file or set output destinations. For more information, see Sending Stored Procedure Report Output to Server-Side Printers.

FILEDEF TRMIN TERM LOWER is used to change the uppercasing behavior of an interactive session (edastart -t) into case sensitive mode. FILEDEF TRMIN TERM UP is used to restore default behavior. Interactive session mode is typically used for testing and is not considered a production feature for general use.

FILEDEF TRMOUT DISK fileid is used to capture session output into a file and is only valid during an interactive session (edastart -t).

FILEDEF TRMOUT TERM is used to restore default behavior after a change to DISK. Interactive session mode is typically used for testing and is not considered a production feature for general use.

For information about FILEDEF OFFLINE PRINTER, see Sending Stored Procedure Report Output to Server-Side Printers.

While command input lines (interactively or in a FOCEXEC) are effectively unlimited, this was not always the case. A feature of FILEDEF to deal with usually long directory/file names and this former limitation was the ability to split the FILEDEF command across several lines. This was done by using a dash (-) after a FILEDEF token to indicate continuation on the next line. While this feature is not needed anymore, it remains a feature for upward compatibility purposes and is documented here as a deprecated feature.


Top of page

x
Server Side OFFLINE Printing

In this section:

Server side printing of formatted reports is accomplished using the OFFLINE command, which sets up and issues a default OFFLINE FILEDEF (or DYNAM ALLOC on z/OS PDS deployment) to receive the formatted outputs after an OFFLINE CLOSE is issued.

The following example on UNIX (and Linux) creates an offline.ftm file and calls lp, the default print command for UNIX (and Linux). On other platforms an equivalent print command is issued:

OFFLINE
TABLE FILE CAR
PRINT COUNTRY
END
OFFLINE CLOSE

There may be one or more outputs buffered to the same output file for printing, but they are not released to the file until an OFFLINE CLOSE is issued. If a system level variable for FOCPRINT is available at OFFLINE CLOSE time, it will be used to attempt printing of the actual file.

The FILEDEF (or DYNAM ALLOC on z/OS PDS Deployment) OFFLINE PRINTER device feature allows the additional specification of output destinations and, in some cases, additional operating system print command switches for features such as multiple copies. In this way, a request can be customized to the print requirements of a particular site.

Prior behavior was that if the operating system variable FOCPRINT was declared (with an operating system command and a $1), it would be called to take an action on the file name which also replaced the $1 in the string.

The enhanced FILEDEF command is:

FILEDEF OFFLINE PRINTER [filename] [ ( PRINTER printername ]

The printer name option is used with the standard print feature of a given platform. If no printer name is declared or is set to blank, then the offline file is created, but the print feature is not called. Since printing is platform specific, each platform is described here individually, however, there are still some common needs that are sometimes best resolved by creating a layer that can act as a proxy between the server and the print system.



x
UNIX and z/OS HFS Deployment

The printer name is dropped in as the "-d" switch value in the "lp -c -d" command. The "-c" switch is used to avoid over-writing of the offline file before actual printing has occurred. If additional lp switches are desired (like multiple copies with the -n switch), they may be stacked into the name by enclosing the string in single quotation marks:

FILEDEF OFFLINE PRINTER ( PRINTER '29d1 -n 2'

If a site uses lpr instead of lp, then an lp shell script can be created in the $PATH before the standard lp command and can act as a proxy to call lpr instead. The lp script could be as simple as "/usr/bin/lpr $*" to redirect lp to lpr.

Note: On z/OS HFS Deployment, the file is spooled to the system and actual disposition will depend on the configuration of the printer spool.



x
z/OS PDS Deployment

A DYNAM ALLOC command for OFFLINE is used to specify spooling attributes.



x
OpenVMS

The printer name is dropped in as the "/QUEUE=" switch value in the "PRINT/QUEUE=" command. OpenVMS always makes a copy of the file to be printed so it does not have an over-writing the offline file problem. If additional PRINT switches are desired (like multiple copies with /COPIES= switch) they may be stacked into the name by enclosing the string in single quotation marks:

FILEDEF OFFLINE PRINTER ( PRINTER '29d1 /COPIES=2'

Sites rarely use anything but the standard PRINT command, but can be also proxied if necessary by creating an alternate printer command at the OS level or queue / symbiont that routes to the alternate method.



x
Windows

The printer name is a shared printer name and is used to set up (and later drop a NET USE for the LPT1device to a shared name (for example, \\nodename\myprinter), which is then used in a PRINT /D:LPT1 command to print the actual file. As such, additional switch options cannot be done and use of a PRINT.BAT as a proxy is the only method for further manipulation of the output.



x
IBM i

Note: IBM i was formerly known as i5/OS.

The output is always spooled from the offline file to the print spool using the system QPRINT file (with whatever the standard values are) on the server's library list. If the spool is set to directly print, output will always be routed as directed with no declaration of a printer name using FILEDEF. If output is not automatically routed and a printer name (using FILEDEF) is declared, then a CHGSPLFA command will be issued with the printer name as the OUTQ() value to direct the spool file to a destination. If additional CHGSPLFA parameters are desired (such as multiple copies with the COPIES() parameter), they may be stacked into the name by enclosing the string in single quotation marks:

FILEDEF OFFLINE PRINTER ( PRINTER '29d1 COPIES(2)'

A user can also set a specific IBM i QPRINT file to use (which may have attributes such as number of copies set within it) for spooled OFFLINE print files by either placing an appropriate QPRINT file (explicitly named QPRINT) on the server library path or issuing a SET command to use an explicit QPRINT file (of any name). Additionally, you may set a spool file SPLUSRDTA attribute (10-character limited string) to assist in identifying outputs. When set, the print spool job will pick up the attribute information and be displayed by the native operating system tools like DSPLSPLF and WRKDSPLF.

The commands are:

SET I5QPRINT = [{library}/]{qprintfile}

and

SET I5SPLUSRDTA = string

The internal default for I5QPRINT is QPRINT and may be set to any valid CRTPRTF-created QPRINT file. The QPRINT file and its attributes must be appropriate for the type of file that the OFFLINE command produces (paged plain text) and the capabilities of the actual print device. If no library is supplied, the *LIBL value of the job will be used to locate the file.

Setting I5QPRINT or I5SPLUSRDTA with no value to the right of the equal sign has no affect and leaves the current value unchanged.

Use SET I5SPLUSRDTA = ' ' to set I5SPLUSRDTA explicitly back to no value (blank). Also use single quotation marks for values with embedded spaces.

An I5QPRINT value of blank is illegal for the i5 spool system, so a value of ' ' defaults to QPRINT.

Note that the CRTPRTF command for creating printer attribute files does not create a default QPRINT that matches the IBM-delivered standard default that is in QGPL. To create a QPRINT with standard IBM-delivered default values use:

CRTPRTF FILE(*CURLIB/QPRINT) RPLUNPRT(*NO) CHRID(*CHRIDCTL)

Then make any site-specific changes and change the owner attribute rights from *ALL to *CHANGE (to prevent over-writing) with:

EDTOBJAUT OBJ(*CURLIB/QPRINT) OBJTYPE(*FILE)

The use of an lp script on IBM i as a proxy is not effective because lp is not used. The use of alternate QPRINT files is the closest equivalent to an lp proxy.



x
OFFLINE to DISK Versus PRINTER

The "( PRINTER printername" feature is only valid when the FILEDEF device is PRINTER. There is, however, a difference between the use of DISK versus PRINTER as a device in a FILEDEF for OFFLINE. When the device DISK is used, page breaks are represented by a 1 in the first column of a given line where a page break is to occur. This is the FORTRAN Carriage Control method of page control and is a vestige of the product's original mainframe roots. When the disk device is PRINTER, the more modern, Control L (^L / Decimal 12 / Hex 0C) form feed method is used.



x
Other Printing Information

Very often, sophisticated laser based printers are "hung" off networks and communicated with various print protocols. While these printers may come from many manufactures, a very common (but not standard) attribute of these types of printers is automatic sensing between a plain clear text file being sent to the printer and a postscript file that contains printer attribute commands as well as the text to print.

OFFLINE files are plain text (vs. HOLD FORMAT PS which do not get spooled using OFFLINE, and it is up to the user to direct them to a printer). Very often, these sophisticated printers can be set up or used improperly, causing a printer to think a plain text file is postscript when it is not, and yielding a page with a postscript error message. This has only been seen so far when printing from Windows, but is in theory possible from any platform.

This problem is not considered to be a server issue because the software is not directly manipulating these printers and uses standard commands supplied by the OS vendor for printing. Generally, this problem can also be reproduced using standard print tools stand-alone from the server environment. A systems administrator for a printer exhibiting an issue like this should be able to track down why this happens in any given environment and take corrective action.

An improper spooling issue may typically also be corrected by creating a proxy script to inject a leading character into the output that resets the printer, so the remaining output properly prints. Generally, this is a control D, but may vary by printer make and model and, as such, specific implementation of such a proxy script is left to the customer since specific needs may vary greatly by site and the various printer models that are available.


iWay Software