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



My "Dam" for the day on V5R2 customer's machine became evident when I
attempted to use a Chain opcode to fill  DS directly. The DS referenced was
defined in the D spec with an EXTNAME and it also had a PREFIX defined.
The V5R2 documentation is *wrong*.  You cannot use EXTNAME with a DS in 
the result field of an externally defined file in V5R2.  You _must_ use 
LIKEREC if you want to read into a data structure using the result field.
They discovered the problem with the documentation too late, and weren't 
able to fix it.  They "fixed" the problem in V5R3 by changing the compiler 
to allow EXTNAME...  but it won't work in V5R2, whether you specify *INPUT 
or not... you need LIKEREC in V5R2.
The other alternative is to have the fields load into the data structure 
without specifying the DS as a result field.  If the DS is global, and the 
names in the DS match the fieldnames from your file, they'll automatically 
be loaded into the DS.
This is slightly slower than reading into it with the result field, but I 
doubt you'll notice the performance difference.
The option 14 compile resulted in level 20 error that said in essence that the DS name could not be used in the result field. I check the Websphere RPG ILE docs and sure enough they said that it could be done but someone must have forgot to tell the compiler.
Yep, the documentation in V5R2 is wrong.  V5R3 added the EXTNAME 
capability in order to fix the documentation.
What I think is weird is that we now have both LIKEREC and EXTNAME and 
they more or less do exactly the same thing.  The original idea was that 
LIKEREC would be used for reading directly into a DS, and EXTNAME would be 
used for cloning a record format into a DS.  Now we have both, and they 
can both be used for either purpose.  :)





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-2025 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 copyright@midrange.com.

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.