Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reference values in a hold file

Status
Not open for further replies.

calvinw

Programmer
Aug 20, 2008
6
US
Here's a code snippet of what I have so far:
JOIN
BPDCLB AND BPDMBR IN BPDNEW TO CRCLB AND CRMBR IN CRFILL20 AS J4
END

DEFINE FILE BPDNEW
ACCTS/I5CS =1;
CHKDATE/YMD =BPDSTD;
MYDATE/YMD =DATECVT(CRDTE,'I6MDY','YMD');
END

TABLE FILE BPDNEW
SUM ACCTS
BPDCBA
WHERE CHKDATE GE &RDATE AND CHKDATE LE &TODATE;
WHERE BPDDTE EQ &CHKBILL;
WHERE BPDCLB EQ &CLUBID;
WHERE BPDCOL EQ 'Y';
WHERE BPDPCH EQ ' ';
WHERE BPDSTC EQ 'RFC';
WHERE MYDATE GE CHKDATE AND DATEDIF(MYDATE,CHKDATE,'D') LE 12;
ON TABLE HOLD AS RFC_COL_TOT;
END
-RUN
DEFINE FILE RFC_COL_TOT
RFC_COL/P6CS=ACCTS;
RFC_AMT/P11.2MSB=BPDCBA;
END


JOIN BLANK WITH CLUB_ID IN BILLHOLD TO BLANK IN COUNTERS AS J1
DEFINE FILE BILLHOLD


What I'm trying to do is use the values from RFC_COL and RFC_AMT within the content of BILLHOLD to display in a report. Any suggestions on how I might do that?
 
Found a way to make it work.

TABLE FILE BPDNEW
PRINT TOT.ACCTS
TOT.BPDLDA
WHERE CHKDATE GE &RDATE AND CHKDATE LE &TODATE;
WHERE BPDDTE EQ &CHKBILL;
WHERE BPDCLB EQ &CLUBID;
WHERE BPDCOL EQ 'Y';
WHERE BPDPCH EQ ' ';
WHERE BPDSTC EQ 'RFC';
WHERE MYDATE GE CHKDATE AND DATEDIF(MYDATE,CHKDATE,'D') LE 12;
ON TABLE HOLD FORMAT ALPHA;
END
-RUN

-READ HOLD &RFC_COL.A5. &RFC_AMT.A14.

I was then able to use &RFC_COL AND &RFC_AMT in the report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top