If you see the first parm of Charles's example DB procedure, you would
notice that it requires a format name. The design, as Charles
mentioned, is based of IBM api method. ==> There is a price for
flexibility.
D getMyFileNextRec pr N
D format 7a const
D outResultDs likeds(myFileFmt) option(*VARSIZE)
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Joel Cochran
Sent: Tuesday, October 02, 2007 4:46 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: MVC in RPG?
On 10/2/07, Lim Hock-Chai <Lim.Hock-Chai@xxxxxxxxxxxxxxx> wrote:
That is where I'm having problem with. You now require the caller to
know the format he wants when chain to a file. How could this be
easier than simply do a chain? I think this DB layer will eventually
evolve into a monster. I don't see how this could save time in the
long run.
I have to admit I'm not following you. The caller knows that he wants a
MasterFile record:
MasterFile_Initialize(keyValue);
He then knows the fields he wants to work with:
MasterFile_GetName();
MasterFile_GetAddress();
MasterFile_GetZipCode();
etc. etc.
What is the "format" you are referring to? The prototypes will tell the
developer what the return definitions and set values are, so he doesn't
even technically need to know the database format.
And, I don't know how else to express this, but if you think this is
about making it easier then you are missing the point. Yes, I believe
that long term maintenance is easier: but the initial development is
not. So "easier"
is not necessarily the target here: "better" is the goal, with a side
benefit of simplified maintenance down the road.
--
Joel Cochran
http://www.rpgnext.com
http://www.rpgbeans.com
http://www.developingfor.net
--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.