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

How to restrict entering Decimal values?


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jul 09, 2009 8:48 pm
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
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
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
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
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
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: 8797
Location: Welsh Wales

PostPosted: Fri Jul 10, 2009 6:00 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Need Help with Packed Decimal Signs DFSORT/ICETOOL 4
Search our Forums:

Back to Top