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
Answer Posted / 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 |
Post New Answer View All Answers
When we have a file with Duplicate records and I want to read the unique record from the file. For example a file containing Emp Name as 'Ram' and there are 3 entries of it. So how to read a unique record from File?
what is the use of sflnxtchg?
what is the rpg system?
what is data area and how it is used in rpg program ?
what are the key words you must use when using a subfile?
what is the procedure and explain about real time scenario.
What is a record lock error?
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
What is difference between bind by copy and bind by reference?
give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........
how can I tell when to replace the array?
What is file identifier where we can use?
Assume 2 users are using the same file and first user updates some record in the file. Will the 2nd user will be able to see the updated record or not?
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
Interviewer asked me write down DDS for load all subfile .can anybody write dds