Do a variable GETMAIN (or whatever the modern equivalent is) specifying a 
suitable minimum and a horrendous maximum.  The system will return both the 
address and the actual amount obtained.  Save the amount and free the storage.  
You may need to repeat for the three different areas: below the line, above the 
bar, and between the two.

Be aware that the amount could change as you make use of system services.  For 
example, OPEN could allocate memory for buffers.

> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
> Behalf Of scott
> Sent: Saturday, December 06, 2014 9:27 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: How much storage is left?
> 
>     In an assembler program how can you find out how much storage/memory
> is remaining?  Do getmains till the return code replies back there is no
> more?

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to