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: 8120
Location: East Dubuque, Illinois, USA

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 BI,TO=ZD Changing Values Tyler Dunbar DFSORT/ICETOOL 4 Tue Jul 25, 2017 12:12 am
No new posts Sorting of hex values Saurabh_mi DFSORT/ICETOOL 11 Thu May 25, 2017 3:49 pm
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm
No new posts Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am


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