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



2. Which of the following statement(s) explains the difference(s) between the /INCLUDE and ICOPY d..

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

2. Which of the following statement(s) explains the difference(s) between the /INCLUDE and ICOPY d..

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

Post New Answer

More RPG400 Interview Questions

How to find d key field of a pf that doesn’t have source physical file?

2 Answers  


why we do STRSRVJOB in batch debugging in as400

1 Answers  


can anybody help me that what is the procedure of debugging the service program?

3 Answers   CSC,


What is Multi Occurrence Data Structure(MODS)?

1 Answers   CTS,


What you have to do in the display file when you are using message subfile?

1 Answers  






WHAT IS MONMSG IDENTIFIER FOR STRTCPFTP command IN cl (as/400)?

3 Answers  


what is importance of 'MAPFLD' IN OPNQRYF FILE ?

2 Answers  


wat is curser?? and its types???

4 Answers   HSBC,


parameters cannot be passed in which one??

2 Answers   CTS,


I know chain keyword retreive records randomly but how chain keyword exactly works internally????

4 Answers  


How can we receive values from a called procedure in CL?

1 Answers   IBM, NTT Data,


how do you use commitment control in rpg?

0 Answers   IBM,


Categories