× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



- Yes, you are right.  Data Layer if probably most java programmer used
to prevent coding that sort of thing over and over again (the beauty of
OO).  However, it is pretty painful to create a Data Layer for each
table in the system.

- I would think your data layer would have required the consumer to try
and catch exception.  Otherwise, how would the consumer know if customer
actually no exist or something is wrong with the database.

- Also the data layer would probably require a connection to be opened
and closed with consumer is done with it.

- If above are true, would you be able to provide a more complete coding
on below?



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Walden H. Leverich
Sent: Wednesday, March 15, 2006 9:21 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: SQL Embedded in RPG ILE.

>Here is an interesting challenge. Anyone care to write this in java and
vb.
>As an old RPG programmer, I would be interested in seeing the
difference. 

You're really taking something out of context here. In Java, C#, VB,
etc. you'd most likely have a data layer that contained your plumbing.
Assuming you had such a layer, the equivalent code would be something
like:

---Begin---

If (Customer.Exists(12345)) {
        //Do something here
}

---End---

This assumes that your Customer class has a static method called
'Exists' that takes a customer number and returns true or false
depending on whether the customer exists.

Expand it out, say you wanted to get the customer's name.

---Begin---

Customer c = new Customer(12345);
Return c.Name;

---End---

What you're really asking for is to see all the plumbing code for the
Customer object, however, you're not taking into account that that code
would be written once and used everywhere.

-Walden

------------
Walden H Leverich III
Tech Software
(516) 627-3800 x3051
WaldenL@xxxxxxxxxxxxxxx
http://www.TechSoftInc.com

Quiquid latine dictum sit altum viditur.
(Whatever is said in Latin seems profound.)

--
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.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.