×
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.
The article you referenced (Found this Paris article, i'm trying to adapt and use now ->
http://ibmsystemsmag.com/ibmi/developer/general/d-spec-discoveries/?page=2 <http://ibmsystemsmag.com/ibmi/developer/general/d-spec-discoveries/?page=2>)
Is the "as designed" way to go - particularly if you wanted to avoid pointers - which may cause issues for those who follow you since pointers are not exactly common currency in the RPG world.
This is one of those interesting (and rare) cases when Multiple Occurrence DS can work.
Just set the Occur level before you do the read.
By the way - as you have hopefully realized from the article - the POS keywords are not needed. The fields will be contiguous in the DS anyway - POS just confuses the issue I think.
Personally I would use a DS array defined with LIkeRec and use DS I/O. Like So.
dcl-ds data LikeRec(recname);
index += 1;
Chain key filename data(index);
That is by far the simplest approach.
Jon Paris
www.partner400.com
www.SystemiDeveloper.com
As an Amazon Associate we earn from qualifying purchases.
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.