|
I suspect the problem is with the target file. I think you need to specify
it as a database file rather than a stream file as in the example below:
From file: FROMFILE
File . . . . . . . . . . . . . xxxxx
Library . . . . . . . . . . *LIBL
Member . . . . . . . . . . . . *FIRST
To data base file: TOFILE
File . . . . . . . . . . . . . yyyyy
Library . . . . . . . . . . *LIBL
Member . . . . . . . . . . . . *FIRST
To stream file . . . . . . . . . TOSTMF
Replace or add records . . . . . MBROPT *ADD
To CCSID . . . . . . . . . . . . TOCCSID *FILE
Record delimiter . . . . . . . . RCDDLM *EOR
Record format of import file . . DTAFMT *DLM
String delimiter . . . . . . . . STRDLM '"'
Field delimiter . . . . . . . . FLDDLM ','
This example, which uses the defaults will give you a comma delimited flat
file in the QSYS.LIB file system with quoted character fields.
> -----Original Message-----
> From: Martin.Cubitt@keymed.co.uk [mailto:Martin.Cubitt@keymed.co.uk]
> Sent: Monday, September 18, 2000 6:53 AM
> To: RPG400-L@midrange.com
> Subject: Using CPYTOIMPF
>
>
>
> I am attempting to use CPYTOIMPF using the following command:
>
> CPYTOIMPF FROMFILE(V84WB/VENDOR)
> TOSTMF('/QSYS.LIB/MCLIB.LIB/BRD01.FILE')
> MBROPT(*REPLACE) RCDDLM(*CRLF)
>
> I have tried the option with *REPLACE and *ADD and tried it
> without the
> file BRD01 and with it.
>
> I would have expected a file called BRD01 to have been
> created in library
> MCLIB (which is in QSYS).
>
> The job log shows:
> File QACP452330 created in library QTEMP.
> Member QACP452330 added to file QACP452330 in QTEMP.
> Information passed to this operation was not valid.
> No records copied from file VENDOR in V84WB.
> Object QACP452330 in QTEMP type *FILE deleted.
> Copy command ended because of error.
>
> Message . . . . : Information passed to this operation was
> not valid.
>
> Cause . . . . . : Possible causes:
> --The operation could not use the data passed to it.
> --A name may not be correct.
> --Directory was expected, but a file was specified.
> --File was expected, but a directory was specified.
> --The function requested is not supported by the file system.
> Recovery . . . : Check the data passed to determine the
> cause of the
>
>
> Any ideas?!
>
>
>
>
> This message has been virus checked with appropriate software used by
> KeyMed (Medical & Industrial Equipment) Ltd., but neither it nor any
> attachments can be guaranteed free from viruses or other
> defects and the
> recipient accepts sole responsibility for any consequences
> arising from
> opening this message or any attachments. The comments
> contained in this
> message are personal to the sender, who accepts sole
> responsibility for
> them. They should not be taken to represent the company's views or
> position, which may differ in whole or in part from those
> expressed by the
> sender.
>
> +---
> | This is the RPG/400 Mailing List!
> | To submit a new message, send your mail to RPG400-L@midrange.com.
> | To subscribe to this list send email to RPG400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to
> RPG400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
> david@midrange.com
> +---
>
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.