RPG / free command to movel 6 digit field to 8 character field

65 pts.
Tags:
RPG
RPG field
I am using RPG /free -- I need to move a 6 digit numeric field to 8 character field and it needs to be left justified. How can I do this?

Answer Wiki

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

thanks for the info -  i need alittle more –

i do not want to insert any ‘/’ into the field – i want to move the 6 digit field to an 8 character field and I want to left justify the field leaving me 2 spaces at the end of the 8 character field.  how do i do that?

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
  • philpl1jb
    There are a number of options, here is one that is useful if the value is not signed and doesn't have a decimal part. My8Char = %EDITC( My6Dig : 'X');
    49,960 pointsBadges:
    report
  • TomLiotta
    The example doesn't involve slashes. Are you having a problem with Phil's example? It works just like the documentation says. -- Tom
    125,585 pointsBadges:
    report
  • philpl1jb
    My8Char = %EDITC( My6Dig : ‘X’);  500,001 will return '500001  ' My8Char = %EDITC( My6Dig : ‘Y’); would produce 50/00/01,Phil 
    49,960 pointsBadges:
    report
  • Manyquestions
    thanks for your help - as this worked!
    65 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