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




    d Q             e DS
EXTNAME(WMERLGP:WMERLG:*INPUT)
    d                                     QUALIFIED

You can't read directly into a DS that's uses a file's external definition like this in V5R2. (You can, however, in V5R3)

IIRC, the documentation for V5R2 said that you could, but in reality you couldn't. The docs were wrong. Instead, you have to use LIKEREC. Using LIKEREC the definition of the Q data struct would look like this:

     D Q               ds                  likerec(wmerlg:*input)

I tried compiling your code with TGTRLS(V5R2M0), and before I made any changes, I got the same error you did. After changing the Q DS to use the above D-spec, it compiled without error.

As others have mentioned, there's a potential for a timing problem in your code. Two different jobs could do the setll *HIVAL and the READP at the same time, (since the file is open for input-only, there wouldn't be a record lock to prevent it.) That means that they'd end up with the same EID, which may be a problem.

But, the answer to your question is... in V5R2, in order to read into a data structure you must use LIKEREC. (In V5R3, you can use EXTNAME if you like)

As an Amazon Associate we earn from qualifying purchases.

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