Use of TEMPS and their resetting
Pickering, John (NORBORD)
John.Pickering at norbord.com
Wed May 27 09:51:29 CDT 2009
How about using the FIRST function?
As in:
>item transit_number of cobra_paylog_extract_aei final
first(transit_number of cobra_paylog_extract_aei)
________________________________
From: powerh-l-bounces+john.pickering=norbord.com at lists.sowder.com
[mailto:powerh-l-bounces+john.pickering=norbord.com at lists.sowder.com] On
Behalf Of John Stires
Sent: Wednesday, May 27, 2009 10:35 AM
To: powerh-l at lists.sowder.com
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20090527/212088d3/attachment-0001.htm
More information about the powerh-l
mailing list