1

Topic: CPYFRMIMPF

Good afternoon
It is necessary to copy a file in DB2 7.1 for AS400
CPYFRMIMPF FROMFILE (' \\192.168.0.101\qvfiles\import_test.csv ') TOFILE (MANCDTA.IMPORT_TEST);
Passed on recently - quits nothing!
At forums I can not find any simple example!

2

Re: CPYFRMIMPF

olga zobkov;
Parameter FROMFILE is intended for DB tables, to you is necessary FROMSTMF.
Do not use UNC the notation, the file should lie on the server iSeries.
Command to enter on the server console, instead of in SQL IDE.
it is Enough to esteem here

3

Re: CPYFRMIMPF

Serg0;
Thanks
But there is now another !
The coding!
/* Creating error record file */
CL:CRTSRCPF FILE (QTEMP/QAUGDBERCD) RCDLEN (232) CCSID (424);
CL:ADDPFM FILE (QTEMP/QAUGDBERCD) MBR (QAUGDBERCD);
/* Importing data into MANCDTA.IMPORT_TEST */
> CL:CPYFRMIMPF FROMSTMF ('/QV_Files/treesum.csv ') STMFLEN (*TOFILE) TOFILE (MANCDTA/T_TREESUM *FIRST) MBROPT (*ADD) RPLNULLVAL (*NO) TOCCSID (424) RMVBLANK (*LEADING) RCDDLM (*ALL) DTAFMT (*DLM) STRDLM (*DBLQUOTE) FLDDLM (', ') STRESCCHR (*STRDLM) DECPNT (*PERIOD) DECFLTRND (*HALFEVEN) DATFMT (*ISO) TIMFMT (*ISO) ERRLVL (*NOMAX) ERRRCDFILE (QTEMP/QAUGDBERCD QAUGDBERCD) ERRRCDOPT (*REPLACE)
CPC3101: Member QAUGDBERCD file QAUGDBERCD in QTEMP cleared.
SQL0332: Character conversion between CCSID 424 and CCSID 65535 not valid.
SQL0332: Character conversion between CCSID 424 and CCSID 65535 not valid.
SQL0332: Character conversion between CCSID 424 and CCSID 65535 not valid.
SQL0332: Character conversion between CCSID 424 and CCSID 65535 not valid.
CPC2959: 0 records copied to member T_TREESUM1.
Statement ran successfully (181 ms)

4

Re: CPYFRMIMPF

olga zobkov;
With the console as I understand difficulties, but nevertheless, an error at you SQL and I am not assured that this error  CPYFRMIMPF, instead of Client Access...
CCSID 65535 it is used for the binary data, with all that it implies...
Fulfill in the console.