rpg/400

140 pts.
Tags:
RPG
RPG/400
please advice me how to convert numeric field to character field in rpgile.
ASKED: January 5, 2009  3:14 PM
UPDATED: January 7, 2009  4:30 PM

Answer Wiki

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

EVAL charFld = %EDITC(numFld : ‘X’);

Discuss This Question: 5  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
  • Askt1
    DINVAM 68 80 C EVAL INVAM = %EDITC(APCINA:'X') APCINA is numeric field. please check the above code. i need to get decimal positions to the resultatnt field INVAM but it given value without any decimal position.
    140 pointsBadges:
    report
  • philpl1jb
    Right 'X' is an RPG Edit Code - like you would would use on printer file or Display file so you could use '3' - no leading zeros no sign no comma's 'P' - no leading zeros left - sign no comma's Phil
    48,595 pointsBadges:
    report
  • Askt1
    i am writing INVAM to flat file. in flat file i am not getting any decimal positions...
    140 pointsBadges:
    report
  • philpl1jb
    DINVAM 68 80 C EVAL INVAM = %EDITC(APCINA:’3') INVAM is 13 long, our edit codes assume that APCINA is something like 12 2 if APCINA is wider it will push the decimal out of INVAM If APCINA has 0 decimals and is short enough you might use something like C EVAL INVAM = %trim(%EDITC(APCINA:’3')) +'.00' Phil
    48,595 pointsBadges:
    report
  • dwivediviv
    by using %CHAR building function

    70 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