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
 
can we check for is numeric for alphanumeric field.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Abi

New User


Joined: 27 Jul 2005
Posts: 35
Location: Chennai

PostPosted: Thu Nov 23, 2006 10:42 am    Post subject: can we check for is numeric for alphanumeric field.
Reply with quote

I have a aplhanumeric field of length 20. Actaully it shld contain only numeric field...but in the database it has non numeric values...

So before processing i need to check for numeric values.If it contain any non-numeric values i need to replace it with numeric values.

WS_VARIABLE X(20)

Can i check for if ws-variable is numeric ?



2. Also in my previous topic i have asked how to convert non-numeric values to numeric and i got the answer of using UNSTRING

But if the filed has values like
222-222-222
22 2222-222

how can i use unstring ?
Back to top
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Thu Nov 23, 2006 11:00 am    Post subject:
Reply with quote

Hi ABi,

Quote:
So before processing i need to check for numeric values.If it contain any non-numeric values i need to replace it with numeric values.

WS_VARIABLE X(20)

Can i check for if ws-variable is numeric ?


Ya u can check

Code:
IF WS_VARIABLE IS NUMERIC
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2285
Location: @my desk

PostPosted: Thu Nov 23, 2006 2:55 pm    Post subject: Re: can we check for is numeric for alphanumeric field.
Reply with quote

Hi Abi

I think you shoud go character by character and check if it is numeric and move only the numeric digits to an output field. If there is any other possibility please let me know.

Thanks
Arun
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 -> COBOL Programming 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