HP3000-L Archives

August 2013, Week 1

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Tony Girgenti <[log in to unmask]>
Reply To:
Tony Girgenti <[log in to unmask]>
Date:
Sat, 3 Aug 2013 10:11:20 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (24 lines)
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 *

ATOM RSS1 RSS2