DDNINFO(ddname)
Notes:
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.
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