View previous topic :: View next topic
|
Author |
Message |
sreenivasreddyg
New User
Joined: 23 Apr 2005 Posts: 39 Location: delhi
|
|
|
|
hi,
can we code occurs and redefines in the linkage section?if i want to pass the table contents to a subprogram what method i should approach.
regards,
sreenivas |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Hi sreenivas,
I've never tried it, but I'm sure you can do it. But your ques leads me to beleive you're not looking at the situation properly.
How you define the passed data is not a concern. You can pass a table as an 01 or 05 level without an occurs. It's only important that the pgm that receives the data defines it w/an occurs clause. For example:
Caller pgm
ws sect.
01 tbl.
05 ent pic x(010) occcurs 5.
01 w-data pic x(050).
proc div.
call pgma using tbl.
Pgma
Link sect.
01 my-tbl.
05 my-ent pic x(010) occurs 5.
proc div using my-tbl.
The Caller pgm could have also sent you w-data. So long as the data was organized as a table it would have worked for you too. |
|
Back to top |
|
|
|