HP3000-L Archives

May 1998, 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:
Michael Anderson <[log in to unmask]>
Reply To:
Date:
Tue, 26 May 1998 13:01:03 +0000
Content-Type:
text/plain
Parts/Attachments:
text/plain (65 lines)
*** Retransmission ***

Nous avons eu un problème de distribution de votre courrier électronique

Nous vous le transmettons à nouveau

PS: Ne pas tenir compte de ce message si vous l'aviez déjà reçu.

Merci

Eddy Beliveau, Ecole HEC, 514-340-6073, [log in to unmask]

I just want to says thanks to all that replied to my plea for help. The
Native mode code is working great. For those who are interested in
trivial gottcha's related to CM to NM conversions, read on.

BTW, I'm not trying to pass the FDNAME to a subprogram, I need to move
it to another item in working storage. Back in 1991, HPRC recommended
that I write a COBOL subprogram to do the MOVE, by using the FD name as
an argument and the file number as a return item. Ea: CALL "GETFD" using
FNUM \FDNAME\. Even though the COBOL manual (May 1989) did not support
this call syntax when calling another COBOL subprogram. The FDNAME would
be received by the subprogram (GETFD) as a 32 bit address that points to
the location in the stack where the MPE file number really is. The
subprogram would then call the ".LOC." intrinsic with a "@" atsign in
front of the 32 bit address of the FDNAME, indicating the byte address
of the 32 bit address being passed to the ".LOC." intrinsic. The ".LOC."
intrinsic would then return the actual value of the MPE file number,
multiplied by 2. So I'd need to divide it by 2 for the real MPE file
number.

Anyway, the MPE/V subprogram code looked liked this:

    MOVE ZERO TO FILENUM.
    CALL INTRINSIC ".LOC." USING @FDNAME GIVING X.
    COMPUTE FILENUM = ( X / 2 ).

 Sounds crazy, but it works, first time, every time, consistently. It's
still working on MPE/iX 5.5 pp4, in Compatibility Mode, but not in
Native Mode.

While converting various applications from PROG’s to NMPRG’s, I have had
to re-live this problem. The solution (Thanks to some hints from this
list) is simple:

1. Change 'CALL “GETFD” USING FNUM \FDNAME\.' to 'CALL “GETFD” USING
FNUM BY CONTENT FDNAME'.
2. Change the receiving item of the FDNAME from 32 bit to 16
3. Then delete the call to the “.LOC.” intrinsic, and the divide by 2,
replacing it with a MOVE FDNAME to FNUM.

The MPE/iX (NM) subprogram code looked liked this:

MOVE FDNAME to FNUM.

FYI, It seems that using COBOL II/iX(ANSI85), on MPE/iX 5.5, you can't
move an FDNAME into another 16 bit item in Working Storage, without
writing a subprogram.

Thanks again,
--
Michael Anderson.
Systems Programmer
TIW Corporation, Houston, Texas

ATOM RSS1 RSS2