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


  • Subject: Re: RPG IV program - comments requested
  • From: "Scott Klement" <infosys@xxxxxxxxxxxx>
  • Date: 24 Sep 1999 15:58:00 -0500

Buck,

    Wouldn't your examples also imply that program-described files
are a better approach as well?  That way you can not only see what
fields are being updated, but you can also see exactly where they
are coming from.

Our shop uses naming standards that make it immediately obvious
which fields come from which files.  These standards make it
impossible for fields in one file to have the same name as fields
in another file.

Therefore, its very clear in the C-specs which fields are being
updated, you just look for anything involving a the record format
thats being updated.

With the EXCEPT approach, you now have to go down to the Output
specs to see whats affected, so for us, it would make things more
difficult to follow.

However, I can see that if you did not have standards like ours,
the opposite would be true -- but again, in that circumstance,
wouldn't program-described files be even better?  At least as far
as getting your intent across?


Buck Calabro <mcalabro@commsoft.net> wrote:
<<SNIP>>
> The use of EXCPT rather than UPDAT speaks to the "intent" of the
>  programmer.
> UPDAT is a shotgun approach to updating a record - it isn't easy to
>  tell
> exactly which fields you intended to update, since you're updating
>  them all.
> With an EXCPT, your intent is clearer.  What does this fragment inte
>  to
> do?
>
> FMASTER  UP  E                    DISK
> FTOLLS   IF  E           K        DISK
> C* If status = G, process
> C           STATUS    IFEQ 'G'
> C           TOLKEY    CHAINRTOLL                90
> C                     ADD  TOLTOT    TOLYTD
> C                     UPDATRMAS
> C                     ENDIF
>
> How about now?
>
> C* If status = G, process
> C           STATUS    IFEQ 'G'
> C           TOLKEY    CHAINRTOLL                90
> C                     ADD  TOLTOT    TOLYTD
> C                     EXCPTUPDTOL
> C                     ENDIF
> ORMAS    E                UPDTOL
> O                         TOLYTD
> O                         TOLAMT
> O                         TOLDAT
>
<<SNIP>>
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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.