z/OS Communications Server: IP User's Guide and Commands
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


DIr subcommand—Obtain a list of directory entries

z/OS Communications Server: IP User's Guide and Commands
SC27-3662-00

Purpose

Use the DIr subcommand to obtain a list of directory entries or a list of files in a file group on the remote host, or a list of the members of the partitioned data set, as well as auxiliary information about the files.

Format

Read syntax diagramSkip visual syntax diagram
>>-DIr--+------+--+---------+----------------------------------><
        '-name-'  '-(--DISK-'   

Parameters

name
Specifies the name of the directory or file group. The default is the current directory or file group.
(DISK
Stores the results of the DIr subcommand as data set FTP.DIROUTP in the local current working directory.
  • If the local current working directory is an MVS™ PDS, the member DIROUTP is stored.
  • If the local current working directory is a z/OS® UNIX directory, the results are stored in a file named diroutp.

Examples

  • List the data sets with a common high-level qualifier as the current working directory:
    EZA1460I Command:                                                              
    dir                                                                            
    EZA1701I >>> PORT 9,42,105,36,4,70                                             
    200 Port request OK.                                                           
    EZA1701I >>> LIST                                                              
    125 List started OK                                                            
    EZA2284I Volume Referred      Ext      Used Recfm Lrecl BlkSz Dsorg Dsname     
    EZA2284I CPDLB4 2008/10/31      1         1  VB     256  6233  PS  FIFO.DEMO   
    EZA2284I CPDLB1 2008/11/11      1         2  FB      80  3120  PO  ISPF.ISPPROF
    EZA2284I CPDLB3 2000/08/23      1         1  VB     255  3120  PS  LOG.MISC    
    EZA2284I CPDLB1 1997/01/20      2         2  FB      80  3120  PO  SPF.ISPPROF 
    EZA2284I CPDLB3 2008/11/11      9         9  VBS   4000  2000  PS  TEST.ABC    
    EZA2284I CPDLB3 2008/11/11      1         1  VBS   4000  2000  PS  TEST.ABC1   
    250 List completed successfully.                                               
    EZA1460I Command:                                                              
    Note: The DIr output for a RECFM=U data set for the FTP display always shows the same value for lrecl as it shows for blksize.
  • List the files for a z/OS UNIX file system directory:
    cd '/u/user121/ftp.example'
     
     >>>CWD '/u/user121/ftp.example'
     250 HFS directory /u/user121/ftp.example is the current working directory
     Command:
    dir
     >>>PORT 9,67,112,25,4,61
     200 Port request OK.
     >>>NLST
     125 List started OK
     total 64
     -rw-r-----    1 USER121  SYS1      6720 Feb  7 18:48 append02
     -rw-r-----    1 USER121  SYS1      3360 Feb  6 18:51 file1
     -rw-r-----    1 USER121  SYS1      3883 Feb  6 18:51 file2
     -rw-r-----    1 USER121  SYS1      3883 Feb  6 18:51 file3
     -rw-r-----    1 USER121  SYS1      7277 Feb  6 18:51 file4
     -rw-r-----    1 USER121  SYS1      3360 Feb  6 18:51 file5
      250 List completed successfully.
     Command:
  • List the members of a partitioned data set containing load modules:
    cd 'sys1.linklib'                                            
    >>> CWD 'sys1.linklib'                                       
    250-Local directory might be a load library                  
    250 "SYS1.LINKLIB" partitioned data set is working directory 
    Command:                                                     
    dir d*                                                                         
    >>> PASV                                                                       
    227 Entering Passive Mode (127,0,0,1,4,112)                                    
    >>> LIST d*                                                                    
    125 List started OK                                                            
     Name      Size   TTR   Alias-of AC --------- Attributes --------- Amode Rmode 
    DD        03DBD8 031506 IRRENV00 01 FO             RN RU            31    24   
    DELDSD    03DBD8 031506 IRRENV00 01 FO             RN RU            31    24   
    DELGROUP  03DBD8 031506 IRRENV00 01 FO             RN RU            31    24  
    DELUSER   03DBD8 031506 IRRENV00 01 FO             RN RU            31    24  
    DG        03DBD8 031506 IRRENV00 01 FO             RN RU            31    24  
    DMOCI001  000710 03370C          00 FO                              31    ANY 
    DMOCTCTL  000178 033715          01 FO             RN RU            31    ANY 
    DMOCTFIL  000028 03371D          01 FO             RN RU            31    ANY 
    DMOCTFMT  00ABC8 033725          01 FO             RN RU            31    ANY 
    DMOCTLOC  0006E8 03380C          01 FO             RN RU            31    ANY 
    DMOCTRCE  0008F8 033814          01 FO             RN RU            31    ANY 
    DMOCTSTR  000588 03381D          01 FO             RN RU            31    ANY 
    DMODA002  001318 033826          01 FO             RN RU            31    ANY 
    DMODA003  004618 033909          01 FO             RN RU            31    ANY 
    DMODA004  000658 033916          01 FO             RN RU            31    ANY 
    DMODIAG   001E58 03391F          00 FO                              31    24  
    DMOVS001  002110 033A04          01 FO             RN RU            31    ANY 
    DMOVS002  0003D8 033A0F          01 FO             RN RU            31    ANY 
    DU        03DBD8 031506 IRRENV00 01 FO             RN RU            31    24  
    250 List completed successfully.                                              
    Command: 
  • List the members of a partitioned data set from a text library:
    cd 'tcpv3.tcpip.profiles'
     >>>CWD 'tcpv3.tcpip.profiles'
     257 "'TCPV3.TCPIP.PROFILES'" partitioned data set is working directory.
     Command: dir
     
     >>>PORT 9,67,112,25,4,32
     200 Port request OK.
     >>>LIST
    125 List started OK.
     Name     VV.MM    Created       Changed     Size  Init   Mod   Id
    TST6MV1   01.05 1997/06/26 1996/07/10 06:38    16    16     0 USER34
    TST6MV2   01.08 1997/05/23 1996/07/03 12:49    16    17     0 USER34
    TST6MV3   01.19 1997/05/23 1996/07/10 06:34    16    17     0 USER34
    TST6021   01.04 1997/03/04 1996/07/08 09:17    15    15     0 USER34
    TST6121   01.10 1997/05/23 1996/07/10 06:26    16    17     0 USER34
    250 List completed successfully.
     ***

Usage

  • To make a file group the current working directory, use the CD command. The method you use to specify a directory or file group is host-dependent.
  • The DIr subcommand provides a complete list of directory entries and gives additional information about the files.
    When using this subcommand to list MVS data sets that have a common high-level qualifier as the current working directory on a remote host, the volume names are displayed. However, when displaying a multivolume data set used in an SMS environment, only the first volume name is displayed. To list all volume names for a multivolume data set, issue the following TSO command on the remote host:
    LISTC  ENT('dataset_name')  ALL
  • You can use special characters for pattern matching when specifying the name. These characters depend on the host FTP server.
  • Special characters you can use for the z/OS FTP server:
    *
    A single asterisk by itself indicates that either a qualifier or one or more characters within a qualifier can occupy that position. An asterisk can precede or follow a set of characters. An asterisk as the last qualifier will indicate that 0 or more qualifiers can occupy that position.
    **
    A double asterisk indicates that 0 or more qualifiers can occupy that position. A double asterisk cannot precede or follow any characters. It must be preceded and followed by either a period or a blank.
    %
    A single percent sign by itself indicates that exactly one alphanumeric or national character can occupy that position.
    %...%
    One to eight percent signs (%) can be specified in each qualifier.
    In DIRECTORYMode, ** is not allowed and % and * can be specified in the last qualifier only.
    The following shows examples of how the z/OS FTP server special characters can be used.
    Entry Returns
    VSAM.DATA.SET
    VSAM.DATA.SET only
    VSAM.DATA.SET%
    VSAM.DATA.SET1
    VSAM.DATA.SET2
    
    - but not VSAM.DATA.SET30
    VSAM.DATA.SET%%
    VSAM.DATA.SET30
    VSAM.DATA.SET31
    
    - but not  VSAM.DATA.SET1
      or       VSAM.DATA.SET2
    VSAM.*.SET
    VSAM.DATA1.SET
    VSAM.DATA2.SET
    
    - but not VSAM.DATA.SET.KSDS
    VSAM.*A
    VSAM.A
    VSAM.BA
    VSAM.BBA
    
    - but not VSAM.B
      or      VSAM.AB
    VSAM.DATA.*
    VSAM.DATA.SET1
    VSAM.DATA.SET2
    VSAM.DATA.SET.KSDS
    
    - but not VSAM.DATA1.SET
    VSAM.DATA*
    VSAM.DATA1
    VSAM.DATA23
    
    - but not VSAM.DATA.SET.KSDS
    VSAM.DATA*.*
    VSAM.DATA1 
    VSAM.DATA23
    VSAM.DATA.SET1 
    VSAM.DATA1.SET 
    VSAM.DATA.SET.KSDS
    VSAM.**
    VSAM
    VSAM.DATA.SET1
    VSAM.DATA.SET2
    VSAM.DATA.SET.KSDS
    
    - but not VSAM1.DATA.SET
    **.DATA
    VSAM.DATA
    NONVSAM.WORK.DATA
    DATA
    - but not VSAM.DATA.SET
    ** 
    Will return all data sets within
    the current working directory.
    
    If the current working directory
    is null, this command has the
    potential to read all available
    catalogs to which the user has
    access.  This can take a
    considerable length of time. 

Context

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2013
This information center is Built on Eclipse™ ( www.eclipse.org ).