Birgitta,
Your method would actually work better for me. The DIM size is a constant which could be changed over time. This would allow me to test the array without regard for its size or number of elements.
I coded: If %Len(%Trim(SKUAry_DS)) > 0; // SKU Array Contains Data?
I'm looking for data in this array and will skip if no data is present.
Many thanks,
Robert Munday
Munday Software Consultants
Montgomery, AL
-----Original Message-----
From: Birgitta Hauser <Hauser@xxxxxxxxxxxxxxx>
Sent: Jul 14, 2011 9:54 AM
To: 'RPG programming on the IBM i / System i' <rpg400-l@xxxxxxxxxxxx>
Subject: AW: Testing An Array
I think you could define the array in a data structure:
But I'd define the data structure containing the array as follows:
D ArrDS DS Inz
D Array 10A Dim(100)
/Free
If %Len(%Trim(ArrDS)) = *Zeros;
//Array contains only *Blanks
EndIf;
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them and keeping them!"
As an Amazon Associate we earn from qualifying purchases.