Is it possible to declare Occurs in Linkage Section



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

Is it possible to declare Occurs in Linkage Section

Postby bhanu1209 » Wed Aug 26, 2009 12:42 pm

Hi,

I have a requirement to pass the array(Occurs clause) to the sub program. Is it possible or not.

Ex:

LINKAGE-SECTION.
01 WS-INPUT.
05 WS-INPUT-LENGTH PIC 9(4).
05 WS-A PIC 9(10) OCCURS 10 TIMES ---- ?

Thanks,
Bhanu
bhanu1209
 
Posts: 2
Joined: Tue Aug 25, 2009 4:06 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Is it possible to declare Occurs in Linkage Section

 

Re: Is it possible to declare Occurs in Linkage Section

Postby dick scherrer » Thu Aug 27, 2009 12:16 am

Hello,

Yes, it is possible. . .

When calling a subprogram the length is not necessary. If specified, it must be defined the same in both the calling and called code.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post