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 |
can anyone say,what is the use of operation extended H/N/P?
What is the Record Address file. How can we use it in RPG program?
How many program bind in one module....
1.How to read a subfile in out put mode? 2.what are the keywords used to share same file? 3.using composite key which rpg code used?
Let?s consider a variable X of length 20. Move value ?ABC? to it.How to determine how many characters does X have?
In how many ways a session/device error occurs,,, and what is the remedy for it?
How can we receive values from a called procedure in CL?
1.Load an runtime array of length 99 from the pf and you want to handle all the possible errors?
Can any one plz explain the concept of INFSR, *PSSR, INFDS AND PSDS, I' confusing about PSDS and *PSSR, Wat is the difference btw them, wat PSDS will do????
what are the key words you must use when using a subfile?
HI, 1: WHAT IS THE FUNCTION OF %KDS?WITH PROGRAMMING CODES EXAMPLE 2: WHAT IS THE FUNCTION OF Z-ADD AND Z-SUB ? WITH PROGRAMMING CODES EXAMPLE
i have a file with the values 10, 20, 30, 40, if am setll with the value 25 then readp, so what it will return?