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
Answers were Sorted based on User's Feedback
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 ? | 13 Yes | 0 No |
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 |
How can i keyed a flat file in RPGLE
what is the rpg system?
How do you find out whether a record is present in the physical file without reading the file? for Example Employee No: 100 in an Employee master.How do we find out whther 100 is present in Employee master without reading the file?
11 Answers Bank Of America, CSC, IBM,
How I can reread the physical file in CL program once the end of file reached in same CL program.
How can read PF in reverse order (end to start) in CL pgm..
suppose i i am changing / updating record of subfile and i want to change the record in reverse order . means i want to change the bottom record first and so on through readc . how i do it please any one explain .
how can an indexed file be used as arrival sequence in RPG?
What is the difference between ITER and DO ? I know both are used to execute set of statements repeatedly, but what is the main difference?
What are the types of identifiers?
What would be the effect on the field where reverse image, underline and high intensity?
Hi, I am getting the error in RPG (All Record Formats for externally-described file ABCD ignored or dropped due to error; file ignored.) Please suggest any
1. What is bound-by-call and bound-by-reference? 2. Where and why is *Nomain used? 3. What are the difficulties faced by programmers when using service programs? 4. Explain the different ways of parsing and compiling XML in iSeries.