RPG Array

5 pts.
Tags:
Report Program Generator
RPG
RPG arrays
RPG IV
Hello ! Can I check for all the elements of an Array in single statement ? e.g. If Array(*All) = *Blanks ? I want to check that all elements of an array is blank or not.

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

Doesn’t the following work ?

If Array = *Blanks

Regards,

Martin Gilbert.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • brettharris
    I don't think 'If Array = *blanks' will work - the compiler is expecting an index to be referenced. This may be a pain, but I've found that if I create a data structure where the array overlays a field, then I can check that field for blanks. For instance, if my array is defined like this: d ds d aDS 10 d aArray 2 dim(5) inz overlay(aDS) The array (aArray) overlays field aDS. Field aDS is the same size as the entire array. I can then use field aDS to check for blanks.
    40 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following