Hi friends,
Can you give the solution for the below mention simple
code.and explain.what is output

D CHR1 S 4A INZ('PEN')
D CHR2 S 10A INZ('MYGET')
D CHR3 S 8A INZ('GOOD')
D CHR4 S 22A INZ
C MOVEL CHR1 CHR4
C MOVE CHR2 CHR4
C EVAL CHR4=CHR3
C MOVE CHR1 CHR4

Answer Posted / rashmi

C MOVEL CHR1 CHR4
=> CHR4 = 'PEN '
C MOVE CHR2 CHR4
=> CHR4 = 'PEN MYGET'
C EVAL CHR4=CHR3
=> CHR4 = 'GOOD '
C MOVE CHR1 CHR4
=> CHR4 = 'GOOD PEN'

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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?

511


what was the robotech rpg?

680


How many program bind in one module....

2115


How to write record if no field or the field are different in physical file in rpgle ?

483


Explain mdt?

661






What is file identifier where we can use?

639


what is the necessary keyword needed to scroll subfile records?

695


what is program status data structure?

1373


write an RPG program to calculate the marks of 5 students (A,B, C, D, E)in 3 different subjects (eng, math, sci) an display on the screen

824


explain sflclr, sflend, sfldlt, and sflcsrrrn?

882


Please tell me how to read the records from a file with load an array of size with error conditions(The logic answer for this question is ARR is array of 99 elements Z-ADD 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN99 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO).So,Please give me the complete of this code.

2045


How to handle duplicate error handling in RPG?

1672


is this a rpg channel?

669


What is the difference between copybooks and subprocedures in as400?

801


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

1076