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



My personal opinion is that you should use SQL as SQL. Don't write SQL as File I/O.
And don't write SRVPGMs as File I/O either.
I agree with Alan Campin, and also add my opinion which many may not like.


Are you Really going into the world of GUI programming and using SQL from dot Net or Java development ?
or is this a Blue Sky Vision of some future capability you think you might like to have someday? A thing that might never be attained ?

If you are not going to use it, it is wasted effort. Period.
Don't go down that route until you and the business can justify going down that route.

I work where there is segregated I/O into SRVPGMs begun around 2001 or so.
Very much one File inside one SRVPGM. We have never used SRVPGMs from dotnet or Java, and these kinds of SRVPGM do nothing but get in the way of development.

Hawkeye references to the Database Tables show that one extra level of abstraction that is not needed.
And that abstraction is present in the simplest of programs.
It is a layer of abstraction is a layer that should needs to have tests for SOX compliance.

Compare that to what we have grown up with traditional RPG ( I need a record, so I read a record, and the buffer of the RPG compiler handles it ) gives us incredible readabilty and clarity.

But I will make this one caveat:
If you find that you have to manipulate the DataBase with some logic to present a True and Real understanding of the data ( something as simple as "Blank means Apply to All " or This Code here really means this" ) then create a SRVPGM to get that logic into a single place. Create a GETTER function with specific Input Keys and OutPut fields to it.
And do not fall into the mindset of " this Parm is returning a D.S. of the entire record to the caller program" since there still needs to be interpretation of the returned DS to make the information useable.
Structures usually have no resemblance to what should be encapsulated. SRVPGMs should be built to read "I was told to use these passed in parms to return that piece of business data out". That is their real power.

- John Voris


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.