The /COPY and /INCLUDE directives allow the specification of files in either the QSYS file system or the IFS file system. In cases where the compiler cannot tell which file system the directive refers to, the search will begin in the file system of the file containing the /COPY directive.
/copy "SOME-LIB"/QRPGLESRC,MBR
the name can only be a QSYS file system name.If the name could be either in the QSYS file system or the IFS, the file system of the file containing the /COPY statement will be searched first. Note that upper-casing occurs for the QSYS file system (except with extended names specified with double quotes, such as "A/B") but not for the IFS. (The IFS is not case sensitive.)
| /Copy statement | QSYS interpretation | IFS interpretation (see below for the meaning of ".suffix") |
|---|---|---|
| /COPY MYMBR | FILE(*LIBL/QRPGLESRC) |
MYMBR or MYMBR.suffix in one of the directories in the include path |
| /COPY mymbr | FILE(*LIBL/QRPGLESRC) |
mymbr or mymbr.suffix in one of the directories in the include path |
| /COPY myfile,mymbr | FILE(*LIBL/MYFILE) |
myfile,mymbr or myfile,mymbr.suffix (note that MYFILE,MYMBR is a valid name in the IFS file system) |
| /COPY mylib/myfile,mymbr | FILE(MYLIB/MYFILE) |
mylib/myfile,mymbr (directory mylib and file myfile,mymbr) |
| /COPY "A/b",mymbr | FILE(*LIBL/"A/b") |
n/a (only part of name is in double quotes |
| /COPY "A/B" | FILE(*LIBL/QRPGLESRC) |
A/B |
| /COPY a b | FILE(*LIBL/QRPGLESRC) |
a or a.suffix (everything |
| /COPY 'a b' | N/A (name in single quotes) | a b or a b.suffix |
| /COPY /home/mydir/myfile.rpg | N/A (name begins with slash) | /home/mydir/myfile.rpg |
/COPY /QSYS.LIB/ |
N/A (name begins with slash) | /QSYS.LIB/L.LIB/F.FILE/ |