× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Here's an idea - just code the validation stuff on the iSeries in Java. All
you really need is the field (column) definitions for the file (table)
you're accessing. You can get those by doing this query:

Select COLTYPE, LABELTEXT
  From SYSCOLUMNS
  Where TBNAME = :TableName
  And
  TABLE_SCHEMA = :LibraryName
  Order by Ordinal_Position
For Read Only

This is embedded SQL in an RPG program, so it may look a little funky. Once
you have the iSeries table column definitions, you should be able to
validate the definitions between Excel and iSeries.

You could code this Java on the client or the iSeries.


On 4/26/06, Jake M <jakeroc@xxxxxxxxx> wrote:
>
> This approach sounds good but I am still learning RPG. I do not have any
> problem with coding in Java. So,  does it involve  very complex coding?
> Does
> anybody have a code snippet which involves checking of data types of
> columns
> in Excel against the DDS of the physical file to which the data is being
> uploaded to?
>
> Aaron:
> I have just now started looking into the datafile utility. That sounds
> nice
> too. I will keep you posted as to how that goes...:).
>
> I appreciate all the suggestions/input.
>
> cheers,
>
> Jake.
>
> On 4/25/06, Reid, Deon <DReid@xxxxxxxxxxxxxxxxxx> wrote:
> >
> > You could use JCIFS or Java FTP to pick up the .xls file from the
> > network share. Check the column type of the spreadsheet with the file
> > layout of the AS400 and if there is any problem with a match (the dds is
> > expecting a date field and the spreadsheet is character), then create an
> > exception report.
> > All this can be done with RPG mixing it with java.
> > We do the same thing, some of our EDI clients send us their file in XLS.
> >
> >
> >
> > -----Original Message-----
> > From: java400-l-bounces@xxxxxxxxxxxx
> > [mailto:java400-l-bounces@xxxxxxxxxxxx] On Behalf Of albartell
> > Sent: Tuesday, April 25, 2006 1:07 PM
> > To: 'Java Programming on and around the iSeries / AS400'
> > Subject: RE: MS Excel ====>> iSeries.
> >
> > >Would you please elaborate on this for me?
> > It was essentially giving them the ability to mass maintain a set of
> > document attributes (i.e. a document being a Word or Excel document) vs.
> > going through my web ui which requires much more clicks.
> >
> >
> >
> > Here's what I would do in your case.
> >
> > Write a Java web application (I use Tapestry) that resides on the
> > iSeries
> > (or another machine, it doesn't matter) that will allow the user to
> > upload a
> > csv file. Using http://datafile.sourceforge.net/ parse through each csv
> > record and validate each field. At that point you can determine if one
> > value
> > is incorrect it causes the entire upload to be rejected or not. Once all
> > of
> > the data is validated just do a JDBC SQL insert into the DB2 table of
> > choice
> > on your iSeries.
> >
> > Doing it this way ensures you have good data in your files AND it is a
> > familiar interfaces for the end user (Browser).
> >
> > HTH,
> > Aaron Bartell
> >
> > -----Original Message-----
> > From: java400-l-bounces@xxxxxxxxxxxx
> > [mailto:java400-l-bounces@xxxxxxxxxxxx]
> > On Behalf Of Jake M
> > Sent: Tuesday, April 25, 2006 11:55 AM
> > To: Java Programming on and around the iSeries / AS400
> > Subject: Re: MS Excel ====>> iSeries.
> >
> > Aaron,
> >
> > Would you please elaborate on this for me?
> > >I used it to allow "mass configuration" from an excel csv file to make
> > >it easier (more timely) for an admin to maintain the software I wrote.
> >
> >
> > I have the same approach in place and the user perhaps could upload the
> > file
> > directly to IFS instead of the NT box. So, if the user could upload a
> > correctly formatted spreadsheet to IFS through a web interface and then
> > issue a command on the iSeries...that would be great!! heck, I could
> > even
> > make a .jsp file which could trigger off the iSeries command by clicking
> > on
> > the link...So, the main thing here would be how would I ensure that the
> > user
> > is uploading the correctly formatted data in the spreadsheet. I could
> > make
> > the user issue a command from iSeries(command to run a java app) and it
> > will
> > comeback unsuccessful with a message in qshell mode and then the user
> > will
> > know that something is wrong. What do you think about that?
> >
> > I appreciate all your help,
> >
> > cheers,
> >
> > Jake.
> >
> >
> > >
> > >
> > > HTH,
> > > Aaron Bartell
> > >
> > >
> > --
> > This is the Java Programming on and around the iSeries / AS400
> > (JAVA400-L)
> > mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx To
> > subscribe,
> > unsubscribe, or change list options,
> > visit: http://lists.midrange.com/mailman/listinfo/java400-l
> > or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a
> > moment to review the archives at http://archive.midrange.com/java400-l.
> >
> > --
> > This is the Java Programming on and around the iSeries / AS400
> > (JAVA400-L) mailing list
> > To post a message email: JAVA400-L@xxxxxxxxxxxx
> > To subscribe, unsubscribe, or change list options,
> > visit: http://lists.midrange.com/mailman/listinfo/java400-l
> > or email: JAVA400-L-request@xxxxxxxxxxxx
> > Before posting, please take a moment to review the archives
> > at http://archive.midrange.com/java400-l.
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > The information transmitted by the following E-Mail is intended only for
> > the addressee and may contain confidential and/or privileged material.
> Any
> > interception, review, retransmission, dissemination, or other use, or
> taking
> > any action upon this information by persons or entities other than the
> > intended recipient is prohibited by law and may subject them to criminal
> or
> > civil liability. If you received this communication in error, please
> contact
> > us immediately at 954-660-7400 and delete the communication from any
> > computer or network system.
> >
> >
> ==============================================================================
> >
> >
> > --
> > This is the Java Programming on and around the iSeries / AS400
> (JAVA400-L)
> > mailing list
> > To post a message email: JAVA400-L@xxxxxxxxxxxx
> > To subscribe, unsubscribe, or change list options,
> > visit: http://lists.midrange.com/mailman/listinfo/java400-l
> > or email: JAVA400-L-request@xxxxxxxxxxxx
> > Before posting, please take a moment to review the archives
> > at http://archive.midrange.com/java400-l.
> >
> >
> --
> This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
> mailing list
> To post a message email: JAVA400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/java400-l
> or email: JAVA400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/java400-l.
>
>

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.