×
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.
Rob,
The "FTP must be binary" is your own fault :) Or perhaps, is a
byproduct of the fact that you started this in QShell and later switched
to PASE.
Qshell understands CCSIDs and character translation, as it is native
IBM i stuff and therefore understands IBM i CCSID support. When you
output from QShell, the file will be created as CCSID 37 (EBCDIC). It's
a native IBM i language, so EBCDIC is it's default. If you had
pre-created the file in ASCII (which you didn't... but hypothetically..)
QShell would understand that, and would automatically translate to
ASCII (or whatever the file is)
PASE is not like that. PASE (QP2TERM/QP2SHELL) is not native IBM i
stuff, it's Unix (AIX) stuff. It doesn't understand CCSIDs on files, it
only understands ASCII, that's it. So when you run your code in PASE,
it outputs ASCII. Period. Your file already existed (from the earlier
QShell examples) and was marked as EBCDIC -- but PASE didn't care, it
put ASCII in it anyway, because that's all PASE understands.
Thus the problem. You now have a file that's announcing itself as
EBCDIC ("Hi, I'm an EBCDIC file") but it contains ASCII data. When you
FTP that in ASCII mode, it'll attempt to translate it from EBCDIC to
ASCII (and since it's not actually EBCDIC, you'll have a mess)
Solution is simple. Delete the file, then do it purely from PASE. The
file will be marked with CCSID 819, and therefore translation will work
correctly.
Or, use QShell instead of PASE. if adding the "M" for megabytes is the
only reason you're using PASE, then I'd say the suffix isn't THAT
important. Think about it. How hard is it actually to take 20,000,000
and divide it by 512?
rob@xxxxxxxxx wrote:
Well I pretty much got this to work now
find . -type f -size +20M -exec ls -l {} \; | awk '{ print $9 "," $5 ","
$6"/"$7"/"$8 }' > /rob/bigfiles2.csv
Had to use binary to ftp that down. Ascii looked like gibberish
(CCSID=37).
As an Amazon Associate we earn from qualifying purchases.