HP3000-L Archives

June 2001, Week 2

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:
John Pollard <[log in to unmask]>
Reply To:
John Pollard <[log in to unmask]>
Date:
Mon, 11 Jun 2001 21:00:44 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (36 lines)
"Mark Boyd" <[log in to unmask]> wrote in message
> It can be passed to a subroutine.  I've had to do it.

With the calling program looking something like this:

FD INPUT-FILE.
...
001  FILE-NBR         PIC S9(04)  COMP.
...
   CALL  'GETFILENUM'
      USING  BY CONTENT    INPUT-FILE
                   BY REFERENCE  FILE-NBR.


And the called program looking something like this:

LINKAGE SECTION.
01  FD-INT                          PIC S9(04)      COMP.
01  FILE-INT                        PIC S9(04)      COMP.

PROCEDURE DIVISION.
MAIN-PROCESS                    SECTION.
ENTRY  'GETFILENUM'    USING  FD-INT, FILE-INT.

    MOVE  FD-INT  TO  FILE-INT.
    GOBACK.


You can determine the MPE file number of the file.

You could then use the file number to allow other library routines to
access the a file opened with the Cobol OPEN statement.

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

ATOM RSS1 RSS2