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 / gatla
PGM: *************** Beginning of data ***********************
DCHR1 S 4A INZ('PEN')
DCHR2 S 10A INZ('MYGET')
DCHR3 S 8A INZ('GOOD')
DCHR4 S 22A
C MOVEL CHR1 CHR4
C MOVEL CHR2 CHR4
C EVAL CHR4=CHR3
C MOVE CHR1 CHR4
C CHR1 DSPLY
C CHR2 DSPLY
C CHR3 DSPLY
C CHR4 DSPLY
C SETON
****************** End of data **************************
O/P:
DSPLY PEN
DSPLY MYGET
DSPLY GOOD
DSPLY GOOD PEN
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is a record lock error?
How can we know running job is batch or interactive?
When it is desirable to describe files Internally?
what happens when sflsiz = sflpag? What are the advantages and disadvantages?
what is the procedure and explain about real time scenario.
what is the difference between do while and do until?
explain sflclr, sflend, sfldlt, and sflcsrrrn?
How would display prime numbers using CL program?
are there any useful c runtime apis that I can call from rpg iv?
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?
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.
How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?
What is the diff bw PF/LF Name and their Record format name? what is restriction in record format then file name?
How to write record if no field or the field are different in physical file in rpgle ?
How to declare the pull button in AS/400..