As the code is gone, I couldn't tell you which was I using. Considering I don't use them that often anyhow.
The routine I wrote copied 8 PDF files of 250 pages each in under a second.
I forgot about the straight CPY command. Never remember it until after the fact. As with most IBM copy commands, doesn't it give some sort of status when it is copying? The idea was to avoid it all together as the nature of the files being copied and the management reasoning behind it.
----- Original Message -----
From: "John Yeung" <gallium.arsenide@xxxxxxxxx>
To: "RPG programming on the IBM i (AS/400 and iSeries)" <rpg400-l@xxxxxxxxxxxx>
Sent: Thursday, January 14, 2016 2:15:02 PM
Subject: Re: RPG prototype for C-language FILE *
On Thu, Jan 14, 2016 at 1:57 PM, <tegger@xxxxxxxxxxx> wrote:
I was using two commands. One to copy the IFS-based file to a flat file and then copy it back to a different location.
I don't see why you can't say exactly which commands. CPYTOIMPF,
CPYFRMIMPF? CPYTOSTMF, CPYFRMSTMF?
In any event, that approach (of using an intermediate flat file) is
almost definitely wrong. You should be using the CPY command from CL,
or using cp from Qshell or PASE. These will directly copy the stream
file.
I would be surprised if your program is faster than all of the
direct-copy commands, since presumably those commands are themselves
either equivalent to what you wrote, or even more highly optimized.
John Y.
As an Amazon Associate we earn from qualifying purchases.