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

reg. Freemain


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

New User


Joined: 23 Nov 2007
Posts: 17
Location: Chennai

PostPosted: Mon Dec 24, 2007 9:21 am
Reply with quote

I have an assembler program that does a getmain at start and uses the storage for saving some work data. And before passing the control back to the operating system it does a freemain on the virtual storage acquired by earlier getmain. After this step I just have a sort step. Now the question is,

What are the advantages in issuing an explicit freemain when my task is the last step in the job?

The "MVS Assembler Services Guide" manual says that all storage acquired by getmain will be freed at the end of task/subtask. I would like to know the advantage of using a freemain in this particular case.
Back to top
View user's profile Send private message
Deru Sudibyo
Currently Banned

New User


Joined: 30 Nov 2007
Posts: 6
Location: Indonesia

PostPosted: Mon Dec 24, 2007 2:56 pm
Reply with quote

Agreed! VS will automatically released when your task return to the system. However, to code FREEMAIN explicitely is nice to have to keep your code look more prefect. Beside, in case later you have an other module which need to call this module, you don't need to worry about accumulating unused VS. This for sure i got such experience in the past.
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 GETMAIN / FREEMAIN versus STORAGE OBT... PL/I & Assembler 8
No new posts GETMAIN/FREEMAIN query CICS 9
No new posts Doubt on GETMAIN, FREEMAIN behaviour CICS 3
No new posts HI how to use getmain and freemain??? CICS 1
No new posts ERROR DURING FREEMAIN SYS CODE = 378-24 ABENDS & Debugging 2
Search our Forums:

Back to Top