In-Depth

October Response Time

Memory Remembered

I am a regular reader and like your magazine a lot. That’s why I’d like to make an addition/correction to Dick Brodine’s piece about dynamic memory allocation ["A Case for Dynamically Allocated Memory," May ESJ, page 74]. Dick is right: Dynamic allocation it is the more efficient way of programming.

Dick is also wrong: COBOL can allocate storage dynamically under Language Environment by taking advantage of LE/370 callable services (see code example below).

***********************************************************************

** usage of LE callable modules for storage **

** management (dynamic allocation) **

** ADYNSTA - CALL CEEGTST to acquire **

** 5000 bytes from the inital heap. **

** **

***********************************************************************

IDENTIFICATION DIVISION.

PROGRAM-ID. ADYNSTA.

DATA DIVISION.

WORKING-STORAGE SECTION.

01 Heap-Id PIC S9(9) BINARY Value 0.

01 Stg-Size PIC S9(9) BINARY Value 5000.

01 I PIC 9999.

01 Address-of-New-Stg POINTER.

01 FC.

02 Condition-Token-Value.

03 Condition-ID.

04 Severity PIC S9(4) BINARY.

04 Msg-No PIC S9(4) BINARY.

03 Case-Sev-Ctl PIC X.

03 Facility-ID PIC XXX.

02 I-S-Info PIC S9(9) BINARY.

LINKAGE SECTION.

01 NEW-HEAP.

02 LS-DYNSTA OCCURS 250.

04 LS-TEXT PIC X(17).

04 LS-NUMB PIC 999.

PROCEDURE DIVISION.

*------------------

100-Main.

CALL "CEEGTST" USING Heap-Id, Stg-Size,

Address-of-New-Stg, FC.

IF Msg-No = ZEROS THEN

DISPLAY "Got " Stg-Size " bytes @ "

Address-of-New-Stg " from Heap " Heap-Id

ELSE

DISPLAY "CEEGTST failed with msg " Msg-No

DISPLAY "ADYNSTA Aborted "

STOP RUN

END-IF.

** point to the newly acq. storage

Miki Uhlyarik

Sears Canada, Toronto

 

I am aware that certain libraries can be used with COBOL to facilitate dynamic memory allocation. I do not believe the dynamic memory allocation constructs are part of standard Ansi COBOL.

That was the main point of my article. Make the dynamic memory constructs part of standard Ansi COBOL. That way, anyone writing COBOL could use dynamic memory allocation, not just the folks with the special libraries.

Dick Brodine

*****

Web-ulations!

I am impressed with your Web site. Is there something above a "10" out of 10? You and your staff are to be commended for a super job.

Dr. Al L. Andrews, Dean of Business & Engineering Technology

Kansas City Kansas Community College

Thanks, and check out our "11" at ESJ.com.

*****

ESJ Webmaster...

Have you considered providing the option to search the ESJ Web site "library" for topics? For example, if you are interested in researching OS/390 UNIX and are not sure if ESJ has covered a specific topic over the last couple of years, then it is not practical to open each issue to review the contents for the desired topic. This feature would be very useful. Great magazine and a very nice Web site.

Rob Savage

Esj.com offers the option of searching its online Library. Please click on "Library" on the navigation bar and then on "Search the Library." This will bring you to our search engine which will allow you to search on OS/390 references from ESJ, or any of our other IT Web sites. Also, under the "Library" option, you can peruse archived issues from 1993 to the present.

– ESJ Webmaster

*****

Where’s the Rest of the Beef?

As I was reading [Phil Courtney’s] article discussing Wendy’s requirements for protecting server data [July ESJ, page 24], I was disappointed that there was no mention of who their disaster recovery vendor was, and how they interfaced with them should a disaster occur and they had to recreate their system. I think that this information would help the reader understand many of the ingredients to successfully recovering data from a potential disaster.

Gary Shull

 

Wendy’s employs IBM services for disaster recovery. Hot site tests are performed in Boulder, Colo.

Phil Courtney

Must Read Articles