HP3000-L Archives

July 2001, Week 4

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:
"Shahan, Ray" <[log in to unmask]>
Reply To:
Shahan, Ray
Date:
Tue, 24 Jul 2001 13:45:21 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (107 lines)
THANKS!!!!  That was the ticket (the SHARE parm).  Crap, I didn't see that
anywhere in the COBOL manual, and never thought to look at the L INK edit
manual since the code compiled and ran, but didn't work.  I was ready to
turn into an axe murderer!!

I hope like hell I can remember that the next time I try this
stunt...probably several years from now!

Again, thanks for the tip...(also, love the @MYSELF.COM address...)

> -----Original Message-----
> From: Ken Hirsch [SMTP:[log in to unmask]]
> Sent: Tuesday, July 24, 2001 1:26 PM
> To:   Shahan, Ray; [log in to unmask]
> Subject:      Re:      COBOL
>
> This works fine for me if the subroutine and main are linked together in
> the
> program file.  If the subroutine is in an XL, you have to use the ;SHARE
> option when you do ADDXL and when you LINK the program.
>
> ----- Original Message -----
> From: "Shahan, Ray" <[log in to unmask]>
> To: <[log in to unmask]>
> Sent: Tuesday, July 24, 2001 12:54 PM
> Subject: COBOL
>
>
> > Hi all,
> >
> > I'm trying to (in a hurry), use the EXTERNAL clause on a WS 01 level for
> > passing some subprog info, but while it appears to work in as much as
> the
> > run unit executes, I don't seem to be getting any data in the sub from
> the
> > main.
> >
> > I've included a snippet of both source codes, so can you please give a
> look
> > and see what/if I'm missing something...thanks all.
> >
> > MAIN:
> >
> >  WORKING-STORAGE SECTION.
> >   01 ABC                   EXTERNAL   PIC X(10).
> >   01  XREF-ARRAY                      IS EXTERNAL.
> >       05  XREF-TABLE-SIZE-SW          PIC S9(04) COMP.
> >           88  XREF-TABLE-SIZE                         VALUE 10.
> >       05  XREF-TABLE                  OCCURS 10 TIMES
> >                                       INDEXED BY XREF-IDX.
> >           10  XREF-ENTRY              PIC S9(04) COMP.
> >
> >   01  FIELD-1                         PIC 9(1) VALUE 1.
> >   01  FIELD-2                         PIC 9(1) VALUE 8.
> >
> >  /
> >   PROCEDURE DIVISION.
> >
> >   0000-START.
> >
> >       MOVE "ABCDEFGHIJ"           TO ABC.
> >       SET XREF-TABLE-SIZE         TO TRUE.
> >       PERFORM VARYING XREF-IDX FROM 1 BY 1
> >       ;       UNTIL   (XREF-IDX > XREF-TABLE-SIZE-SW)
> >       ;   SET XREF-ENTRY(XREF-IDX) TO XREF-IDX
> >       END-PERFORM.
> >         CALL "IQ2" USING FIELD-1.
> >
> > SUB:
> >
> > WORKING-STORAGE SECTION.
> >
> > 01  ABC                    EXTERNAL PIC X(10).
> > 01  XREF-ARRAY                      IS EXTERNAL.
> >     05  XREF-TABLE-SIZE-SW          PIC S9(04) COMP.
> >         88  XREF-TABLE-SIZE                         VALUE 10.
> >     05  XREF-TABLE                  OCCURS 10 TIMES
> >                                     INDEXED BY XREF-IDX.
> >         10  XREF-ENTRY              PIC S9(04) COMP.
> >
> >     01  FIELD-2                     PIC 9(01)  VALUE 1.
> >
> > LINKAGE SECTION.
> >     01  FIELD-1                     PIC 9(01).
> >
> >  PROCEDURE DIVISION USING FIELD-1.
> >
> >  0000-START.
> >
> >      DISPLAY " "
> >      DISPLAY "BEGIN DISPLAY OF EXTERNAL ARRAY"
> >      DISPLAY "'" ABC "'"
> >      DISPLAY "'" XREF-ARRAY "'".
> >
> > ANSWER:
> >
> > BEGIN DISPLAY OF EXTERNAL ARRAY
> > ''
> > ''
> >
> > * To join/leave the list, search archives, change list settings, *
> > * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
> >

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

ATOM RSS1 RSS2