Subject: | |
From: | |
Reply To: | |
Date: | Sat, 3 Aug 2013 21:08:31 +0100 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Apart from the obvious of generating the csv file with leading zeros.
Move the CSV value to a full size X field, then strip trailing spaces,
and then move the result to an X redefines of your numeric. NB as your
numeric is V99 you might also want to strip all "." and "," before the
compare.
In message <[log in to unmask]>, Tony
Girgenti <[log in to unmask]> writes
>Hello,
>
>I'm importing a CSV text file into a HP3000 COBOL II program.
>
>I want to compare a number field from the text file to a number in my
>COBOL program defined as S9(8)V99.
>
>The CSV text file numeric field looks like this including the quotes:
>"-312.97".
>
>The text file numeric field can vary in length as "-1,234.99" or "-123,456.99".
>
>If the CSV text file field is always the same length, I know I can move
>the text field to a COBOL numeric field that is redefined as
>AlphaNumeric.
>
>The problem is that the input text field can be different for each record.
>
>Does anybody know how to code this in COBOL to accommodate the
>different number sizes in the text file?
>
>Any help would be gratefully appreciated.
>
>Thanks,
>Tony
>
>* To join/leave the list, search archives, change list settings, *
>* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
>
--
Alan Yeo
[log in to unmask] Just because you're paranoid
Phone +44 1684 291710 it doesn't mean someone isn't!.
Fax +44 1684 291712
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|
|
|