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
 

 

Need clarification in calling a sub program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Need clarification in calling a sub program
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: 8593
Location: Back in jolly old England

PostPosted: Wed May 05, 2010 2:23 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Wed May 05, 2010 8:08 pm    Post subject:
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: 2
Location: Chennai

PostPosted: Tue May 18, 2010 6:27 pm    Post subject: Cancel a Subprogram
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    Post subject:
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    Post subject:
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    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 SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Calling procedure with multiple entri... steve-myers PL/I & Assembler 5 Fri Jan 27, 2017 3:33 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm


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