IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

can we code occurs and redefines in the linkage section?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sreenivasreddyg

New User


Joined: 23 Apr 2005
Posts: 39
Location: delhi

PostPosted: Sat Apr 23, 2005 10:13 am
Reply with quote

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
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Apr 24, 2005 3:50 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top