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

PLI problem


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
anjani shanker

New User


Joined: 26 Jan 2007
Posts: 37
Location: USA

PostPosted: Fri Feb 06, 2009 7:23 am
Reply with quote

Hi,

I am sorry for bugging you all every now and then but I cant help it as I am new to PLI icon_smile.gif...Alright here is another problem I am stuck with...The scenario is like I want a module to call another module passing some variables thru pointer...this way it is going to happen.

Module M calls N with variable V1 and V2.
I have pointer defined for V1 and V2 say PTR which i am calling N with.
In module M(calling module) I am reading a file and passing V1 and V2 to N(called module) for every file record read. In module N depending on value of V1 i need to accumulate V2. So that means every time I call N...N should have the last value of V1 which i am storing in a local variable. I think everytime i call N..N should invoke from scratch...right? If yes how should I make it invoke with prior called stored values.

I hope I have made the scenario understanble to you.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Fri Feb 06, 2009 8:06 am
Reply with quote

Hi Anjani,

I'm not sure if you can use STATIC storage for that local variable.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Fri Feb 06, 2009 8:07 am
Reply with quote

There's a link to the manuals at the top of the page. Read up on BYVALUE, BYADDR, and STATIC attribute for variables. If you have questions after reading and trying them, please let us know.
Back to top
View user's profile Send private message
donateeye
Warnings : 2

New User


Joined: 01 Jun 2007
Posts: 62
Location: chennai

PostPosted: Fri Feb 06, 2009 3:14 pm
Reply with quote

S, its right... try declaring the variables as STATIC in all the blocks wherever its used (normally it isnot required to declare in every block). This will hold the stored value for you.
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 -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts z/vm installation problem All Other Mainframe Topics 0
No new posts Job scheduling problem. JCL & VSAM 9
No new posts Problem with IFTHEN=(WHEN=GROUP,BEGIN... DFSORT/ICETOOL 5
No new posts Need to add field to copybook, proble... COBOL Programming 14
Search our Forums:

Back to Top