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
 

 

PLI problem

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
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    Post subject: PLI problem
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: 788
Location: Chennai, India

PostPosted: Fri Feb 06, 2009 8:06 am    Post subject:
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: 8002
Location: Bellevue, IA

PostPosted: Fri Feb 06, 2009 8:07 am    Post subject:
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    Post subject: Reply to: PLI problem
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    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 Strings with double quotes having pro... raja Arumugam IBM Tools 0 Thu Mar 30, 2017 10:34 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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