Page 1 of 2

allowing only numeric data

PostPosted: Fri Jul 06, 2012 1:53 pm
by kandrepavan
Hi All,

In cics map design in a particular field i want to allow only numeric data to be entered.

I tried with attrb=(num,.. ) in map design , but unable to get it.



thanx and regards.
k pavan

Re: allowing only numeric data

PostPosted: Fri Jul 06, 2012 1:58 pm
by chandurokzz
Hi,

please post the code.. so that we can help u

Re: allowing only numeric data

PostPosted: Fri Jul 06, 2012 2:38 pm
by Robert Sample
What does "unable to get it" mean? Did your numeric field not compile? Did it compile but allow letters when you tested it? Did it compile but allow special characters when you tested it (and if so, which special characters -- details are very important)? Do something else entirely that you haven't explained?

The quality of responses you receive on this forum are DIRECTLY related to the quality of the questions you pose. And this post was an extremely poorly worded and poorly thought out post.

Re: allowing only numeric data

PostPosted: Fri Jul 06, 2012 3:35 pm
by kandrepavan
Hi all,

unable to get it means .... it is allowing to enter other characters


thanx and regards.

Re: allowing only numeric data

PostPosted: Fri Jul 06, 2012 4:59 pm
by Robert Sample
You'll need to post the map definition for that field (at a minimum) for us to be able to see what's going on.

And when you say "other characters" -- TRY TO BE SPEICFIC NEXT TIME! Is the field allowing alphabetic characters? Is the field allowing numeric characters? Is the field allowing special characters? Which special characters are being allowed -- just period or any special character or .... ?

Re: allowing only numeric data

PostPosted: Fri Jul 06, 2012 7:14 pm
by dick scherrer
Hello,

Suggest you consider performing ALL of the edits within the program (not the map definition).

All of my clients have gone to this method so that all errors presented to the user have the same "touch and feel". A proper message rather than some "hardware" behavior and placing the cursor on the problem field for re-entry.

Re: allowing only numeric data

PostPosted: Fri Jul 06, 2012 8:36 pm
by Monitor
Specifying a field as numeric, sets the numeric bit in the attribute byte, BUT - the 3270 emulator might not be configured to support numeric lock. Also, as mentioned, you should always do a numeric test on the data received in the I-variable. A couple of characters are still classified by the terminal as numeric, regardless of the specification.

Re: allowing only numeric data

PostPosted: Tue Jul 10, 2012 3:04 pm
by kandrepavan
Hi all,

Thank u for answering .
Actually i was using a ibm pcom emulator. At last i got it. These are the steps u need to follow if u are using IBM PCOM.

Resolving the problem:
Follow these steps to find the 3270 numeric lock feature in Personal Communications and set it to Yes to allow only numeric data to be entered into the field:

1.Click Edit


2.Choose Preferences > Appearance > Display Setup


3.From the Display Setup panel, scroll down in the Category section and click Viewing


4.Under Settings, you will see 3270 Numeric Lock with radio buttons for Yes and No. Select Yes if you want 3270 numeric lock


5.Click OK

Re: allowing only numeric data

PostPosted: Tue Jul 10, 2012 3:18 pm
by BillyBoyo
Thanks for letting us know the resolution, as it can help someone with a similar problem.

Re: allowing only numeric data

PostPosted: Tue Jul 10, 2012 10:33 pm
by dick scherrer
Hello,

Yes, thank you for the update :)

However, even though you found a way, i'd still suggest doing an experiment with the "edit" in the code rather than in the terminal definition - just so the users can see both methods.

Also, if the solution requires manual editing on every pc it may be unmanagable (more so if they are not all in the same building). There may be an issue that some need it the way it is and some may require your "mod" to the setup for this app to work . . .