× 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: "James W. Kilgore" <qappdsn@xxxxxxx>
  • Date: Fri, 24 Sep 1999 09:59:55 -0700
  • Organization: Progressive Data Systems, Inc.

You have the basics down, but I would do two things differently.

Not that your code is wrong, but,

1) I have found that using UP to process a file can create a problem.  Since
every record gets locked, update or not, you can fall into a lock wait.  By 
using
the file twice, once as IP then again as UF you gain blocking and only lock the
records that need an update.  If the file being processed does not have a unique
key, get the record to update by record number which can be given to you from 
the
file feedback data structure.

2) Using the UPDAT command is more overhead than you really need.  Again there 
is
nothing wrong with UPDAT, but we prefer an EXCPT with only the fields that are
being changed listed.  (Besides it makes it very clear as to which field values
the program affects.

Jim Langston wrote:

> This is a small update utility I just created for one of my users.  All
> it does is
> goes through a file and changes one field (BSSCAC) when another filed is
>
> equal to an input value (BSXTRL).
>
> There are two input parameters, Trailer and SCACCode.  Trailer is the
> search
> criteria.
>
> I would request critiquing of this program.

<<snip>>

>
>
>      FBSSHIPX   UP   E             DISK
>
>      DTrailer          S             10A
>      DSCACCode         S              4A
>
>      C                   IF        Trailer = BSXTRL
>      C                   EVAL      BSSCAC = SCACCode
>      C                   UPDATE    BSSHIPX1
>      C                   ENDIF
>
>       *******************************
>       *** Set up Entry Parameters ***
>       *******************************
>      C     *INZSR        BEGSR
>      C
>      C     *ENTRY        PLIST
>      C                   PARM                    Trailer
>      C                   PARM                    SCACCode
>      C
>      C                   ENDSR
>

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