|
I just tried normal, no sweat FTP, from my PC to a system in a land far, far away. ftp system userid password ascii put unixfile.txt lib/file (or put unixfile.txt /qsys.lib/lib.lib/file.file) quit It worked for a file in unix format (LF only) and one in DOS (CRLF). It did NOT work for MAC format (CR only). The file was created on the 400, didn't have to precreate the physical file. But if you already have a physical file, it's like a CPYF *NOCHK. Just don't have packed fields in the file. So easy, really. Dan Bale wrote: > > Don't hit me, but is this doable on v3r2? (the Unix open/read/close api's) > > I agree. This is going to be a recurring thing that needs to run > automatically. Can't be doing search & replace every time I receive a new > file. > > Is CPYFRMSTMF an option? > > - Dan Bale > > -----Original Message----- > From: midrange-l-admin@midrange.com > [mailto:midrange-l-admin@midrange.com]On Behalf Of jpcarr@tredegar.com > Sent: Thursday, February 14, 2002 2:39 PM > To: midrange-l@midrange.com > Subject: RE: Unix file to PC, weird LF-CR > > Skip all that stuff, FTP it to the IFS, then read it byte by byte with > an RPGIV program and interigate it yourself, throw away what you don't > want, write the fields/records when you want to. > > RPGIV with the Unix Open/Read/Close API's are alot easier than looking at > it with some tool like word pad and wondering what you are seeing. Plus, > the Bytes you see in the RPG program is what it is in EBCIDIC the way you > are going to store them anyway. > > just $.02 > John Carr > --------------------------------- > > If you need to replace the lf character with a cr/lf before moving the file > to the 400, open the file in an editor like Text Pad that supports hex and > do a global search and replace. > > This is a one shot solution that assumes the file is small enough to open > in > a reasonably capable editor. > > _______________________________________________ > This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list > To post a message email: MIDRANGE-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l > or email: MIDRANGE-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/midrange-l. -- Vern Hamberg Would you like to see a challenging little arithmetic puzzle that might get you or your kids or grandkids more interested in math? Go to <http://cgi.wff-n-proof.com/MSQ-Ind/I-1E.htm> Sillygism-- Something is better than nothing. Nothing is better than a ham sandwich. Ergo Something is better than a ham sandwich.
As an Amazon Associate we earn from qualifying purchases.
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.