This worked when i changed this dcl-s ptrXRLA pointer
to this dcl-s ptrXRLA pointer inz(%addr(rcdXRCL.XRLA01));

ctl-opt option(*srcstmt:*nodebugio:*noshowcpy) dftactgrp(*no)

dcl-f XRCL01 usage(*input:*update ) keyed ;
// File layout for xrcl01
// XRCUST customer number (key)
// XRLSTM last maint date
// XRLA01 label name 1 char(8)
// XRLA02 label name 2 char(8)
// XRLA03 label name 3 char(8)
// XRSET1 label 1 sets dec(2:0)
// XRSET2 label 2 sets dec(2:0)
// XRSET1 label 3 sets dec(2:0)
// ... all array fields all contiguous

dcl-s mycount int( 5:0) ;
dcl-s myCust packed( 6:0) inz(39356) ;

dcl-ds rcdXRCL likerec(XRCREC : *all) ;

dcl-s ptrXRLA pointer inz(%addr(rcdXRCL.XRLA01)) ;

dcl-ds dsXRLA based(ptrXRLA) ;
arXRLA char(8) dim(3) ;
end-ds ;

chain myCust XRCL01 rcdXRCL ;

if not %found() ;
mycount += 1 ;
endif ;

*inlr = *on;
return ;

update XRCREC ; // never happens, insures fields are 'brought-in'

Here's my take...
dcl-ds rcdXRCL likerec(<your rcd format> : *all);
dcl-s ptrXRLA pointer inz(%addr(rcdXRCL));
dcl-ds dsXRLA based(ptrXRLA);
arXRLA char(8) dim(3);
chain 039356 XRCL01 rcdXRCL;
Read the record into the DS. After the chain, arXRLA(<index>) is the
array representation of your file "buckets".
Roger Harman

John Rusling
Senior Developer/Analyst
Quadion LLC
Minnesota Rubber & Plastics

“No matter where you go, there you are...”.
<br />
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken or omitted to be taken in reliance on it, is
prohibited and may be unlawful.

This thread ...


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

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