Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Can we pass arrays in linkage section???

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
varunraisharma

New User


Joined: 01 Sep 2005
Posts: 15
Location: Bangalore

PostPosted: Tue Sep 13, 2005 6:19 pm    Post subject: Can we pass arrays in linkage section???
Reply with quote

Can we pass arrays in linkage section???

Please give the reasons also...
Back to top
View user's profile Send private message

mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Wed Sep 14, 2005 5:30 am    Post subject:
Reply with quote

Sure. An array is just a clump of data like any other. It's the data def that makes it special. For example;

05 clump pic x(100).
05 array redefines clump.
10 array-entry occurs 50 times pic x(002).

call 'subpgm' using clump
or
call 'subpgm' using array

it's still just 100 bytes of data.

Admittedly, I've never tried "call 'subpgm' using array", but it's just a string of 100 bytes even if you indexed it.
Back to top
View user's profile Send private message
varunraisharma

New User


Joined: 01 Sep 2005
Posts: 15
Location: Bangalore

PostPosted: Wed Sep 14, 2005 9:21 am    Post subject:
Reply with quote

Thanks

But actually i m confused on one point.

We can surely not pass index in the linkage section as its not a working storage variable in the calling program. So what if we try to pass an array
referenced by an index and not subscript.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Sep 16, 2005 5:31 am    Post subject:
Reply with quote

I don't know what you're trying to accomplish, but the index (or the SS for that matter) is just a pointer into the table (the clump of data). You can define an identical table in the WS of the sub pgm and move the passed data (the clump) into it. Then do your thing.

Better yet, use a SS to access it and you won't even have to move it.

Maybe you should explain what you want to accomplish by passing the table. If you just want to search it, just do what I suggested above.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts Is it possible to pass variables of s... Csongor CLIST & REXX 2 Fri Jun 10, 2016 7:33 pm
No new posts how to pass data from a rexx program ... Akshay Yadav TSO/ISPF 8 Mon Feb 15, 2016 12:05 pm
No new posts Number of parameters in Linkage kregen COBOL Programming 4 Wed Jan 27, 2016 5:13 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us