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 |
i'm working on progA , in that program i want to see the userids of the users who work on this program?
Can more than one subfile record be displayed on one line?
I know chain keyword retreive records randomly but how chain keyword exactly works internally????
Have a join logical file with more than one members with different record formats. So how can we read the different members from this file and also how we can read the different record format from the join logical?
How Commitment and Roll back control is used in as400, explain with real time senario ???
HOW TO DEBUG A BATCH JOB WHEN IT IS IN MESSAGEWAIT(MSWG) STATUS.I KNOW THE STEPS FOR BATCH DEBUGGING,BUT IM CONFUSING WITH WHEN WE SUBMIT ANY JOB FOR BATCH DEBUG WE PUT IN HELD STATE.SO HERE ALSO DO SAME THING OR ANY OTHER WAY,PLEASE HELP ME....
what is ment by "MDT"
How do I read records from Subfile? what is the purpose of READC explain with example?
difference between CHAIN and READE?
how do u track msg in cl pgm???
can anybody help me that what is the procedure of debugging the service program?
how we retrieve records without using key field (ex:name) from Physical File through RPG in as/400?