Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CHANGING A NUMBERIC FIELD DECIMAL PLACES

Status
Not open for further replies.

rstitzel

MIS
Apr 24, 2002
286
US
I have a subfile that contains a numeric field that is 9 digits long. I want to be able to change the decimal positions "on the fly". If a user select type 1 I want the numeric field to be 9 with 4 decimal places. If it's a 2 I want it to be 3 with 2 decimal place. Is that possible? And if so, how is it done? Thank you.
 
Yes, it is possible -- I did this back at my last job as an experiment...

You need to define the field in the subfile as alpha, and handle the decimal validation, etc through the RPG program.
 
bwtc,

Thanks for the idea. I implemented your suggestion and it works great.

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top