SIGN on Left Side on Display File

225 pts.
Tags:
AS/400 development
AS/400 Display File
Hi All, I have defined a numeric field on my Screen as 11,02 which is Both (I & O). I want SIGN (-) to be displayed on left side. I use edit code 'N' and numeric shift attribute 'Y'. But when I enter value as -123.45 on my screen, it goes into program as 123.45. SIGN is not coming into program. If I didplay -ve value, It displays with sign. But I have a problem in inputting. Requirement is to have SIGN on left onyl. Pls reply with solution. Thanks Reddy

Answer Wiki

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

Hi,

I’ve never tried using sign on the left, but I suspect that it’s not allowed to be entered in this way. I think you either have to enter the sign on the right or press the field- key to enter your value as a negative. The definition of your field with a minus sign on the left is for field <b>editing</b> (display purposes) only, not for field entry.

Again, I’m not entirely sure that this is the case, maybe someone else here can clarify.

Regards,

Martin Gilbert.

Hi,

As Martin wrote, you can not use LEFT sign in an input field, but field- to enter it into the database file.

Regards,
YuVa47

//////////////////////////////////
Only – ugly solution – use a character field and edit it in the program – then you could find the – at either end of the string, check for properly formed digit value and convert to numeric.
Phil
///////////////////////////////////

Discuss This Question:  

 
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

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