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



Mark, et al.

The specific context was to find a way easily to use SETLL to test existence, and not have to be concerned if more columns were added.

The OP was given several alternatives, including some SQL techniques - he wants to go SQL for almost everything.

This technique for the OP makes several assumptions - fixed key length, no change in those particular key columns, etc.

Since it is ALL that the OP intends to do with this, it seemed not so bad an idea.

There is an explicit statement in the programmer's guide chapter 15 that no level checking is done for program-described files. Only for externally-described ones. That is obvious, once I got to thinking about it.

Again, this was a VERY narrow context. All manner of dangers of not using level checks were presented to the OP.

Vern

On 11/7/2012 12:39 PM, Mark S Waterbury wrote:
Nathan:

Technically, this is a "program described" file, not an "externally
described" file -- so I don't think the RPG compiler generates the code
to initialize the UFCB in such a way that the "level check" will be
performed (at open time).

As far as I am concerned, this "technique" is equivalent to telling
someone to "Close your eyes and step on the gas!" while driving a
car... :-o

IMHO, you are just handing a loaded gun to some "programmers" so they
can shoot off some of their own toes!

Good luck with that ...

Mark

> On 11/7/2012 1:15 PM, Nathan Andelin wrote:
PHP/MYSQL people scratch there head (more like point fingers at
me and snicker) when we struggle with level check.
There was a tip on Linkedin last night for people who are struggling with file level checks. It seemed to be worth considering, so I wrote a small program to test the idea. This is a program that performs setll, read, write, update, and delete operations against a table:

http://www.radile.com/rdweb/temp/rla110.txt


With this structure, no file level checks are reported at runtime even though the file is defined with LVLCHK(*YES), new fields have been added, using alter table, the program was NOT recompiled, and it seems to run flawlessly.

Thoughts?

Record layouts and key layouts are externally defined, too. Nice!

-Nathan



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.