IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Negative value in Screen - TELON


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mailbalaji

New User


Joined: 13 Mar 2006
Posts: 7
Location: Chennai

PostPosted: Thu Jun 14, 2012 10:41 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Jun 14, 2012 6:48 pm
Reply with quote

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
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 765
Location: Whitby, ON, Canada

PostPosted: Thu Jun 14, 2012 7:50 pm
Reply with quote

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
View user's profile Send private message
mailbalaji

New User


Joined: 13 Mar 2006
Posts: 7
Location: Chennai

PostPosted: Fri Jun 15, 2012 6:01 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Jun 15, 2012 8:10 pm
Reply with quote

Good to hear it is working - thank you for letting us know icon_smile.gif

d
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Fri Jun 15, 2012 8:23 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Negative dependency between jobs in m... COBOL Programming 12
No new posts Data for newly added fields not displ... IMS DB/DC 6
No new posts DATA SET LIST UTILITY screen TSO/ISPF 6
No new posts Negative value - packed field - Natur... Java & MQSeries 0
This topic is locked: you cannot edit posts or make replies. Missing Negative sign in COBOL COBOL Programming 6
Search our Forums:

Back to Top