Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS


Postby kandellisuresh » Sat Oct 02, 2010 1:47 am

using occurs clause we can specify the no of occurenses
but how can we declare in runtime
Posts: 9
Joined: Thu Sep 02, 2010 9:29 am
Has thanked: 0 time
Been thanked: 0 time

Re: cobol

Postby Robert Sample » Sat Oct 02, 2010 3:21 am

OCCURS DEPENDING ON allows the number of occurrences to vary at run time, however you must specify the maximum number allowed at compile time. There is no way in COBOL to define the maximum number of occurrences at run time -- this must be provided at compile time.
Robert Sample
Global moderator
Posts: 3657
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 270 times

Return to IBM Cobol


  • Related topics
    Last post