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

wat is the difference between array and multiple occurence data structure?

4 Answers   Four soft,


can i use UPDDTA command in rpg program in which contains a file

1 Answers   TCS,


What is the name of default out queue when user logs inn to syatem with valid profile?

3 Answers   IBM,


can anybody explain significance of *loval setll with example code????

3 Answers   HSBC,


WHAT IS MEANT BY SIGNATURE VAILOTION ERROR

1 Answers   IBM,






program to find the number of objects used in a given program through a display.

2 Answers   IBM,


Difference between RESET and CLEAR

1 Answers   TCS,


suppose i i am changing / updating record of subfile and i want to change the record in reverse order . means i want to change the bottom record first and so on through readc . how i do it please any one explain .

4 Answers   CSC,


what is program status data structure?

1 Answers   IBM,


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.

0 Answers   IBM,


Im traying to get out put of this below mention simple logic code.But im geting out of different.(im trying with my laptop trhough my company server. DCL &FIELD1 *CHAR 10 VALUE('TCS AS/400') DCL &FIELD2 *CHAR 10 CHGVAR(%SST(&FIELD2 1 10))(%SST(&FIELD1 10 1) Can you tell me the value of field2 after excuted of CHGVAR command.

2 Answers  


How can we access Interactive job LDA in Batch Job?. and How we can access a file in interactive QTEMP lib in Batch job?.

4 Answers   IBM,


Categories