Output Update & Subfile

Raymond Schneider balddaddyray@yahoo.com
Tue, 4 Apr 2000 14:28:31 -0700 (PDT)


Hello Listers,

I wonder if anyone can assist me in the resolution of
a technique I am having trouble developing. 

We send a file (called ERA) of data to the State. This
file contains multiple data elements, but for the sake
of this discussion let's call them A, B, C, D and E. I
also write these elements to a KSAM file (named
DUPE-KSAM) I keep on my system. DUPE-KSAM uses A+B+C
as a repeating key; it also has a unique key of
A+B+C+D+E. The ERA file is combined with ERA records
from other counties and we get an ERA file of all
payments from across the State. The ERA file is
returned to me with A, B and C but not D or E (I have
no control over this).  I want to know which records
in DUPE-KSAM have been paid and then "arbitrarily"
apply a paid flag to those records that match, based
on A+B+C. The records that don't match (or can't be
matched) would be written to a subfile. I will run a
report that shows what was not applied.


The code I am using is:
ACCESS *ERA

OUTPUT DUPE-KSAM  UPDATE    &
          USING (A + B + C)    &
            VIA DUPE-KEY-FIELDS
        ITEM ASSIGNED-FLAG OF DUPE-KSAM  FINAL  "X" &
              IF ASSIGNED-FLAG OF DUPE-KSAM = " "

SUBFILE  ERABAD  KEEP   &
         IF ASSIGNED-FLAG OF DUPE-KSAM = " "   &
                 INCLUDE FILE ERA

SET PROC LIM 1000000
SET LOCK UPDATE
GO

ASSIGNED-FLAG is used to indicate that the record was
matched and paid. The subfile ERABAD will be the
unflagged records.

When I run the QTP, I get an error message stating
"Cannot find record with this key/index value" for the
records that I have not transmitted and are not on
DUPE-KSAM. Nothing is written to ERABAD.

How can I accomplish this?

Ray

=====
Raymond B. Schneider		(513)621-3045
Hamilton County Mental Health Board	(513)632-7159 fax
801-A W. 8th Street			H-P 3000  MPE/iX 5.0
Cincinnati, OH  45203-1601		Powerhouse 7.09E
rays@hamilton.mh.state.oh.us



__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.