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


Please Help Members By Posting Answers For Below Questions

how do I declare a minor?

716


what are the key words you must use when using a subfile?

692


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...

1311


what is the rpg system?

668


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.

2199






is this a rpg channel?

681


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

831


What is a record lock error?

1266


how do I preserve and clean the array?

675


How to select highest score of each subject or how to select highest income of every month?

1295


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.

755


what is kids-rpg?

667


explain sflclr, sflend, sfldlt, and sflcsrrrn?

889


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?

493


can I touch the array during treatments?

756