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 code occurs and redefines in the linkage section?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: can we code occurs and redefines in the linkage section?
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    Post subject:
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    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 UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts DB2 Program abending without giving a... rahulgarg14 DB2 7 Mon May 29, 2017 8:10 pm
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


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