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



Hello! Hope everyone is staying safe out there.



Here is my issue....

Incoming FTP files are being stored from our FTP server to our IBM i IFS.

The stream files on the IFS are then copied to a DB file with CPYFRMIMPF.

I've had rare instances where the CCSID was not converted
correctly....'Pérez' is stored in the DB as 'Pérez'.



DSPATR IFS stream file CCSID 1252

DSPFD DB CCSID 37



Please correct me if any of the following is incorrect....this is what I
think I think....

The CPYFRMIMPF FROMCCSID only applies when using FROMFILE. I'm using
FROMSTMF and FROMCCSID appears to be invalid when I try to use it.

Both the FROMCCSID and TOCCSID parms in the CPYFRMIMPF command are only
used if the CCSID of the FROMFILE or TOFILE is 65535. If the files are not
65535, the parms are ignored and the actual CCSID of the files are used,
correct?



So...after much googling someone mentioned in another thread that the stmf
may have the wrong CCSID assigned.....and....

Notepad++ FTP .txt File UTF-8



I changed the IFS stream file with CHGATR OBJ('/temp/Perez.txt')
ATR(*CCSID) VALUE(1208).

The CPYFRMIMPF now converts correctly.



Now the questions....

Is the FTP get of the files converting from UTF-8 to 1252 when putting the
files on the IFS? I think if the IFS stream files were created as 1208, all
would have been fine.

If I change the CCSID of all the FTP files after they are stored on the IFS
to 1208, could that be creating additional problems downstream?



CCSID still confuses me....



Thanks everyone....have a great weekend....

- Steve

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.