× 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.


  • Subject: Re: FTP
  • From: Jim Langston <jimlangston@xxxxxxxxxxxxxxxx>
  • Date: Thu, 12 Jul 2001 14:53:33 -0700
  • Organization: Pacer International

Well,

it depends on how you want it on the AS/400.  I've wanted different formats,
so saved the files different ways.

You probably want to save the excel file in excel as formatted text (space
delimited).  This creates a file on your PC as an ASCII text file with fixed
width between the start of each column.  FTP this to your AS/400 using ASCII
format, then you can directly copy this into a DB file: CPYF ... FMTOPT(*NOCHK)

When going from the AS/400 to Excel I create CSV (Comma Separated Variable) 
files
which are not that difficult to create in RPG.  I create a source file with a
record length long enough to hold my longest record, then I create a string
with the variables I am exporting adding double quotes to the beginning and
end of strings, and numbers as pure text numbers.  Then when I have this string
built I move it to the field for the source file and write the record, then
read my next source record.

This FTPs using ASCII and when you open it in excel (save it as extension .TXT
on the PC) it reads the data into the columns nicely (dates are always an issue
though, you have to make sure to format them in excel MM/DD/YY format).

There are also commercial products out there to transfer excel spreadsheets 
to/from
the AS/400 although I have never used one.

Any other information you need, you'll have to let me know just what it is you
are trying to do.

Regards,

Jim Langston

Me transmitte sursum, Caledoni!

Connie Amerine wrote:
> 
> Sending an Excel file to the 400 using BosaNova FTP Client, when it arrives
> it is not what I sent, I have tried ASCII and Binary, but neither work. Does
> anyone have any suggestions as to how I can get the Excel file over to the
> 400?
> Thanks in advance
> +---
> | This is the RPG/400 Mailing List!
> | To submit a new message, send your mail to RPG400-L@midrange.com.
> | To subscribe to this list send email to RPG400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: david@midrange.com
> +---

-- 


Regards,

Jim Langston
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.