simple code

195 pts.
Tags:
iSeries development
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
ASKED: July 30, 2008  5:20 AM
UPDATED: May 10, 2010  2:00 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Certainly.

Because I can’t be assured that this Wiki editor will do what I want, I will make blanks appear as dots.

<pre>
1. Movel CHR1 CHR4

= ‘PEN……………….’

2. Move CHR2 CHR4

= ‘PEN………MYGET…..’

3. Eval CHR4 = CHR3

= ‘GOOD………………’

4. Move CHR1 CHR4

= ‘GOOD…………..PEN.’
</pre>

Note that you could have used the padding operation extender (P) to clear the receiving string before you moved data into it.

Regards,

Sloopy

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • BigKat
    :) Are you trying to get us to do your homework?
    7,585 pointsBadges:
    report
  • mcl
    You saying that they actually *teach* this stuff? Man...
    2,740 pointsBadges:
    report
  • TomLiotta
    You saying that they actually *teach* this stuff? You think you could debug a 5000 line program that was full of this stuff if it hadn't been taught to you? Man... Tom
    125,585 pointsBadges:
    report
  • YuVa47
    I do not understand the reason to comment or answer a question which was raised for 2 years ago. Is it any relevance today?
    1,285 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following