Do we have any system command in Mainframe, like DSPFD command in AS/400, to get the file description details like Type of file, keyed/non-keyed, Unique key(yes/no), No of key fields, Name of key fields, Record length, Row count, Total size etc..
Do we have any command to get the field description of a file, like DSPFFD command in AS/400.
To get the details like Field Name, Field Type, Field Length, Decimal position, Field description, Unique(yes/no) etc...
Joined: 30 Nov 2013 Posts: 641 Location: The Universe
In standard TSO you have the LISTDS command -
FB 80 6160 PO
The amount of output, as you can see, is minimal. Many shops have an enhanced LISTDS command of some sort, though I'm not aware of anything that is generally available.
ISPF has a facility to display data set information. It produces output like this -
Data Set Information
Data Set Name . . . : SYS1.MACLIB
General Data Current Allocation
Volume serial . . . : XXXXXX Allocated cylinders : 183
Device type . . . . : 3390 Allocated extents . : 1
Organization . . . : PO Maximum dir. blocks : 200
Record format . . . : FB
Record length . . . : 80
Block size . . . . : 6160 Current Utilization
1st extent cylinders: 183 Used cylinders . . : 183
Secondary cylinders : 5 Used extents . . . : 1
Used dir. blocks . : 111
Creation date . . . : 2001/04/03 Number of members . : 1,716
Referenced date . . : 2014/09/24
Expiration date . . : ***None***
Notice that neither facility provides information about fields in the data set. That's because that information is not a data set attribute. Only the programs that use the data set have this information.
Joined: 06 Jun 2008 Posts: 8344 Location: Dubuque, Iowa, USA
There are various ways, as indicated, to get data about a data set on a mainframe. There is nothing that will give you data about the fields in the data set as field information is not stored anywhere on a mainframe -- it is not an AS/400. You need to consult application documentation, or read the code, to determine field attributes.