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

How to check numeric value in a map field(Alphanumeric)


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rashmirgowda

New User


Joined: 18 Jun 2008
Posts: 25
Location: india

PostPosted: Thu Dec 02, 2010 4:16 pm
Reply with quote

Hi,

Please let me know how to check the numeric value in alphanumeric field.

I am having the Alphanumeric field A X(10) in map. i want to check the value is numeric or not. The Field A is a table variable.

i have tried and entered the value as 100.
if A(ws-sub) is numeric
true
else
false
end-if.

But the value 100 is not going in to true condition. Please guide anyone to resolve this.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Dec 02, 2010 4:39 pm
Reply with quote

Look/search for NUMVAL (or NUMVAL-C) Cobol Function.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Dec 02, 2010 4:49 pm
Reply with quote

Quote:
But the value 100 is not going in to true condition. Please guide anyone to resolve this


though 100 maybe numeric,
if it is contained in a x(10) field, there are 7 spaces also included,
which are not numeric.

Although the NUMVAL suggestion is ok,
problem with NUMVAL is that it will cause an exception if there are unexceptable values in the field. - read the manual.

Suggest you look at BIFEDIT, in the CICS manuals.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Dec 02, 2010 4:53 pm
Reply with quote

I'm sorry, I did not realize that we were in CICS part of the Forum. CICS is not yet my cup-of-tea...icon_redface.gif.

Thanks Dick.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Dec 02, 2010 5:31 pm
Reply with quote

Quote:
CICS is not yet my cup-of-tea

nor mine, but I have read enough of Bill's posts to know about BIFEDIT,
and
I have encountered enough problems with NUMVAL - you need to pre-check the values.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Dec 02, 2010 5:43 pm
Reply with quote

Maybe a change is needed to the BMS "DFHMDF" macro associated with this map-field?

Review operand ATTRB=NUM, which can be used together with operand's PICIN and PICOUT. You may not need PICOUT, but that's up to you.

When PICIN and/or PICOUT are used together with NUM, the generated map-fields are PIC 9 as opposed to PIC X (without PICIN/PICOUT) and the map-data will be received as numeric, right-justified with high-order zeros.

In your case, when the user enters 100 in positions 1-3 of the map-field, it resolves as 0000000100 after the receive.

Google "DFHMDF" and you'll get many hits....

Bill
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 Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Join 2 files according to one key field. JCL & VSAM 3
Search our Forums:

Back to Top