Thanks Bob,
No I initialize the Pointer to NULL, and then allocate. Successfully.
And then later I check to see it the pointer = NULL. If it is not NULL, then I 
do the FREE.

Thanks

…….Cameron

-----Original Message-----
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of Bob 
T Roller
Sent: Saturday, April 8, 2023 8:50 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: [External] Re: COBOL question

Region card big enough? I’ve seen that abend via not enough memory.

Bob

Sent from Proton Mail for iOS

On Sat, Apr 8, 2023 at 8:17 PM, Charles Hardee <charleshhar...@gmail.com> wrote:

> I have not seen this exactly like what you describe, but I do have
> some thoughts.
> The pointer you are using for the ALLOCATE, does it have a value
> clause, specifically VALUE NULL.
> If not, the pointer could have an unknown value that does not compare
> equal to NULL so you would attempt to FREE it.
>
> On Sat, Apr 8, 2023 at 6:05 PM Cameron Conacher <conac...@gmail.com> wrote:
>
>> Hello folks
>> I have written an IMS COBOL program. I have included a couple of
>> ALLOCATE statements.
>> At the end of processing I check my pointers and if they are not NULL
>> I try to FREE. This results in a U4038 abend. At least inside Expediter.
>> I have not used ALLOCATE/FREE before.
>> I am thinking it may be related to Expediter somehow.
>> I mean FREE is pretty darned straight forward.
>> At the moment I have commented out the statements. Memory should be
>> freed at the end of processing anyway, but good housekeeping is well good.
>> Has anyone seen this before?
>>
>> Thanks
>>
>> Sent from my iPhone
>> ---------------------------------------------------------------------
>> - For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to lists...@listserv.ua.edu with the message: INFO
>> IBM-MAIN
>>
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions, send
> email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN
________________________________
American Express made the following annotations
________________________________
This e-mail was sent to you by a representative of Amex Bank of Canada, P.O. 
Box 3204, Station "F", Toronto, ON, M1W 3W7, www.americanexpress.ca. If you no 
longer wish to receive these e-mails, please notify the sender by reply e-mail.

This e-mail is solely for the intended recipient and may contain confidential 
or privileged information. If you are not the intended recipient, any 
disclosure, copying, use, or distribution of the information included in this 
e-mail is prohibited. If you have received this e-mail in error, please notify 
the sender by reply e-mail and immediately and permanently delete this e-mail 
and any attachments. Thank you.

American Express a fait les remarques suivantes
Ce courriel vous a été envoyé par un représentant de la Banque Amex du Canada, 
C.P. 3204, succursale F, Toronto (Ontario) M1W 3W7, www.americanexpress.ca. Si, 
par la suite, vous ne souhaitez plus recevoir ces courriels, veuillez en aviser 
les expéditeurs par courriel.

Ce courriel est réservé au seul destinataire indiqué et peut renfermer des 
renseignements confidentiels et privilégiés. Si vous n’êtes pas le destinataire 
prévu, toute divulgation, duplication, utilisation ou distribution du courriel 
est interdite. Si vous avez reçu ce courriel par erreur, veuillez en aviser 
l’expéditeur par courriel et détruire immédiatement le courriel et toute pièce 
jointe. Merci.

----------------------------------------------------------------------
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