It will have no effect on the programs which reference the file as a program
described (flat) file as long as the record length, key, and data elements
remain the same. I've done this many times without having to re-compile the
old (in our case, RPG II) programs. I've even program described a flat file
in an RPG IV program and later externalized it; no change or re-compile to
the old IV programs.
As far as the "How," just create the external definition with DDS or SQL.
Use CPYF to copy the current file to the new, external layout; you need to
use the FMTOPT(*NOCHK) option. If there are any LFs or Alternate Indices
over the original file, obviously you'll need to blow them away; delete the
original file and either rename the new file or use a CRTDUPOBJ command.
Then recreate the LFs, if they don't get recreated automatically by the
processes that need them.
Personally, I always do this is a test library first and test it. But that
goes without saying.
Jerry C. Adams
IBM i Programmer/Analyst
Never march in another man's parade. -Walt Kelly
--
A&K Wholesale
Murfreesboro, TN
615-867-5070
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Mike Wills
Sent: Thursday, June 16, 2011 9:59 AM
To: Midrange Systems Technical Discussion
Subject: Re: Program Described File and SQL
How is that done? Can it be done without affecting the existing
programs? That is something I have never had to do before.
--
Mike Wills
http://mikewills.me
On Wed, Jun 15, 2011 at 4:13 PM, Mark Murphy/STAR BASE Consulting Inc.
<mmurphy@xxxxxxxxxxxxxxx> wrote:
Convert it to an externally described file.
As an Amazon Associate we earn from qualifying purchases.