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
Answer Posted / 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 |
Post New Answer View All Answers
how do I declare a minor?
what are the key words you must use when using a subfile?
How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...
what is the rpg system?
if there is a module object , how to find the program object for this module object.Assume the module object name and program object name is not same.
is this a rpg channel?
write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen
What is a record lock error?
how do I preserve and clean the array?
How to select highest score of each subject or how to select highest income of every month?
during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.
what is kids-rpg?
explain sflclr, sflend, sfldlt, and sflcsrrrn?
1. If there are two programs using same file and 2 users are using the file at the same time and what can be done to allow them both to access? 2. How can remove lock from the file for accessing it by both users?
can I touch the array during treatments?