Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


1.Are there any errors in the following statement?If so
then list them.DTAARA is a data area having a field EMP #
and EMPNO is a
field in the file EMPPF.Which has one record.
READ EMPPF
IF %FOUND(EMPPF)
IN DTAARA
EVAL EMP#=EMPNO
OUT DTAARA
ENDIF

Answers were Sorted based on User's Feedback



1.Are there any errors in the following statement?If so then list them.DTAARA is a data area havin..

Answer / amitava

First of all, %found() function is not set after the READ
operation. If not %eof() can be used instead.

Is This Answer Correct ?    8 Yes 3 No

1.Are there any errors in the following statement?If so then list them.DTAARA is a data area havin..

Answer / abhishek

I think before updating data area it should be Locked too
to make sure no other program is trying to update same data
area.

READ EMPPF
IF %FOUND(EMPPF)
*LOCK IN DTAARA
EVAL EMP#=EMPNO
OUT DTAARA
ENDIF

Is This Answer Correct ?    3 Yes 0 No

1.Are there any errors in the following statement?If so then list them.DTAARA is a data area havin..

Answer / gagandeep kaur

%found is always used with Chain opcode

Is This Answer Correct ?    3 Yes 1 No

1.Are there any errors in the following statement?If so then list them.DTAARA is a data area havin..

Answer / syam

IN *DTAARA

OUT *DTAARA

Is This Answer Correct ?    1 Yes 0 No

1.Are there any errors in the following statement?If so then list them.DTAARA is a data area havin..

Answer / abhishek

Sorry forgot to put * before data area.

READ EMPPF
IF %FOUND(EMPPF)
*LOCK IN *DTAARA
EVAL EMP#=EMPNO
OUT *DTAARA
ENDIF

Is This Answer Correct ?    0 Yes 2 No

Post New Answer



More RPG400 Interview Questions

I want my simple Green screen should refersh every 1 min ,How can I do it..? Please share the logic

2 Answers  


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  


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,


1.Load an runtime array of length 99 from the pf and you want to handle all the possible errors?

0 Answers   HCL,


What is the syntax of passing parameters to a procedure by value?

1 Answers  






are there any useful c runtime apis that I can call from rpg iv?

0 Answers   IBM,


1.CA(command Atention key)& CF(command Function key) difference with example?Please can any body tell me in real time exp? 2.Can any body tell me some mandatery function keys using while creating any screen with use of SDA-FUNCTION kEYS?

5 Answers   HCL,


I have one cl program which calls two rpg programs named a & b. I am loading a run time array in Pgm A and the control comes back to cl pgm. i call pgmb and I want to read the runtime array in pgmb which was loaded in pgma. How it can be acheived. I should not use any intermediate file or dataarea to store the loaded values.

2 Answers  


How can a screen field that has changed since the last output operation be detected?

4 Answers   IBM,


Write a program to display prime numbers between 1 to 100 using RPGLE.

1 Answers  


How can i keyed a flat file in RPGLE

5 Answers   IBM, Wipro,


how do I play {insert rpg system here}?

0 Answers   IBM,






Categories