MKdir subcommand—Create a directory on the remote host
Purpose
Use the MKdir subcommand to create a PDS, PDSE, or z/OS® UNIX directory on the remote host.
Format
Parameters
- directory
- Specifies the name of the remote directory to be created.
- local_directory
- Specifies the name of a local directory that is to be a model
for the remote directory. Requirements:
- local_directory and directory must be MVS™ directories.
- The server must be a Communication Server for z/OS FTP server.
Guidelines:- Use this parameter only when you have called the FTP client interactively.
- You can use this parameter to specify a local MVS directory that has characteristics you want for the remote directory. For example, use the (like parameter when allocating the target of a load module transfer to ensure that the source and target directories are compatible for load module transfer.
Restrictions:- Only the 3390 device architecture is supported. Unpredictable results will occur if the source or target directory is on devices that use a different architecture.
- FTP can only approximate the following characteristics of local_directory: SPACETYPE, DIRECTORY, PRIMARY, and SECONDARY. Thus, the corresponding characteristics of directory might not match the original allocation of local_directory. For complete control over these characteristics, do not use the (like parameter.
Results:- FTP must read local_directory to determine its characteristics. Do not use the (like parameter if this is not acceptable.
- FTP sends a SIte command to the server for you to configure the FTP server to allocate directory with the same characteristics as local_directory. A SIte command changes the server configuration for the rest of the session; consequently, the server configuration changes for the rest of the session when you specify the (like parameter. Do not use the (like parameter if you do not want the server configuration to change.
- If local_directory is a migrated data
set, FTP checks the local AUTORECALL setting to determine whether
to recall the data set or fail the request.
- If AUTORECALL is true, FTP tries to recall the migrated data set.
- If AUTORECALL is false, FTP fails the MKdir request.
- If local_directory is a data set that
is not mounted, FTP checks the local AUTOMOUNT setting to determine
whether to mount the data set or fail the request.
- If AUTOMOUNT is true, FTP tries to mount the data set.
- If AUTOMOUNT is false, FTP fails the MKdir request.
Results
The MKdir subcommand directs the
FTP client to send an MKD command to the remote host FTP server to
create a directory with name directory.
- If the server is a Communications Server for z/OS FTP server, and directory is a fully qualified MVS data set name, the server allocates a PDS or PDSE named directory. For example, MKdir 'USER33.TEST.PDS' causes the server to create a PDS or PDSE named 'USER33.TEST.PDS'.
- If the server is a Communications Server for z/OS FTP server, and directory is an absolute path name, the server creates a z/OS UNIX directory named directory. For example, mkdir/tmp/logs directs the server to create a z/OS UNIX directory named /tmp/logs.
- If the current working directory is an MVS directory, the server allocates a PDS or PDSE in the current working directory whose LLQ is directory. For example, suppose the current working directory is 'USER33.TEST'. The subcommand MKdir PDS directs the server to create a PDS or PDSE called 'USER33.TEST.PDS'.
- If the current working directory is a z/OS UNIX directory, the server creates a subdirectory within the current working directory. For example, suppose the current working directory is /tmp. The subcommand MKdir logs direct the server to create the directory /tmp/logs.
For a z/OS FTP server, the characteristics of the z/OS UNIX directory or MVS directory are determined by the server's configuration. For example, when the server is allocating an MVS directory, the server PDSTYPE configuration option specifies whether the server allocates a PDS or PDSE. You can use the STAtus subcommand to display the server configuration and the SIte subcommand to change the server configuration.
Examples
In this example, a directory is
created on the remote host (1.1.2.3 in this example). Both EXAMPLE
and FTP.EXAMPLE
are created in
the remote host, showing the difference between specifying and omitting
quotation marks in the directory name.
User: ftp 9.67.113.24.621
System: IBM FTP CS V1R5
FTP: using TCPCS
FTP.DATA FILE NOT FOUND. USING HARDCODED DEFAULT VALUES.
Connecting to 1.1.2.3, port 21
220-EZAFTSRV IBM FTP CS V1R2 at EMU.ABC.OZ, 15:34:32 on 2000-08-03.
220 Connection will not timeout.
NAME (<host>:tsouserid):
User: user121
System: >>>USER user121
331 Send password please.
Password:
User:
>>>PASS ********
230 USER121 is logged on. Working directory is '/u/user121".
Command:
User: dir
System: >>>PORT 9,67,112,25,4,96
200 Port request OK.
>>>LIST
125 List started OK.
total 2768
-rwxr-xr-t 2 USER121 SYS1 389120 Feb 5 16:03 ftpdka
-rwxr-xr-t 2 USER121 SYS1 962560 Feb 5 16:04 ftpsrvka
-rw-r----- 1 USER121 SYS1 11648 Jan 20 14:30 g.s
drwxr-x--- 3 USER121 SYS1 0 Oct 21 17:50 msg
-rw-r----- 1 USER121 SYS1 1458 Jan 10 19:25 s.k
drwxr-x--- 2 USER121 SYS1 0 Feb 6 15:59 tcpip
drwxr-x--- 2 USER121 SYS1 0 Feb 6 17:29 test
250 List completed successfully.
Command:
User: mkdir example
System: >>>MKD example
257 "/u/user121/example" created.
Command:
User: dir
System: >>>PORT 9,67,112,25,4,97
200 Port request OK.
>>>LIST
125 List started OK.
total 2768
drwxr-xr-- 2 USER121 SYS1 0 Feb 7 19:57 example
-rwxr-xr-t 2 USER121 SYS1 389120 Feb 5 16:03 ftpdka
-rwxr-xr-t 2 USER121 SYS1 962560 Feb 5 16:04 ftpsrvka
-rw-r----- 1 USER121 SYS1 11648 Jan 20 14:30 g.s
drwxr-x--- 3 USER121 SYS1 0 Oct 21 17:50 msg
-rw-r----- 1 USER121 SYS1 1458 Jan 10 19:25 s.k
drwxr-x--- 2 USER121 SYS1 0 Feb 6 15:59 tcpip
drwxr-x--- 2 USER121 SYS1 0 Feb 6 17:29 test
250 List completed successfully.
Command:
User: mkdir '/u/user121/ftp.example'
System: >>>MKD '/u/user121/ftp.example'
257 "/u/user121/ftp.example" created.
Command:
User: dir
System: >>>PORT 9,67,112,25,4,98
200 Port request OK.
>>>LIST
125 List started OK.
total 2800
drwxr-x--- 2 USER121 SYS1 0 Feb 7 19:57 example
drwxr-x--- 2 USER121 SYS1 0 Feb 7 19:57 ftp.example
-rwxr-xr-t 2 USER121 SYS1 389120 Feb 5 16:03 ftpdka
-rwxr-xr-t 2 USER121 SYS1 962560 Feb 5 16:04 ftpsrvka
-rw-r----- 1 USER121 SYS1 11648 Jan 20 14:30 g.s
drwxr-x--- 3 USER121 SYS1 0 Oct 21 17:50 msg
-rw-r----- 1 USER121 SYS1 1458 Jan 10 19:25 s.k
drwxr-x--- 2 USER121 SYS1 0 Feb 6 15:59 tcpip
drwxr-x--- 2 USER121 SYS1 0 Feb 6 17:29 test
250 List completed successfully.
Command:
Related topics:
- See Dynamic allocation of new data sets for information about FTP configuration options that determine data set characteristics when creating an MVS directory.
- See SIte subcommand—Send site-specific information to a host for information about setting the SIte configuration options.
- See STAtus subcommand—Retrieve status information from a remote host for information about displaying the SIte configuration options.
- See SENDSite subcommand—Toggle the sending of site information for information about SENDSite subcommand.
- See LOCSIte subcommand—Specify site information to the local host for information about changing the AUTORECALL and AUTOMOUNT settings.