2. Which of the following statement(s) explains the
difference(s) between the /INCLUDE and ICOPY directives?
a.) No difference, they function the same
b.) ACOPY cannot be used as a conditional directive
c.) IINCLUDE files cannot contain embedded SQL
d.) Nesting /TNCLUDE directives is not allowed
Answers were Sorted based on User's Feedback
Answer / sumamurali
Answer is C.
Explanation is given below to support the answer :
Using /COPY and conditional compiler directives in your RPG
IV programs lets you easily reuse RPG IV code. Some of you
using /COPY extensively have run into problems, though,
when using /COPY in SQLRPGLE members. When compiling
SQLRPGLE members, the SQL precompiler first processes the
SQL statements and then copies in the members specified
in /COPY. The problem is that the SQL precompiler doesn't
handle /EOF or nested /COPY members correctly. The
precompiler adds in the /COPY member, including /EOF, which
causes the compiler to ignore all lines following /EOF,
causing the compile to fail.
/INCLUDE can be used interchangeably with /COPY, as they
do exactly the same function with one exception: the SQL
precompiler leaves the /INCLUDE in the source member,
without reading the /INCLUDEd source member.
Because the SQL precompiler never processes an /INCLUDE
source member, the /INCLUDEd member shouldn't contain
embedded SQL or definitions relating to host variables. If
you do need to include embedded SQL or definitions relating
to host variables in an included member, you can still
use /COPY -- just don't use /EOF in the included member.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / nandini
The /COPY and /INCLUDE directives are identical except that
they are handled differently by the SQL pre-processor:
The /COPY directive is expanded by the preprocessor. The
copied file can contain embedded SQL or host variables.
The /INCLUDE directive is not expanded by the preprocessor.
The included file cannot contain embedded SQL or host
variables.
Is This Answer Correct ? | 1 Yes | 0 No |
How many program bind in one module....
As400 Command to find the Name of the Program to which a Particular Module is Bound..? Ex: IC210AMR (*MODULE) is bound with Other Modules which Forms Program Object as IC210ABP(*PGM) . As400 Command to find the IC210ABP Using IC210AMR..? Thanks
How to index LF by relative record no (RRN)
How do you code file / field renames in ILE RPG?
I have a RPG program of 100 Lines and first line is to SETON indicator LR. Will the program execute rest of the 99 Lines?
i want to perform uniqness on db file bt my db file nt hving key by useing rpgle.
What is the purpose of Panel Groups?
i 'm new to as/400.in an interview i was asked this question.give a practical example for passing information or data through local data area. I know only that data area is an object used to store tiny bits of data or it can store one value at a time and it is used to store frequently changing values or datas.thats all i know about data area can any one tell me how local data area and user defined data area are used to pass data between jobs with a example or coding.thanks in advance.
1.find most occurrences of a character. for exm: input:aaabbbbdddddyyy output: d 5 times how can i get that?
difference between 1:%found and %equal built function in detail with example .
what is the difference between the cpyf command crtdupobj command?
1.Where we declare Variables in RPG/400,RPGIV,RPGILE.? 2.When do we use D-spec and I-spec in real time ?.what is difference between them?