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



Hello,

Am 30.12.2019 um 22:43 schrieb Booth Martin <booth@xxxxxxxxxxxx>:

For a couple or so editable fields I keep those field's original values as hidden fields in the subfile. The processing subroutine includes a loop for the subfile where it check for changed value(s) and does a normal update routine. This fits nearly all scenarios for me as I keep subfiles limited in editable content. And yes, adding a processing subroutine does add code.

Yes, I also think that completely editable subfiles are some very special case which rarely applies.

But I don't understand about your second sentence. Do I guess right that you're talking about a READC for the SFL? And UPDATE changed records in the SFL?

The other solution, for more involved edits, is a separate editing program outside the subfile program.

Ah, here's the difference. For small and simple PF editors, I do all in one (*PGM and DSPF), to have all in one place.

Adding a new customer, for instance, is not suited to subfiles.

Depends. The WRKUSRPRF USRPRF(*ALL) SFL has an empty first line for adding (in this case) an user profile. Sometimes. IBM does it like that and sometimes, there's an "F6=Add". I have not yet found out which parameters lead to the decision which variant to use.

Make one program with all the editing, validations, warnings, etc. in one place and let subfiles access it. Let the deletions and additions happen there.

I agree with you if there's more than just edit/copy as OPT values. I generally do delete in the same *PGM. It's not much code and its easier to handle file exceptions one by one to retain failed deletes in the "are you sure you wanna delete" SFL.

All that's my personal opinion and I still consider myself a rookie with just 10 years of private tinkering with my AS/400 and V4R5 (with some extended time without doing anything in between). But I have a deep knowledge as a Linux Sysadmin and also somewhat experience in programming in general. So maybe it's helpful for me to not be encumbered with preconceptions about how stuff should be done because everybody else did so for decades.

:wq! PoC

PGP-Key: DDD3 4ABF 6413 38DE - https://www.pocnet.net/poc-key.asc



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.