Search code examples
datasetzosmvs

On z/OS USS, how to decide whether an existing MVS data set is a partition data set (library) or a sequential data set?


The goal is to get the type of data sets in MVS from USS. Let's say Partitional Data Set and Sequential Data Set.

Please suggest any simple solutions in the command line.

Any simple tsocmd commands to get the dataset information are expected.


Solution

  • You can also use tsocmd if you don't have ZOAU by passing the LISTDS TSO command. The below example is using the OMVS shell and I had to escape the parentheses and tick using a backslash or enclose it in quotes:

    $ tsocmd listds \(\'sys1.parmlib\'\)
    listds ('sys1.parmlib')             
    SYS1.PARMLIB                        
    --RECFM-LRECL-BLKSIZE-DSORG         
      FB    80    27920   PO            
                                        
    --VOLUMES--                         
      VIMVSB                            
    
    $ tsocmd "listds ('sys1.parmlib')"
    listds ('sys1.parmlib')           
    SYS1.PARMLIB                      
    --RECFM-LRECL-BLKSIZE-DSORG       
      FB    80    27920   PO          
                                      
    --VOLUMES--                       
      VIMVSB                          
    $