The CRTBNDRPG and CRTRPGMOD commands include parameters to allow the source files to be either in the QSYS file system of in the IFS sile system. These are:
SRCSTMF is used instead of SRCFILE and SRCMBR to indicate a stream file is the main source file.
INCDIR is used to list the directories that will contain copy files.The stream file specified for the SRCSTMF can be an absolute path to the file (beginning with a slash), or it can be a path relative to the current directory.
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.
When the compiler encounters a /COPY statement, the statement could refer to a file in the IFS or in the QSYS file system. If the name begins with a slash or is specified in single quotes, the name can only refer to a file in the IFS. A name in the IFS can be specified in double quotes as well. Where only part of the name is in double quotes, for example:
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 File Name Intepretation for QSYS and IFS
Note: When searching for files in the IFS, if the file name does not contain a dot, the RPG compiler will look for files with the following suffixes (in this order):
Search Path Within The IFS
You have two ways to indicate where /COPY and /INCLUDE files can be found in the IFS:
For Example: ADDENVVAR ENVVAR(RPGINCDIR)VALUE (’ /home /mydir: /project /prototypes’) ADDENVVAR
When searching for a relative file in the IFS (one whose path does not begin with /), the file will be searched for in the following places, in this order
For example, if:
The directory search path takes precedence over the default-suffix order. If a file with no extension is searched for in several different directories, all suffixes will be tried in each directory before the next directory is tried.
Search Order for Copy Files
IBM - RPG Related Interview Questions
|IBM-ILE Interview Questions||IBM Informix Interview Questions|
|IBM DB2 Interview Questions||SQL Database Interview Questions|
|IBM AIX Interview Questions||SQL Interview Questions|
|AS400 Interview Questions||DB2 SQL Programming Interview Questions|
|IBM Integration Bus Interview Questions||Synopsys Interview Questions|
|Rpgle Interview Questions|
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.