Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linkage Section : Occurs Clause

Status
Not open for further replies.

SmallProgram

Programmer
Feb 6, 2002
42
0
0
IN
Hello All,
Can we use Occurs Clause in the Linkage Section.
If yes can you give me an Example also.

Thanks in Advance


Programmer,Amatuer
 
Code:
555555 LINKAGE SECTION.
555565 01 SOMETHING.
555575    03  THIS-OCCURS OCCURS 10 TIMES PIC X.
...
 
OCCURS works anywhere in the DATA DIVISION as long as the level number is >= 2 and <= 50. Some compilers even allow it on level numbers 1 and 77.
 
As a caveat, careful your subscript doesn't ever extend beyond the last element or you'll start referencing procedure division code, with extremely unpredictable results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top