We are selecting records from an Externally Described file, and then
writing those records to a programmed Described file, and then FTPing
the program described file (not allowed to FTP an externally described
file) off into the ether somewhere.
So, I want to do one MOVEL(P) to move the entire record. RPG won't
let me use the record format name of the externally described file as
the from field of a MOVE.
I sure don't want to have to describe all the fields in a data
structure, and then move them one by one to the data structure (so I
can then WRITE the program described file from the data structure).
Any help out there,
Thanks in advance,
JLiesner
On 15 Mar 2007 18:26:09 -0700, jlie...@gmail.com wrote:
>I sure don't want to have to describe all the fields in a data
>structure, and then move them one by one to the data structure (so I
>can then WRITE the program described file from the data structure).
If the field names in the data structure have the same names as the
fields in the externally described file you don't have to do any
moves.
If you're using RPG IV you can create the data structure from the same
record format as the externally described file using E DS and EXTNAME
so you don't have to describe the fields in the data structure.
--
Ken
http://www.kensims.net/
Opinions expressed are my own and do not necessarily represent the views
of my employer or anyone in their right mind.
... snip ...
If you can describe your selection criteria in a CPYF, then
create a physical file the same length as the externally
described file and CPYF ... FMTOPT(*NOCHK).
HTH,
Chris
--
www.brilligware.com
Home of MineSweeper5250!
That was possible in RPG III, too.
FMYFILE IF E DISK
IRECDS E DSMYFILE
Are you sure about this restriction? I know this is true for CPYTOSTMF but
to the best of my knowledge, FTP has no qualms about using externally
described files.
Regards, Chuck
-- All comments provided "as is" with no warranties of any kind whatsoever.