View previous topic :: View next topic
|
Author |
Message |
mihir.kumar
New User
Joined: 26 Jun 2008 Posts: 4 Location: Bangalore
|
|
|
|
Hi,
I have a variable ITEM-SIZE with picture clause X(7). It contains different type of data.
Eg:
20CT
200 OZ
20 CT
20 CT
I have to extract numeric part of it.
There are only one option that coming to my mind is to do numeric check bit by bit and to store the first position & length for numeric data. Then I will use reference modification to extract the numeric data.
Is there any other option?
Thanks in advance,
Mihir |
|
Back to top |
|
|
ajeshrn
New User
Joined: 25 Mar 2009 Posts: 78 Location: India
|
|
|
|
Hi mihir.kumar,
In that X(07), are do we have any assumption that the first 2 or 3 charecters will be Integers or Will these integers be followed by a single space? |
|
Back to top |
|
|
mihir.kumar
New User
Joined: 26 Jun 2008 Posts: 4 Location: Bangalore
|
|
|
|
Hi Ajesh,
File is updated from CICS screen and user can enter in any order. The data I have seen is of different type. Some have one space in between, some have two space in between, some is not having any space in between.
Thanks,
Mihir |
|
Back to top |
|
|
Steve Davies
New User
Joined: 15 Oct 2009 Posts: 32 Location: UK
|
|
|
|
if the input looks like this, '20CT559', I assume the output should look like '20559', and is the output field to be a numeric field or still a PIC X(7)? |
|
Back to top |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
Mihir,
Quote: |
user can enter in any order |
If there is no specific data pattern, its better to check each byte. |
|
Back to top |
|
|
|