DDNINFO

Syntax:

DDNINFO(ddname)

Arguments:

ddname
is the 1 to 8 character ddname for which you want information. The ddname must be allocated at the time DDNINFO is invoked.

Module Name:

SWXDDNIF

Service Description:

The DDNINFO function is used to extract in-storage information about a ddname. The information is taken from the Task Input Output Table (TIOT) and the Job File Control Block (JFCB) for the ddname.

Notes:

  1. If more than one data set is associated with the ddname, only information for the first data set is returned. If that data set spans volumes, only information about the first volume is returned.
  2. If the ddname has not been opened, the DCB information (RECFM, LRECL, BLKSIZE) will not be available.
  3. MVS/SP 4.2 and DFP/MVS 3.3 are the minimum software levels for DDNINFO. If your software is older than this, some data items may not be available.

Returned Information:

The DDNINFO function returns a string containing the return code and ddname information or an error message.

When the return code is zero, the fields below are returned (separated by one blank):

Word Data Item Description
1. rc Return code.
2. ddname The data definition name.
3. dsname The first or only data set associated with the ddname. The data set name is fully qualified (no quotes).
4. volser Volume serial number. If the data set spans volumes, only the first volser is reported.
5. unit Type of unit (e.g., "3390"). If the data set spans volumes, only the first unit is reported.
6. dsorg Data set organization. PDSE data sets are indicated with the "PO-E" designation.
7. recfm The record format. If the data set is a VSAM data set, it is possible that the record organization will be reported (e.g., "KSDS").
8. lrecl The logical record length.
9. blksize The block size.
10. dsntype The SMS data set type.
11. storclas SMS storage class.
12. mgmtclas SMS management class.
13. dataclas SMS data class.
14. status The allocation status.
15. ndisp The normal disposition.
16. cdisp The conditional disposition.

If a data item is unavailable, the interface supplies a single question mark (?) as a placeholder. This ensures that the word position of all data items remains constant.

If the return code is non-zero, the fields returned are as follows:

Word Data Item Description
1. rc Return code.
2. ddname The data definition name.
3. reason The reason code in printable hex, or 8 zeros if not applicable.
message A textual message describing the service detecting the error, and the nature of the error. The message can (and usually does) contain embedded blanks.

If you CALL the DDNINFO function, the returned value is contained in the RESULT special variable. The RC variable is unchanged (unless you assign the return code to it). A return code of zero always indicates success.

Examples:

  1. Retrieve ddname information for SYSPRINT:
    parse value ddninfo("sysprint") with rc SysprintInfo
    if rc = 0 then
      parse var SysprintInfo ddname dsname volser unit,
                             dsorg recfm lrecl blksize,
                             dsntype sclass mclass dclass,
                             status ndisp cdisp
    else
      parse var SysprintInfo ddname reason message
    


© Copyright 1998 by Open Software Technologies, Inc.