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 many program bind in one module....

0 Answers  


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

5 Answers   CTS,


How to index LF by relative record no (RRN)

1 Answers  


How do you code file / field renames in ILE RPG?

4 Answers   Accenture, IBM,


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?

6 Answers  






i want to perform uniqness on db file bt my db file nt hving key by useing rpgle.

3 Answers   HSBC,


What is the purpose of Panel Groups?

4 Answers  


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.

2 Answers   CTS,


1.find most occurrences of a character. for exm: input:aaabbbbdddddyyy output: d 5 times how can i get that?

13 Answers   HCL,


difference between 1:%found and %equal built function in detail with example .

6 Answers   Polaris,


what is the difference between the cpyf command crtdupobj command?

9 Answers   IBM,


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?

1 Answers   HP,


Categories