× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Could anyone describe the proper way to access teraspace allocated with a 
procedure call to _C_TS_malloc() from within an ILE COBOL program?
 
I have a program with this in linkage:
 
01  ws-test-area    pic x(1000000).
 
 
Then it allocates 16MB with: 
 
Call procedure "_C_TS_malloc"                        
    using  by reference lk-tablsz-total-bytes        
    giving into         ws-tablsz-pointer            
    on exception Move "y" to flag-call-exception     
                 Move "_C_TS_malloc" to ws-subroutine
end-call.                                            
 
 
But if I do this, I get a pointer error:
 
Set address of ws-test-area
 to lk-tablsz-pointer.     
Move all "X" to ws-test-area.
 
Message ID . . . . . . :   MCH0601       Severity . . . . . . . :   40        
Message type . . . . . :   Escape                                             
Date sent  . . . . . . :   03/29/04      Time sent  . . . . . . :   14:26:28  
                                                                              
Message . . . . :   Space offset X'00000000' or teraspace offset              
  X'00000080040880AF' is outside current limit for object @ZMIVP0037METZ3410  
  035241.                                                                     
Cause . . . . . :   You tried to operate outside the specified space, tried to
  operate on an unallocated page in teraspace, or tried to set the space      
  pointer outside the specified space. The object referred to is              
  @ZMIVP0037METZ3410  035241. The offset specified is X'00000000' for most    
  spaces, but X'00000080040880AF' for teraspace. The space class is X'07'. The
  secondary associated space number is X'0000'. The activation group mark is  
  X'00000000'. The heap space identifier is X'00000000'. The pointer to the   
  start of the implicit process space used for the allocation is              
  X'4000000000000000902A7180040880AF'. The space class designates the type of 
space as follows:                                                           
  00-primary associated space (includes space objects)                      
  01-secondary associated space                                             
  02-implicit process space for automatic storage                           
  03-implicit process space for static storage                              
  04-implicit process space for activation group-based heap storage         
  05-constant space                                                         
  06-space for handle-based heap storage                                    
  07-teraspace                                                              
  The object referenced and space class information is returned, whenever it
is available, for all space classes.  The other information is set only when
it applies to the returned space class value. Otherwise zero values are     
returned.                                                                   
 
 
 
Any ideas?
 
 
Zak Metz
. 
  
NOTICE: This E-mail may contain confidential information. If you are not 
the addressee or the intended recipient please do not read this E-mail 
and please immediately delete this e-mail message and any attachments 
from your workstation or network mail system. If you are the addressee 
or the intended recipient and you save or print a copy of this E-mail, 
please place it in an appropriate file, depending on whether 
confidential information is contained in the message. 
 
 

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.