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
How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?
1. If there are two programs using same file and 2 users are using the file at the same time and what can be done to allow them both to access? 2. How can remove lock from the file for accessing it by both users?
How to handle duplicate error handling in RPG?
What is ment by record level identifier?
How to select highest score of each subject or how to select highest income of every month?
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?
How can we know running job is batch or interactive?
what is the use of sflnxtchg?
How Chain operation copies the record's data to the input buffer for the program?
Interviewer asked me write down DDS for load all subfile .can anybody write dds
Explain mdt?
what is kids-rpg?
What are the types of identifiers?
how do I declare a minor?
How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique