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
 

 

Saving WORKING STORAGE in memory...

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

New User


Joined: 04 Jan 2006
Posts: 77
Location: Bangalore

PostPosted: Tue Aug 15, 2006 11:26 pm    Post subject: Saving WORKING STORAGE in memory...
Reply with quote

Hi,

I have a Cobol code which calls a number of sub-programs. I need the sub-programs' working storage to be resident, ie the values in the working storage should not change when I 'CALL' it again...

Can any one suggest some compiler / run time options to do the same?

I tried compiing it wit RENT,RMODE(ANY),DATA(31) Link-Edited with options RENT,XREF,LIST,MAP and still not working.
Back to top
View user's profile Send private message

NIRAJ BILGE

New User


Joined: 05 Aug 2006
Posts: 11

PostPosted: Wed Aug 16, 2006 12:04 am    Post subject: Re: Saving WORKING STORAGE in memory...
Reply with quote

hi
i think u can create wss member in one group item
and each time pass them in sub-pgm using linkage section
for this u have to create the same group item in each sub-pgm.
i know its very cumbersome, if any other option then let me know.
Back to top
View user's profile Send private message
new2cobol

New User


Joined: 04 Jan 2006
Posts: 77
Location: Bangalore

PostPosted: Wed Aug 16, 2006 12:32 am    Post subject:
Reply with quote

Hi,

I don't want to use the Linkage section... I want the working storage be stored above the 16 MB line...

Is there an option for this?
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Thu Aug 17, 2006 3:27 am    Post subject: Re: Saving WORKING STORAGE in memory...
Reply with quote

hello new2cobol,

When you say the values should not change, are you talking about the values being the initialized values as the subroutine was called the first time, or reserving the values from the prior call?

The normal condition of subroutines run from batch programs is to preserve the values from the prior call. You must re-initialize the values on each call if you do not want the prior values.

Dave
Back to top
View user's profile Send private message
new2cobol

New User


Joined: 04 Jan 2006
Posts: 77
Location: Bangalore

PostPosted: Thu Aug 17, 2006 5:11 am    Post subject: Re: Saving WORKING STORAGE in memory...
Reply with quote

Hey I got the solution...

Compile the programs with RENT,RMODE(ANY),DATA(31) & link-edit the programs with RENT,RMODE(ANY),REUS,MAP.

And make sure that the working storage variables do not have the VALUE clause.

Worked like a charm.
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 GETMAIN / FREEMAIN versus STORAGE OBT... steve-myers PL/I & Assembler 8 Wed Feb 01, 2017 1:45 am
No new posts Not enough virtual memory is availabl... Vinay Pushpala IBM Tools 16 Tue Sep 13, 2016 4:37 pm
No new posts SCRNAME not working on my mainframe? mrsidhu12 TSO/ISPF 7 Thu Sep 01, 2016 2:17 pm
No new posts 2 same CLIST pgm but with different n... boyti ko CLIST & REXX 5 Fri Jun 03, 2016 4:55 pm


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