Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to check numeric value in a map field(Alphanumeric)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: How to check numeric value in a map field(Alphanumeric)
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

Senior Member


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

PostPosted: Thu Dec 02, 2010 4:39 pm    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Thu Dec 02, 2010 4:49 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Dec 02, 2010 4:53 pm    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Thu Dec 02, 2010 5:31 pm    Post subject:
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: 2504
Location: Atlanta, Georgia, USA

PostPosted: Thu Dec 02, 2010 5:43 pm    Post subject: Reply to: How to check numeric value in a map field(Alphanum
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    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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts JES2 job size field matching Windows ... SRICOBSAS All Other Mainframe Topics 4 Tue Sep 05, 2017 5:49 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us