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

Need clarification in calling a sub program


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

New User


Joined: 10 Apr 2010
Posts: 7
Location: Hyderabad

PostPosted: Wed May 05, 2010 2:10 pm
Reply with quote

I have a scenario in which, a value 01 MEMBER X(9) is passed from one program to another program to get group value in the calling program. My doubt is what happens if the recieving variable in linkage section is not as same length as the variable in called program.
For example, in Link section of the calling program the variable is defined as, 01 LK-MEMBER X(05) or 01 LK-MEMBER X(10).


Please help me in this.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 05, 2010 2:23 pm
Reply with quote

What happened when you tried this yourself before posting ?

What was the result, what is your problem ?
Back to top
View user's profile Send private message
Kamaleshwaran

New User


Joined: 10 Apr 2010
Posts: 7
Location: Hyderabad

PostPosted: Wed May 05, 2010 2:35 pm
Reply with quote

Sorry, still i didnt try this. I will try this and will come up.
I am new to the forum.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed May 05, 2010 8:08 pm
Reply with quote

Hello,

So, what did you try? What happened?

Suggest you use the "IBM Manuals" link at the top of the page and read about CALL/USING in the COBOL Language Reference.
Back to top
View user's profile Send private message
suhail2322

New User


Joined: 27 Mar 2009
Posts: 3
Location: Chennai

PostPosted: Tue May 18, 2010 6:27 pm
Reply with quote

In my program, Iam trying to initilize the subprogram dynamically by "CANCEL <subprogrm>", It is not getting initialized...!

Can anybody suggest me a solution for this

Note: I should initialize dynamically
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue May 18, 2010 6:45 pm
Reply with quote

instead of using commands that you don't understand - CANCEL.

look at the PROGRAM-ID clause INITIAL.
Back to top
View user's profile Send private message
thespider390

New User


Joined: 28 May 2010
Posts: 3
Location: New Delhi

PostPosted: Wed Jun 02, 2010 12:43 pm
Reply with quote

You can try this:

1) As suggested by Dick, use IS INITIAL.

2). If you are Using CANCEL in to bring Sub-pgm in Initial state, compiler must have DYNAM.
Without DYNAM it will not work

Correct me if wrong..........
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 Using API Gateway from CICS program CICS 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Calling an Open C library function in... CICS 1
No new posts DB2 Event passed to the Application P... DB2 1
Search our Forums:

Back to Top