HP3000-L Archives

September 2002, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Roy Brown <[log in to unmask]>
Reply To:
Roy Brown <[log in to unmask]>
Date:
Mon, 16 Sep 2002 01:20:34 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (26 lines)
In message <87372ECCA42DD3118E3200508B2E1146C576B6@GGEXSF>, Tracy Pierce
<[log in to unmask]> writes
>I have a recursive subpgm which must write to a file that's passed to it, so
>voila, EXTERNAL or GLOBAL seems to be the ticket.  I'm doing everything just
>like the example provided in the COBOL manual (p 11-7 & 11-8) EXCEPT that my
>subpgm resides in an XL, not in the same program file as its caller.

Hi Tracy

Faced with the same issue, we take a different approach.

We write a 'real' SUBPROGRAM (I hope your recursive subpgm is DYNAMIC!)
to handle the file open, read/write and close, and CALL this, as
required from the recursive subpgm.

This gets round the restrictions that COBOL imposes on file handling in
these circumstances.

I don't know whether this is more or less neat, and/or more or less
general, than a solution using EXTERNAL or GLOBAL though....
--
Roy Brown   Kelmscott Ltd

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2