...
Anchor | ||||
---|---|---|---|---|
|
If the file specification contains only the file portion, the current library is pre-pended to the name to refer directly to a file with no member component.
Example:
Panel COPY SRC=MYFILE
The absolute path derived would be CURLIB/MYFILE.
If the file specification contains only file and member portions, the current library is pre-pended to the name to refer to a specific member in a file.
Example:Anchor 1057892 1057892
Panel COPY SRC=MYFILE(MYMBR)
The absolute path derived would be CURLIB/MYFILE(MYMBR).
If the file specification contains only library and file portions, an absolute path without a member component is used.
Example:Anchor 1057895 1057895
Panel COPY SRC=MYLIB/MYFILE
The absolute path would be exactly as given: MYLIB/MYFILE.
If a file specification contains library, file, and member portions, all of those components are used explicitly in the absolute path.
Example:Anchor 1057898 1057898
Panel COPY SRC=MYLIB/MYFILE(MYMBR)
The absolute path would be MYLIB/MYFILE(MYMBR).
IBM i Destination File Specification Rules
...
Anchor | ||||
---|---|---|---|---|
|
If the destination file specification contains an empty path (no library, file, or member portions), the file and member portions are derived from the source path. If the destination file is to be a save file, the absolute path in this case would be DSTLIB/MYFILE. If the destination file is to be a physical file, the absolute path would be DSTLIB/MYFILE(MYMBR).
Examples:Anchor 1057938 1057938
Panel COPY SRC=MYLIB/MYFILE(MYMBR)
The result is a destination name of DSTLIB/MYFILE(MYMBR) if the destination file type is a physical file.
Panel COPY SRC=MYLIB/MYFILE
The result is a destination name of DSTLIB/MYFILE if the destination file type is a save file.
If the destination file specification contains only a file portion, the current library is pre-pended to the absolute path. In this case, if the destination file is to be a save file, the absolute path would be DSTLIB/YOURFILE. If the destination file is to be a physical file, the absolute path would be DSTLIB/YOURFILE(MYMBR).
Examples:Anchor 1057942 1057942
Panel COPY SRC=MYLIB/MYFILE(MYMBR) DST=YOURFILE
The result is a destination name of DSTLIB/YOURFILE(MYMBR) if the destination file type is a physical file.
Panel COPY SRC=MYLIB/MYFILE DST=YOURFILE
The result is a destination name of DSTLIB/YOURFILE if the destination file type is a save file.
If the destination file specification contains only a file portion (with an empty member), the result is exactly the same as when just a destination file name is given.
Example:Anchor 1057946 1057946
Panel COPY SRC=MYLIB/MYFILE(MYMBR) DST=YOURFILE()
The result is a destination name of DSTLIB/YOURFILE(MYMBR) if the destination file type is a physical file.
If the destination file specification contains only file and member portions, the resulting absolute path is DSTLIB/YOURFILE(YOURMBR) if a physical file is wanted.
Example:Anchor 1057949 1057949
Panel COPY SRC=MYLIB/MYFILE(MYMBR) DST=YOUFILE(YOURMBR)
The result is a destination name of DSTLIB/YOURFILE(YOURMBR) if the destination file type is a physical file.
If the destination file specification contains only a library portion, that library is used instead of the current library. In this case, an absolute path of YOURLIB/MYFILE is used if a save file is wanted. If a physical file is wanted, an absolute path of YOURLIB/MYFILE(MYMBR) is used.
Examples:Anchor 1057952 1057952
Panel COPY SRC=MYLIB/MYFILE(MYMBR) DST=YOURLIB/
The result is a destination name of YOURLIB/MYFILE(MYMBR) if the destination file type is a physical file.
Panel COPY SRC=MYLIB/MYFILE DST=YOURLIB/
The result is a destination name of YOURLIB/MYFILE if the destination file type is a save file.
If the destination file specification contains only library and file portions, an absolute path of YOURLIB/YOURFILE is derived if a save file is wanted. If a physical file is wanted, YOURLIB/YOURFILE(MYMBR) is used.
Examples:Anchor 1057956 1057956
Panel COPY SRC=MYLIB/MYFILE(MYMBR) DST=YOURLIB/YOURFILE
The result is a destination name of YOURLIB/YOURFILE(MYMBR) if the destination file type is a physical file.
Panel COPY SRC=MYLIB/MYFILE DST=YOURLIB/YOURFILE
The result is a destination name of YOURLIB/YOURFILE if the destination file type is a save file.
If the destination file specification contains library and file portions, as well as an empty member name, the result is exactly the same as when the file specification contains only library and file portions.
Example:Anchor 1057960 1057960
Panel COPY SRC=MYLIB/MYFILE(MYMBR) DST=YOURLIB/YOURFILE()
The result is a destination name of YOURLIB/YOURFILE(MYMBR) if the destination file type is a physical file.
If the destination file specification contains a complete absolute path (library, file, and member portions), the source file name has no effect on the destination path in any way. In this case, if the destination file type is a save file, YOURLIB/YOURFILE is used. If the destination file type is a physical file, YOURLIB/YOURFILE(YOURMBR) is used.
Examples:Anchor 1057963 1057963
Panel COPY SRC=MYLIB/MYFILE(MYMBR)DST=YOURLIB/YOURFILE(YOURMBR)
The result is a destination name of YOURLIB/YOURFILE(YOURMBR) if the destination file type is a physical file.
Panel COPY SRC=MYLIB/MYFILE DST=YOURLIB/YOURFILE
The result is a destination name of YOURLIB/YOURFILE if the destination file type is a save file.
In cases where a member is specified explicitly in the destination file name and the destination file type is a save file, an error is issued.
Note title Note If the user issues a cd dst-logical-name=.. command to blank out the current library on the destination side, the library name in the absolute path of the source file is used in the destination absolute path in cases where no library is specified explicitly.
This works only for IBM i to IBM i copies where both operating systems are operating in the LIB file system.Anchor 1057968 1057968
Example:Anchor 1057969 1057969
Panel CD DST=.. COPY SRC=MYLIB/MYFILE(MYMBR)
The result is a destination of MYLIB/MYFILE(MYMBR), using the source's library, file, and member names, because none are supplied explicitly in the copy command. The current directory on the destination side is empty because the command cd DST=.. was issued.
Destination (only) in LIB File System
...
Anchor | ||||
---|---|---|---|---|
|
If the destination file specification contains an empty path (no library, file, or member portions), the source file name is used for the file and member names on the destination side. If the destination file is to be a save file, the absolute path in this case would be DSTLIB/MYFILE. If the destination file is to be a physical file, the absolute path would be DSTLIB/MYFILE(MYFILE).
Example:Anchor 1058009 1058009
Panel COPY SRC=MYFILE
DSTLIB/MYFILE(MYFILE) will be used as the destination name if the destination file type is a physical file and DSTLIB/MYFILE will be used if the destination file type is a save file.
If the destination file specification contains only a file portion, the current library is pre-pended to the absolute path and the source file name is used for the member (if it applies). In this case, if the destination file is to be a save file, the absolute path would be DSTLIB/YOURFILE. If the destination file is to be a physical file, the absolute path would be DSTLIB/YOURFILE(MYFILE).
Example:Anchor 1058012 1058012
Panel COPY SRC=MYFILE DST=YOURFILE
DSTLIB/YOURFILE(MYFILE) will be used as the destination name if the destination file type is a physical file and DSTLIB/YOURFILE will be used if the destination file type is a save file.
If the destination file specification contains only a file portion and an empty member portion, the result is exactly the same as when the file specification contains only file portion.
Example:Anchor 1058015 1058015
Panel COPY SRC=MYFILE DST=YOURFILE()
DSTLIB/YOURFILE(MYFILE) will be used as the destination name if the destination file type is a physical file.
If the destination file specification contains only file and member portions, the resulting absolute path is DSTLIB/YOURFILE(YOURMBR) if a physical file is wanted.
Example:Anchor 1058018 1058018
Panel COPY SRC=MYFILE DST=YOURFILE(YOURMBR)
DSTLIB/YOURFILE(YOURMBR) will be used as the destination name if the destination file type is a physical file.
If the destination file specification contains only a library portion, that library is used instead of the current library. In this case, an absolute path of YOURLIB/MYFILE is used if a save file is wanted. If a physical file is wanted, an absolute path of YOURLIB/MYFILE(MYFILE) is used.
Example:Anchor 1058021 1058021
Panel COPY SRC=MYFILE DST=YOURLIB/
YOURLIB/MYFILE(MYFILE) is used as the destination name if the destination file type is a physical file or YOURLIB/MYFILE if the destination file type is a save file.
If the destination file specification contains only library and file portions, an absolute path of YOURLIB/YOURFILE is derived if a save file is wanted. If an absolute path of YOURLIB/YOURFILE(MYFILE) is used if a physical file is wanted,
Example:Anchor 1058024 1058024
Panel COPY SRC=MYFILE DST=YOURLIB/YOURFILE
YOURLIB/YOURFILE(MYFILE) is the destination name if a physical file is wanted and YOURLIB/YOURFILE is used if a save file is wanted.
If the destination file specification contains library and file portions, as well as an empty member portion, the result is exactly the same as when the specification contains only a library and file portions.
Example:Anchor 1058027 1058027
Panel COPY SRC=MYFILE DST=YOURLIB/YOURFILE
YOURLIB/YOURFILE(MYFILE) is the destination name if a physical file is wanted.
If the destination file specification contains a complete absolute path (library, file, and member portions), the source file name has no effect on the destination path in any way. In this case, if the destination file type is a physical file, YOURLIB/YOURFILE(YOURMBR) is used.
Example:Anchor 1058030 1058030
Panel COPY SRC=MYFILE DST=YOURLIB/YOURFILE(YOURMBR)
YOURLIB/YOURFILE(YOURMBR) is the destination if the destination file type is a physical file.
- In cases where a member is specified explicitly in the destination file name and the destination file type is a save file, an error is issued.