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



Hi,

With V7 approaching our shop and realizing I haven't yet put into practice much of the V6.1 enhancements, I was looking at Passing Files as Parameters. I have an example from systemideveloper by Paul Tuohy, but I'm not fully appreciating the advantages of this feature. Would that be that it permits having all file operations in the callee? With the file having to be declared in both caller and callee, I don't really get the advantage.

Also, WHAT exactly is being passed as the first parameter? Why is the file template not in the caller instead of the callee? What's the advantage over declaring the files in both caller and callee and passing only 2 parameters, the key and the record? Thanks!


Caller :
FcustMast IF E K Disk

D custRecord DS LikeRec(custRec)
D GetCustData Pr N
D custFile LIKEFILE(custMast)
D custData LikeRec(custRec)
D custKey Like(custNum)

/Free
If GetCustData(custMast: custRecord: 'TESTKEY')

/end-free


Called procedure :
FcustMast IF E K Disk TEMPLATE

P GetCustData B
D GetCustData PI N
D custFile LIKEFILE(CustMast)
D custData LikeRec(CustRec)
D custKey Like(custData.CustNum)

/Free
Read custKey CustFile custData;
If %Found(custMast);
Return *On;
Else;
Return *Off;
EndIf;
/end-free

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.