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:
Neil Armstrong <[log in to unmask]>
Reply To:
Neil Armstrong <[log in to unmask]>
Date:
Wed, 7 Aug 2013 20:40:17 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (131 lines)
<possible plug alert>

Interesting thread! One of the goals I had for Suprtool was what I called
"close the loop". What the goal of the project was to essentially provide
functions and other enhancements within Suprtool to aid in the import of
data into self-describing files, FROM the CSV type files that the Suprtool
suite of tools have been able to generate for years.

I added some new functionality such as $split, $number and $clean amongst
others to facilitate the importing of data from really any source.

I wrote an article about it some time ago which if interested you can
peruse here:

http://www.robelle.com/howdoi/welcome.html#import

It essentially shows some the steps in Suprtool that you can use to import
CSV data into a self-describing file, or really any data target.

<end possible plug alert>

Neil



On 13-08-07 6:51 PM, "Francois Desrochers"
<[log in to unmask]> wrote:

>In a previous life, I wrote a Qedit Use file which turned a csv file into
>a fixed-column format. I don't have it anymore. It may be on my former
>employer's system. This is moot if you don't have Qedit...
>
>Have you considered using Posix tools such as perl, awk, etc. You might
>even be able to use cut and other basic Unix commands.
>
>Just a thought.
>Thanks...Francois
>
>-----Message d'origine-----
>De : HP-3000 Systems Discussion [mailto:[log in to unmask]] De la
>part de Bahrs, Art
>Envoyé : Wednesday, August 07, 2013 4:57 PM
>À : [log in to unmask]
>Objet : Re: [HP3000-L] Cobol: Import CSV text file variable length
>numeric field
>
>Hi Tony :)
>   Sorry for a short answer... SuprTool is great for this!  And as long
>as the format stays the same for all records you can do all kinds of
>things.
>
>Art
>
>
>Art Bahrs, CISSP
>Security Engineer (Oregon Region)
>(971) 282-0927
>
>-----Original Message-----
>From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On
>Behalf Of Tony Girgenti
>Sent: Wednesday, August 07, 2013 1:31 PM
>To: [log in to unmask]
>Subject: Re: Cobol: Import CSV text file variable length numeric field
>
>Thanks to all for their replies.
>
>I did not explain this in my original post, but I have no control over
>the format of the input CSV file.  The file is coming from a bank and we
>have to use what they give us.
>
>I would like to use the UNSTRING command and redefine the two fields that
>I need which are check number(Reference Number) and check amount(Amount).
> Here is a sample of the first two records in the file:
>
>"Date","ABA Number","Currency","Account Number","Account
>Name","Description","BAI Code","Amount","Serial Number","Reference
>Number","Detail"
>"06/03/2013","999999999","USD","9999999999","XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
>X","Check Paid","999","-39,400.65","99999999","999999","CHECK
>                                                          <br>"
>
>Of course I replaced all of the numbers with nines and the Account Name
>with X's.
>
>I realize I need to read past the first record which is a header.
>
>In using the UNSTRING command, I can use ","  OR "<br>" as the DELIMITERS
>and it should work.
>
>The Amount has a dash in front of it, so I can INSPECT it REPLACING all
>SPACES and "-" WITH ZERO.
>
>The only problem I have now, is that one of the records looks like this:
>"06/03/2013","999999999","USD","9999999999","XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
>X","Check Paid","999","-39,400.65","99999999",,"CHECK
>                                                  <br>"
>
>As you can see, the Reference Number is empty with no quotes around it.
>I don't know if this is a common occurrence with this file.  I have not
>contacted the bank yet about that.
>
>I'm not sure of how to handle that field with the UNSTRING command, or if
>there is some other method I should use.
>
>Thanks,
>Tony
>
>* To join/leave the list, search archives, change list settings, *
>* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
>
>________________________________
>
>This message is intended for the sole use of the addressee, and may
>contain information that is privileged, confidential and exempt from
>disclosure under applicable law. If you are not the addressee you are
>hereby notified that you may not use, copy, disclose, or distribute to
>anyone the message or any information contained in the message. If you
>have received this message in error, please immediately advise the sender
>by reply email and delete this message.
>
>* To join/leave the list, search archives, change list settings, *
>* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
>* To join/leave the list, search archives, change list settings, *
>* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2