Hello all!
trying to fix the problem but it seems that I am missing or messing something ...
let say I want to send test1.csv file with special characters to machine (for a test: pub400.com) - CSV file encoding utf-8.
>>test1.csv content:
wartość1
wartość2
wartość3
>> transfer file to iseries
C:\Users\Admin>ftp pub400.com
Connected to pub400.com.
220-QTCP at PUB400.COM.
220 Connection will close if idle more than 16 minutes.
501 OPTS unsuccessful; specified subcommand not recognized.
User (pub400.comnone)):
331 Enter password.
Password:
230 logged on.
ftp> lcd >> path to file on pc <<
Local directory now >> path to file on pc <<
ftp> quote type c 1153
200 Representation type is CCSID 1153.
ftp> put file1.csv
200 PORT subcommand request successful.
150 Sending file to /home/myid/file1.csv
226 File transfer completed successfully.
ftp: 25 bytes sent in 0.23Seconds 0.11Kbytes/sec.
>>on machine's side
CHGJOB LANGID(PLK) CNTRYID(PL) CCSID(1153)
>>and checking file on ifs side
ls -laS
total: 5.552 megabytes
273 drwx--s--- 2 usr 0 8192 Nov 14 11:00 .
37 drwx--sr-x 15423 QSYS 0 5652480 Nov 14 09:58 ..
1153 -rwx--x--- 1 usr 0 28 Nov 14 11:00 test1.csv
$
>> creating pf and compile
*************** Beginning of data *************************************
R FILE1
VALUES 30A CCSID(1153)
****************** End of data ****************************************
>> column check: dspffd usrLib/file1
Record length . . . . . . . . . . . . . . . : 30
Field Level Information
Data Field Buffer Buffer Field Column
Field Type Length Length Position Usage Heading
VALUES CHAR 30 30 1 Both VALUES
Coded Character Set Identifier . . . . . : 1153
>> copy stream data to pf
CPYFRMIMPF FROMSTMF('/home/user/test1.csv') TOFILE(userLib/FILE1) RCDDLM(*CRLF) RPLNULLVAL(*FLDDFT)
>> check file: runqry *n usrLib/file1
Position to line . . . . .
Line ....+....1....+....2....+....3
VALUES
000001 Î/%ÍÁ De Î/%ÍÁ Dg Î/%ÍÁ E[
****** ******** End of report ********
Cheers
Artur
trying to fix the problem but it seems that I am missing or messing something ...
let say I want to send test1.csv file with special characters to machine (for a test: pub400.com) - CSV file encoding utf-8.
>>test1.csv content:
wartość1
wartość2
wartość3
>> transfer file to iseries
C:\Users\Admin>ftp pub400.com
Connected to pub400.com.
220-QTCP at PUB400.COM.
220 Connection will close if idle more than 16 minutes.
501 OPTS unsuccessful; specified subcommand not recognized.
User (pub400.comnone)):
331 Enter password.
Password:
230 logged on.
ftp> lcd >> path to file on pc <<
Local directory now >> path to file on pc <<
ftp> quote type c 1153
200 Representation type is CCSID 1153.
ftp> put file1.csv
200 PORT subcommand request successful.
150 Sending file to /home/myid/file1.csv
226 File transfer completed successfully.
ftp: 25 bytes sent in 0.23Seconds 0.11Kbytes/sec.
>>on machine's side
CHGJOB LANGID(PLK) CNTRYID(PL) CCSID(1153)
>>and checking file on ifs side
ls -laS
total: 5.552 megabytes
273 drwx--s--- 2 usr 0 8192 Nov 14 11:00 .
37 drwx--sr-x 15423 QSYS 0 5652480 Nov 14 09:58 ..
1153 -rwx--x--- 1 usr 0 28 Nov 14 11:00 test1.csv
$
>> creating pf and compile
*************** Beginning of data *************************************
R FILE1
VALUES 30A CCSID(1153)
****************** End of data ****************************************
>> column check: dspffd usrLib/file1
Record length . . . . . . . . . . . . . . . : 30
Field Level Information
Data Field Buffer Buffer Field Column
Field Type Length Length Position Usage Heading
VALUES CHAR 30 30 1 Both VALUES
Coded Character Set Identifier . . . . . : 1153
>> copy stream data to pf
CPYFRMIMPF FROMSTMF('/home/user/test1.csv') TOFILE(userLib/FILE1) RCDDLM(*CRLF) RPLNULLVAL(*FLDDFT)
>> check file: runqry *n usrLib/file1
Position to line . . . . .
Line ....+....1....+....2....+....3
VALUES
000001 Î/%ÍÁ De Î/%ÍÁ Dg Î/%ÍÁ E[
****** ******** End of report ********
Cheers
Artur
Comment