Page 2 of 2

Re: Comparing Decimal Numbers

PostPosted: Mon Apr 07, 2008 9:47 pm
by Subha
Thanks for your suggestion.

Re: Comparing Decimal Numbers

PostPosted: Mon Apr 07, 2008 9:49 pm
by CICS Guy
Does this come close to what you are looking for?
N1 contains five records:
0000033.32
0000041.47
0000100.01
0000050.12
0000000.02
N2 contains five records:
000000044.470
000000109.230
000000300.000
000000020.010
000000050.990
I would like to know how to compare these two files on a one to one basis and write the record with the greater variable into an Output file through Cobol program.
My expeced output will look like this:
000000044.470
000000109.230
000000300.000
0000050.12
000000050.990

Re: Comparing Decimal Numbers

PostPosted: Tue Apr 08, 2008 8:49 pm
by Subha
No the data is not preceded by zero. It is as I have mentioned. In a file layout , the numeric portion of the number is preceded by spaces and not zeros.

Re: Comparing Decimal Numbers

PostPosted: Tue Apr 08, 2008 9:28 pm
by dick scherrer
Hello,

In a file layout , the numeric portion of the number is preceded by spaces and not zeros.
Is there some good reason that you continue to refuse to post the data "in a file layout"? Initially, it appeared as though you had a single file with multiple numbers in it. CG posted numbers in 2 files and you commented on the format of them, but not about having 2 files.

If your next reply does not show some data records "in a file layout" (quite similar to the sample i've already given), i'll either "lock" or delete this topic. People here are willing to help you, but you have to work with us. . . :cry:

Re: Comparing Decimal Numbers

PostPosted: Tue Apr 08, 2008 9:48 pm
by CICS Guy
OK, trying again....
Does this come close to what you are looking for?
N1 contains five records:
     33.32
     41.47
    100.01
     50.12
      0.02
N2 contains five records:
       44.470
      109.230
      300.000
       20.010
       50.990
I would like to know how to compare these two files on a one to one basis and write the record with the greater variable into an Output file through Cobol program.
My expeced output will look like this:
       44.470
      109.230
      300.000
     50.12
       50.990

Or this:
000000044.470
000000109.230
000000300.000
0000050.12
000000050.990