Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
PL/1 Passing internalProcedure variable to another procedure

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
khaarthikm

New User


Joined: 08 Aug 2005
Posts: 15

PostPosted: Tue Oct 14, 2014 6:40 pm    Post subject: PL/1 Passing internalProcedure variable to another procedure
Reply with quote

Hi,
Is it possible to pass a variable declared inside a procedure to another procedure.

PROC1: PROCEDURE;
DCL A CHAR(20);
A = 'ABC';
CALL PROC2;
END PROC1;

PROC2: PROCEDURE;

PUT SKIP LIST('Value from PROC1' !! A);

END PROC2;

Now I get a compiler warning that A is implicitly declared.

Kindly help.
Back to top
View user's profile Send private message

prino

Senior Member


Joined: 07 Feb 2009
Posts: 1072
Location: Oostende, Belgium

PostPosted: Tue Oct 14, 2014 7:03 pm    Post subject: Reply to: PL/1 Passing internalProcedure variable to another
Reply with quote

Why do you think it's called an internal variable?

If you want to pass it around, you'll have to use

Code:
PROC1: PROC;
DCL A CHAR(20);
A = 'ABC';
CALL PROC2(a);
END PROC1;

PROC2: PROC(b);
dcl b char(*);

PUT SKIP LIST('Value from PROC1' !! b);

END PROC2;
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Move from Comp3 variable to Edited Va... Revathy.nair0485 COBOL Programming 7 Fri Nov 03, 2017 3:30 pm
This topic is locked: you cannot edit posts or make replies. Can a alphanumeric data be moved to a... nico_neoz COBOL Programming 10 Mon Oct 30, 2017 8:28 am
No new posts Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us