Re: Called Module with File Access - where to Close



This is the solution offered to allow for "dynamically sized linkage" are
also.
It's probably what I will do when I get back to it...something feels
inherently wrong about not closing a resource - it doesn't matter how
unlikely any fallout is.

Thanks to all on the thread....I consider this a response to all :-).

JCE

"Richard" <riplin@xxxxxxxxxxxx> wrote in message
news:1121757307.788730.83740@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> I'm considering create a BOPEN and a BCLOSE module
>
> Put a flag File-State PIC X VALUE SPACE in W-S. Test this on each entry
> and open the file if this is not set. ie automatically open the file.
> If the routine is CANCELed the file will be closed and the flag reset.
>
> Usually I have a 'function' parameter that I pass to the file routines
> and the 'X' function is to close the file and unset the file-state
> flag.
>


.