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
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 |
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 |
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 |
When PGMA calls PGMB for the first time PGMB executes the *INZSR. PGMB uses the RETRN operation to return to PGMA. When PGMA call PGMB the second time is the *INZSR executed?
Suppose in CL we reach at end of file and again we have to reach from 1 record
Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?
what is mean by *MAP and *DROP?what commands use these two keywords?why are they used?
Why we cannot call a service program? If I add a PEP can i call the service program?
How to add 2 new fields in a file? How many ways are there in as400?
How to declare the dynamic(run time) array in rpgle? can you please give example
What are the necessary keywords required to code a message subfile?
two types of read performed in dataqueue?????
How do you find whether a record is locked or not?
what is data area and how it is used in rpg program ?
We have job which is running as batch. It takes atleast 06 hours to complete tht job. But I wanna do tht job with in 3 hours?