View previous topic :: View next topic
|
Author |
Message |
ranga_subham
New User
Joined: 01 Jul 2005 Posts: 51
|
|
|
|
Hi,
I receive a X(12) field from a MAP and need to compare it with a 9(9)V99 field in a batch job.
I was able to compare when the decimal portion (v99) was not there. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
A little more clarity is needed.
MAP and batch, please explain?
Compare, how?
Comparing alphanumeric fields with numeric fields is always a gamble, what are you trying to accomplish? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Please post the CICS field definition that uses the field from the map.
Then, please post the field definition(s) and compare(s) from the batch job.
What does this
Quote: |
I was able to compare when the decimal portion (v99) was not there |
mean?
Do you get a syntax error, an unexpected answer, or an abend.
Whatever info you get, you need to post it so we can help. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi Ranga,
What is the range of accepable values that you can receive from the field, for example:
+234.56; $1234.56-; $1,234.56; $1234.56+; 123456-; 1234.56, etc.
You have to solve the edit problem before you can work on the conversion problem. |
|
Back to top |
|
|
ranga_subham
New User
Joined: 01 Jul 2005 Posts: 51
|
|
|
|
Hi,
Thanks for asking details.
I am receiving the x(12) fields from a CICS map (into VSAM file) and need to compare it with a 9(9)v99 filed in a QSAM file.
Thanks. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Yes, we understand the input is X(12), however to be much help, we need the answer to
Quote: |
What is the range of accepable values that you can receive from the field, for example:
+234.56; $1234.56-; $1,234.56; $1234.56+; 123456-; 1234.56, etc.
|
|
|
Back to top |
|
|
ranga_subham
New User
Joined: 01 Jul 2005 Posts: 51
|
|
|
|
I am getting it in the format "1234.56". |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
ranga_subham wrote: |
I am getting it in the format "1234.56". |
Finally...
You need to "de-edit" the field and get the decimal point out.
Enterprise COBOL has an intrinsic function NUMVAL that can do this easily. A little harder is to do it manually, but it can be done.
Will the NUMVAL work for you? |
|
Back to top |
|
|
cobolunni
Active User
Joined: 07 Aug 2006 Posts: 127 Location: kerala,india
|
|
|
|
renga are you getting only numeric value through x(12) |
|
Back to top |
|
|
|