MOVEA Equivalent command in free format RPG

365 pts.
Tags:
Free Format RPG
MOVEA
RPG ILE
Hi, I have to move each character in a string to an array. In RPG, I can very well use the command MOVEA for this purpose but I don’t know exact command in free format RPG. Can anyone help me on this regards?

Answer Wiki

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

Hi,

You should be able to use %subarr.

Regards,

Martin Gilbert.
——————————————————

d chars ds
d char 1a dim(10)
d string s 10a inz('abcdefghij')
d out s 3a

c eval chars = string
* out = 'cab'
c eval out = char(3) + char(1) + char(2)

This will do it for you

Kevin C Ketzler -
aka BigKat

OR..
D ds
D Text 10
D Arr3 1 dim(10) overlay(text:1)

D Arr1 s 1 dim(10)
D Arr2 s 1 dim(10)
D Txt1 s 10

/free
// Move one array to another
Arr2 = Arr1; Arr2 will be the same as Arr1

// Move a single string to array elements
Text = Txt1; // Arr3 will contain the original chars

// Move an array to a single string
Txt1 = Text; Txt1 will contain all the elements of Arr3

Thanks
Cpatain Ron

Discuss This Question: 1  Reply

 
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
  • RonKoontz
    OR D ds D Text 10 D Arr3 1 dim(10) overlay(text:1) D Arr1 s 1 dim(10) D Arr2 s 1 dim(10) D Txt1 s 10 /free // Move one array to another Arr2 = Arr1; Arr2 will be the same as Arr1 // Move a single string to array elements Text = Txt1; // Arr3 will contain the original chars // Move an array to a single string Txt1 = Text; Txt1 will contain all the elements of Arr3
    1,780 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