View previous topic :: View next topic
|
Author |
Message |
mailbalaji
New User
Joined: 13 Mar 2006 Posts: 7 Location: Chennai
|
|
|
|
Hi,
I have a query in TELON.
I have defined a field AMT as NUMERIC and it is a OUTIN field.
I need to populate values to this field from DB2 as well as get input from User.
The AMT can have -ve value as well. Ex -5.00
This AMT field from the program is a COMP-3 field.
What do I need to do to show the -5.00 in the screen.
Currently it displays only as 5.00
Also, when i tried to enter -5.00 as input for the same field, it gives an error [since we defined the field as Numeric]
Can someone help me?
Thanks,
Balaji |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
I haven't worked with Telon, but could you define the screen field as alpha and then handle the value in the code?
Input could be validated for valid numeric and the output coud be edited to show the minus.
Possibly there is something i am missing. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
For output processing, you can use the Telon PIC keyword to assign a picture clause to the field.
It's been several years since I used Telon, but I think what you are looking for is something like:
Code: |
FIELD fldname,TYPE=NUMERIC,PIC='-----9V99' |
The above specification probably won't work for input processing.
Another option that might work:
Code: |
FIELD fldname,TYPE=(NUMERIC,DOLLAR),PIC='----9V99' |
The default field edits supplied by Telon are frequently modified by the installation, and many installations create their own. You can find out what's available by searching the Telon MACLIB. |
|
Back to top |
|
|
mailbalaji
New User
Joined: 13 Mar 2006 Posts: 7 Location: Chennai
|
|
|
|
Thanks for your suggestion guys.
I have defined the field as string and have handled it in the Custom Codes.
Now the code if working. I will get back to guys in case of further queries.
Thanks a lot |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Good to hear it is working - thank you for letting us know
d |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
Look at FIELD TYPE=FLOAT and an Input edit routine called IFLOAT and an Output edit routine called OFLOAT.
These are the built in routines that handle leading signs. As Don stated, they can be modified on site to behave differently from the manuals. |
|
Back to top |
|
|
|