× 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 all,

I encountered a very strange problem today: I have a program that copies a record from a file to the same file in a different library. Both source and target file are USROPN with EXTFILE. User is prompted for target library, program opens file in target library and copies record. Works fine.

Now I added another file to copy additional information with the record. Same mechanism, only whatever is in the name that is used as EXTFILE parameter makes no difference, the first file in the library list is opened. Only special thing I can think of is that the additional file contains a VARLEN field.

- I tested the program on V5R4 and V6R1: no difference.
- Activation group is *CALLER; caller is a 'work with' panel with activation group *NEW.
- There are no overrides in effect.
- All files are defined with SHARE(*NO).
- If I step through the opening of the file in debug I can see that the file is actually closed before I open it, that the EXTFILE parameter contains the correct name, that the OPEN succeeds and that after that the wrong file is opened.
- If I change the EXTFILE parameter, in debug just before the open, to point to another file (all files are internally described; no level checks), the EXTFILE works and the file the parameter points to is opened.
- Just to be sure it was not the internal definitions, I created a version of the program that uses externally described files; same behaviour.
- The job log contains no messages about this file.
- I found another program that uses the same file through EXTFILE and it shows the same behaviour (unnoticed, until now).

It appears that somehow EXTFILE has no effect on this particular file. Could it be the VARLEN field? Anybody noticed anything like this before?

Joep Beckeringh

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.