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 |
difference between 1:%found and %equal built function in detail with example .
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 does Implicit Open means with respect to a file ? What about the Explicit Open?..what are the major differences between these two?
How can i check the object existance in RPG program without using QCMDEXC command.
Suppose in CL we reach at end of file and again we have to reach from 1 record
what is the procedure and explain about real time scenario.
0 Answers Adhoc Technologies, Hanuman Automation, HSBC, IBM,
i have 6 char field in program, but this field is using in all files i want to chage field size as 10 char , how can i do this except using *like defn...?
How to update physical file in rpgle without using display file?
steps for debugging two rpg programs????
What are the values of NUM1 and NUM2 after executing the following code? CLONO1NO2NO3 Factorl÷÷+OpcdeFactor2+÷+ResultLenDHHiLoEq C MOVE *LOVAL NUM1 50 C MOVE *J-fIVAL NtJM2 52
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
How to read data from Nth member of a physical file containing some X number of members in it? "Provided member names are unknown"