Use of TEMPS and their resetting

Bob Deskin Bob.Deskin at ca.ibm.com
Wed May 27 09:52:32 CDT 2009


If you want to prompt for T_CHECK_NUMBER and T_TRANSIT_NUMBER, try this 
ACCESS:

    ACCESS SEQUENTIAL REQUEST T_CHECK_NUMBER, T_TRANSIT_NUMBER

When you enter F in the Action Field, QUICK will prompt for the two temps 
and then start the retrieval using the values. In fact, that might be the 
problem. When you REQUEST an item, the result is not only put into the 
item buffer but also into the request buffer. Values for the retrieval are 
taken from the request buffer so that they don't change over the 
find/change/update cycle. As I recall, your SELECT uses values from the 
request buffer for subsequent retrievals.

Try it. It also solves the problem of a strange find for your users.

Bob



From:
John Stires <jstires at EBDS.com>
To:
"powerh-l at lists.sowder.com" <powerh-l at lists.sowder.com>
Date:
05/27/2009 10:36 AM
Subject:
Re: Use of TEMPS and their resetting



Hi All!
 
At Bob’s request, I skinnied down my code until I had only the basics to 
send out.  It started working.  Boy!  It was not pretty, but it works.  I 
am going to have to do something for the FIND procedure to make work a 
little more like the normal find or I am going to have a time retraining 
my users for this one screen.
 
First off, all fields update correctly.  When you first come to the 
screen, it displays only the records not yet updated, i.e. all records 
with blank Check and Transit no blank.  Entering the Check no and Transit 
no and then entering the values for a couple of members and then updating 
works fine.
 
The trick is when you do the FIND for find the updated records.  You have 
to enter the Check and Transit nos and the do the FIND.  Granted, it is 
looking for only those that match the TEMPS.  The FIND process is little 
backwards, but works.  This also allows the users to make another entry 
for a separate check no for other member of the same group, a good thing. 
I will have to play with is a bit yet.
 
I have included the code below for any comments on getting around the 
awkward FIND process.
 
A hearty thanks to all,
 
John
 
CANCEL CLEAR
SCREEN QKOBJ:COBRA_PAYLOG_EXTRACT_AEI_MNT.QKC                           &
                      RECEIVING T_PASS_TRUST,                           &
                                T_PASS_TRUST_NAME
 
TEMPORARY T_PASS_TRUST          CHAR*03
TEMPORARY T_PASS_TRUST_NAME     CHAR*30
 
TEMP    T_CHECK_NUMBER          CHAR*9  RESET AT STARTUP
TEMP    T_TRANSIT_NUMBER        CHAR*8  RESET AT STARTUP
 
FILE COBRA_PAYLOG_EXTRACT_AEI PRIMARY OCCURS 4 TIMES
        ACCESS SEQUENTIAL
        SELECT IF      &
                CHECK_NUMBER    OF COBRA_PAYLOG_EXTRACT_AEI     = 
T_CHECK_NUMBER &
            AND TRANSIT_NUMBER  OF COBRA_PAYLOG_EXTRACT_AEI     = 
T_TRANSIT_NUMBER
 
TITLE "PM Rcd No"       AT  6,05
TITLE "Amt Billed"      AT  6,19
TITLE "Amt  Paid "      AT  6,35
 
SKIP TO 4
ALIGN (2,5,21)
FIELD TRUST_CODE        OF COBRA_PAYLOG_EXTRACT_AEI     &
                        DISPLAY                         &
                        LABEL "Trust Code:"
SKIP
FIELD SCAN_DATE         OF COBRA_PAYLOG_EXTRACT_AEI     &
                        LABEL "Date Scanned:"           &
                        FORM MMDDYYYY
SKIP TO 4
ALIGN (32,35,53)
FIELD T_CHECK_NUMBER    LABEL "Check Number:"
SKIP
FIELD T_TRANSIT_NUMBER  LABEL "Bank Transit #:"
 
CLUSTER OCCURS WITH COBRA_PAYLOG_EXTRACT_AEI  AT 7,2
ALIGN (2,,5)(,,17)(,,32)
FIELD PM_RECORD_NUM     OF COBRA_PAYLOG_EXTRACT_AEI     &
                        DISPLAY
SKIP
ALIGN  (,,17)(,,33)(,,49)(,,62)
FIELD AMT_BILLED        OF COBRA_PAYLOG_EXTRACT_AEI     &
                        ID SAME                         &
                        DISPLAY                         &
                        PICT " ^,^^^,^^^.^^"
FIELD AMT_PAID          OF COBRA_PAYLOG_EXTRACT_AEI     &
                        ID SAME                         &
                        PICT " ^,^^^,^^^.^^"
FIELD CHECK_NUMBER      OF COBRA_PAYLOG_EXTRACT_AEI     &
                        DISPLAY                         &
                        ID SAME
FIELD TRANSIT_NUMBER    OF COBRA_PAYLOG_EXTRACT_AEI     &
                        DISPLAY                         &
                        ID SAME
CLUSTER
 
SKIP TO 23
ALIGN (2,5,19)(31,34,51)
 
FIELD DATE_ADDED        OF COBRA_PAYLOG_EXTRACT_AEI     &
                        DISPLAY                         &
                        FORM MMDDYYYY                   &
                        LABEL "Date added:"
 
FIELD DATE_LAST_UPDATE  OF COBRA_PAYLOG_EXTRACT_AEI     &
                        DISPLAY                         &
                        FORM MMDDYYYY                   &
                        LABEL "Last Updated:"
;=======================================
PROCEDURE UPDATE
  BEGIN
    FOR COBRA_PAYLOG_EXTRACT_AEI
      BEGIN
        IF      ALTEREDRECORD OF COBRA_PAYLOG_EXTRACT_AEI       &
          AND   AMT_PAID        <> 0
           THEN
             BEGIN
                LET CHECK_NUMBER        = T_CHECK_NUMBER
                LET TRANSIT_NUMBER      = T_TRANSIT_NUMBER
                LET DATE_LAST_UPDATE    = SYSDATE
                PUT COBRA_PAYLOG_EXTRACT_AEI
             END
      END
  END
BUILD-- 
= = = = = = = = = = = = = = = = = = = = = = = = = = = =
Mailing list: powerh-l at lists.sowder.com
Subscribe: 'subscribe' in message body to 
powerh-l-request at lists.sowder.com
Unsubscribe: 'unsubscribe &lt;password&gt;' in message body to 
powerh-l-request at lists.sowder.com
http://lists.sowder.com/mailman/listinfo/powerh-l
This list is closed, thus to post to the list you must be a subscriber.
Add 'site:lists.sowder.com powerh-l' to your search terms to search the 
list archive at Google.





More information about the powerh-l mailing list