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
 

 

About calling program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
krbabu

New User


Joined: 20 Feb 2004
Posts: 57

PostPosted: Mon Apr 19, 2004 9:54 am    Post subject: About calling program
Reply with quote

Hi,
I am calling prog B from prog A. In A i have intialized the variable num1 to 10 but in prog B i was change this num1 to 20. AT the time of return the program i want to num1 as 10. That means the value at prog A.
Is it possible? If so can any body expalin it with example.
Back to top
View user's profile Send private message

bluebird

Active User


Joined: 03 Feb 2004
Posts: 127

PostPosted: Mon Apr 19, 2004 5:14 pm    Post subject:
Reply with quote

hello,

do a move 20 to num1 Before doing your call in pgm A then after the call do a
move 10 to num1 in pgm a

in pgm b you can do a move 20 to your num1 anytime

is this what u want ?
Back to top
View user's profile Send private message
krbabu

New User


Joined: 20 Feb 2004
Posts: 57

PostPosted: Mon Apr 19, 2004 5:20 pm    Post subject:
Reply with quote

no no.
before call in prog A num1 is 10
and in called prog B num1 is 20. When i return the prog B to prog A i want the intial value of num1 which has intialed before the call B from A as 10.
Is it possible or not?
Back to top
View user's profile Send private message
sosu4u

New User


Joined: 02 Nov 2007
Posts: 2
Location: bangalore

PostPosted: Wed Feb 04, 2009 6:15 pm    Post subject:
Reply with quote

hello it is possible

if u define variable as local the value will not change in pgm b.

in pgm a:

if u declare num1 as local then before calling pgm b

display the variable.

after calling pgm b. increment num1 count to 20.

again display the cariable in pgm a. it will show same value

what value it have before because it is local variable
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Feb 04, 2009 7:26 pm    Post subject:
Reply with quote

You seem to be little late in answering - it's been just 5-years when question was posted first.. icon_smile.gif
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 IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
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


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