Previous Topic Next topic Print topic


M$GET (Dynamic Memory Routine)

Retrieves data from an allocated memory block.
Note: This ACUCOBOL-GT library routine is available in this COBOL version. Any compatibility issues in this COBOL system are in the Compatibility Issues section at the end of the topic.

Usage

CALL "M$GET" 
    USING MEM-ADDRESS, DATA-ITEM, DATA-SIZE, DATA-OFFSET

Parameters

MEM-ADDRESS USAGE POINTER Must point to a memory area previously allocated by M$ALLOC.
DATA-ITEM Any data item Data from the memory block will be stored in this item.
DATA-SIZE Numeric parameter (optional) The number of bytes to move from the memory block. If omitted, then the number of bytes is set to the size of the memory block (excluding overhead bytes).
DATA-OFFSET Numeric parameter (optional) The location within the memory block from which to start the move. The first location is position 1. If omitted, this value defaults to 1.

Description

This routine retrieves data from the memory block at MEM-ADDRESS and stores it in DATA-ITEM. Regardless of the value of DATA-SIZE, no bytes are copied from past the end of the memory block. Note that the size of DATA-ITEM is not checked.

Compatibility Issues

None.

Previous Topic Next topic Print topic