OCUR opcode in RPG

2900 pts.
Tags:
AS/400
RPG
Hi all,
Can any one define OCUR op code in easy words. If there is some example that would be great.
Thanks in advance
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

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.
  • philpl1jb

    In RPGLE Arrays are usually used but in prior versions Arrays were limited to one or two columns.  Multi-Occurring data structures allowed any data structure to contain a number of occurrences .. like an array of data structures .. but occurs were processed differently.

    D spec for data structure includes keyword OCCUR ( xxx )

    Occur moves you to a specific occurrence then when you use or put values into the fields of the data structure.  It is done in the occurrence selected (default is 1) 

    Occur can also be used to determine the current occurrence # being used.

    54,090 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.

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

Following

Share this item with your network: