Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to restrict entering Decimal values?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
seerajen
Currently Banned

New User


Joined: 05 Aug 2008
Posts: 10
Location: bangalore

PostPosted: Thu Jul 09, 2009 8:41 pm    Post subject: How to restrict entering Decimal values?
Reply with quote

Help me in this.... Am creating a Map field with attributes UNPRO & NUM, but my map field is taking dot(.) as a valid character. This makes the program giving unacceptable results when the users are accidentally enteing decimal values..

I want to restrict this dot(.) for this map field accepting pure Numeric filed 9(3). Its urgent.

Thanxxxx
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7932
Location: Bellevue, IA

PostPosted: Thu Jul 09, 2009 8:48 pm    Post subject:
Reply with quote

User training would be the preferred method.

Otherwise, you'll need to check each byte via reference modification (assuming you're using a COBOL program) to see if there's a period and if so set up the error message and resend the map (saving the valid fields as usual).
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Jul 09, 2009 9:29 pm    Post subject:
Reply with quote

You need to use both methods. The users that get trained will be the first to leave. The NUM attribute was never reliable on 3270 terminals it allowed the decimal character, and it could easily be over ridden and I think it required a extra cost feature that was not always installed. With terminal emulation you can never be sure.
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Fri Jul 10, 2009 2:56 am    Post subject:
Reply with quote

Just test the field for numeric before using in calculations,

pretty basic coding skills. Don't see why you need senior level
advice.
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Fri Jul 10, 2009 10:57 am    Post subject:
Reply with quote

Hi Seenu,

If what u want is to restrict the user from entering "." in such a way like the "." never appears on the screen ( like in our web pages )...... as per my knowledge it is not possible.

As others suggested, my suggestion also would be to have an error handling routine to check for anything other than numeric.
Back to top
View user's profile Send private message
seerajen
Currently Banned

New User


Joined: 05 Aug 2008
Posts: 10
Location: bangalore

PostPosted: Fri Jul 10, 2009 5:46 pm    Post subject: "error handling routine" & "Teach user&qu
Reply with quote

I thought this forum users are a good knowledge people but by seeing your silly answers i dont understand y this forum is been maintained. I dont think coding an error handling is the correct way.... Why dont we fix in the Map itself..... how we are restricting "Alphabets" like that y cant we restrict.............

Sorry if i hurt......
but think for a while....
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Jul 10, 2009 5:57 pm    Post subject: Re: "error handling routine" & "Teach use
Reply with quote

seerajen wrote:
I thought this forum users are a good knowledge people but by seeing your silly answers i dont understand y this forum is been maintained. I dont think coding an error handling is the correct way.... Why dont we fix in the Map itself..... how we are restricting "Alphabets" like that y cant we restrict.............

Sorry if i hurt......
but think for a while....


There is more knowledge expressed on this forum then you will ever have. If you are so d***mn good at it show us how you would do it. I have over 40 years programming experience and I would be happy to see you come up with a simple usable solution!
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jul 10, 2009 6:00 pm    Post subject: Re: "error handling routine" & "Teach use
Reply with quote

seerajen wrote:
I thought this forum users are a good knowledge people but by seeing your silly answers i dont understand y this forum is been maintained. I dont think coding an error handling is the correct way.... Why dont we fix in the Map itself..... how we are restricting "Alphabets" like that y cant we restrict.............
Sorry if i hurt......
but think for a while....

If you feel like that about the forum
There is no point in you being a member
YOU ARE BANNED
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Overlaying one set of charater values... Kevin Lindsley SYNCSORT 7 Sat Nov 05, 2016 3:21 am
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us