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



On Tue, Dec 6, 2011 at 2:36 PM, sjl <sjl_abc@xxxxxxxxxxx> wrote:
John:

Including Factor 1 is actually not a "mistake" - it is redundant.  In fact,
this one line of code is equivalent to the five lines of code below:

xxpaky delete pfhcm

See:
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/books_web/c0925086671.htm#HDRZZDELET

"... The search argument, search-arg, must be the key or relative record
number used to retrieve the record to be deleted. If access is by key,
search-arg can be a single key in the form of a field name, a named
constant, a figurative constant, or a literal..."


- sjl


John wrote:
 I am not getting any message from the compiler.  The reason I am
asking is I am having issues with records not existing.

There is, of course, an error in the following.  Which I have
addressed.  I rarely use the delete operation.

But, I am seeing odd missing records.

xxpaky  klist
            kfld          aphsp#
            kfld          apacct


   xxpaky    setll  pfhcm
   xxpaky    reade pfhcm
                if       not %eof(SPBHCMP)
   xxpaky    delete  pfhcm
                endif


<<  Obvious mistake I found was including factor 1 on the delete.  >>

APHSP# P 1   2 0
APACCT P 3   6 0

The above came from the first file.

Those are used to chain to the second file, where the fields are:
HMHSP#  P   3 0
HMACCT  Z   7 0

 I got both definitions from the compiler list.  I am confused as to
 why this would have ever seemed to work.  From what I am encountering,
 it doesn't, at least not consistently.


I have the ancient v4r2 documentation files on my pc. The way I read
it, delete with factor 1 searched for and deleted the record. That
record might, or might not be the same record currently in the buffer.

I am unclear, yet, if that is an issue.

Nice to have choices, but nicer to understand consequences. All I
know is that records are missing from a file that is accessed by only
two programs, and only one has a delete in it. And that single delete
has factor 1.

John McKee

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.