Thanks Birgitta that worked (there are actually 10 contiguous fields, i
only indicated 3 in the post for brevity)

John

EVAL arr
ARR OF LABELNAME(1) = 'MERCRYID'
ARR OF LABELNAME(2) = 'MERCRYMP'
ARR OF LABELNAME(3) = 'MERCRYML'
ARR OF LABELNAME(4) = ' '
ARR OF LABELNAME(5) = ' '
ARR OF LABELNAME(6) = ' '
ARR OF LABELNAME(7) = ' '
ARR OF LABELNAME(8) = ' '
ARR OF LABELNAME(9) = ' '
ARR OF LABELNAME(10) = ' '

Source
ctl-opt option(*srcstmt:*nodebugio:*noshowcpy) dftactgrp(*no)
actgrp(*new);

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 LabelName ;
XRLA01 ;
XRLA02 ;
XRLA03 ;
XRLA04 ;
XRLA05 ;
XRLA06 ;
XRLA07 ;
XRLA08 ;
XRLA09 ;
XRLA10 ;
Arr Like(XRLA01) Dim(10) Pos(1);
end-ds;

chain myCust XRCL01 ;
if not %found() ;
mycount += 1 ;
endif ;
*inlr = *on;
return ;

update XRCREC ; // never happens, insures fields are 'brought-in'
<snip>
Hi,

You may try the following:

dcl-ds LabelName ;
XRLA01 ;
XRLA02 ;
XRLA03 ;
Arr Like(XRLA01) Dim(3) Pos(1);
end-ds;

Mit freundlichen Grüßen / Best regards

Birgitta Hauser
</snip>
<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 ...

Replies:

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

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