-----Message d'origine-----
[mailto:midrange-l-bounces@xxxxxxxxxxxx] De la part de Dennis Lovelady

You said (paraphrasing since I don't have the original here)
that CLP (which I hope is actually CLLE) does: OPNQRYF
followed by CALL TESTPGM... and TESTPGM uses the same filename.

Dennis,
Here's what I wrote originally,

CLP
OPNQRYF (myfile) with kfld changed from 5 to 3 kflds.
call testpgm

testpgm calls mypgm which also uses myfile and the 5 original kflds.

Obviously, the opnqryf must be changed, but how should we have done it?
<<<<<<<

CLP, (not CLLE!) does the OPNQRYF and calls testpgm(the program my coworker was testing) as it has done for several years.
A subprocedure called by testpgm now calls mypgm.

In mypgm, the file used in the opnqryf is declared. Thus, as I have learned from the experts during this thread, mypgm will not open a new data path, but share that of the opnqryf. However, a subprocedure in mypgm issues a chain to myfile, using 5 keyfields. The opnqryf specified 3 kflds and the program crashes with the message that I'm using too many fields to access the file.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 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.