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


Please Help Members By Posting Answers For Below Questions

How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?

1550


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?

472


How to handle duplicate error handling in RPG?

1660


What is ment by record level identifier?

640


How to select highest score of each subject or how to select highest income of every month?

1277






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?

497


How can we know running job is batch or interactive?

635


what is the use of sflnxtchg?

791


How Chain operation copies the record's data to the input buffer for the program?

1063


Interviewer asked me write down DDS for load all subfile .can anybody write dds

1003


Explain mdt?

651


what is kids-rpg?

655


What are the types of identifiers?

554


how do I declare a minor?

701


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

539