Well, in reality this has a dual goal.

1. Get me using more Java in my CF.

And

2. Use the type 4 JDBC drivers to the DB2 mainframe to see how they perform
and are accessed and so forth.

This is one little piece of a huge application, and I'm using it to get my
feet wet :)

> -----Original Message-----
> From: Jerry Johnson [mailto:[EMAIL PROTECTED]
> Sent: Monday, August 14, 2006 4:56 PM
> To: CF-Talk
> Subject: Re: Java/CF Question
> 
> 2200 lines? are they REALLY long? Or do you mean 22 million lines?
> 
> If they are 2200 reasonably short lines (thousand chars per line), CF
> shouldn't even blip.
> 
> (If you want to try this as a nice exercise, then never mind.)
> 
> Of course, I typically do this work now in a DTS package in sql
> server, so what is my advice worth?
> 
> I wouldn't pass the file itself, just the file spec (let java open the
> file stream itself), and I would probably pass back a cold fusion
> query or struct ready-made.
> 
> 
> On 8/14/06, loathe <[EMAIL PROTECTED]> wrote:
> > I have a need to parse in a data file weekly.
> >
> > The file is about 2200 lines long and is in a fixed width format.
> >
> > It will be written to a DB2 database on a mainframe.
> >
> > I'm thinking that I should create a java object that will do the heavy
> > lifting, only using CF as needed for the interface side of things, and
> to
> > return some bad data information (there is some validation against
> existing
> > data that needs to occur as the file is parsed into memory.
> >
> > 1.  Ok, I know about createObject(), and how it works, is there anything
> I
> > need in a class file in order for it to talk properly to CF?  Anything I
> > would want to have?  I know I'm using the FileInputStream class, and
> > getRow() and blah blah, is this the correct way of doing this?
> >
> > 2.  How do I pass a file from CF to Java?  I was thinking the easiest
> way
> > would be just have CF upload it, pass the path and file info to the
> object
> > and then have the class parse it, write it to the db, and return an
> array of
> > the bad rows.
> >
> > 3.  What are the best practices for an object like this?  Should I
> create
> > one method that reads in the file, one to get the row, a method to get
> and
> > set each member of the row?  Or should I just do it top to bottom
> procedural
> > style, read in the file, loop through the rows, stick each "column" in
> an
> > array, then grab them as needed, and so forth?
> >
> > Any pointers from people that have done this before, or to some online
> info
> > about a similar practice would be much appreciated.
> > --
> > Thanks,
> >
> >
> >
> >
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:249763
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to