HP3000-L Archives

January 1999, Week 1

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:
"Glenn J. Koster, Sr." <[log in to unmask]>
Reply To:
Date:
Tue, 5 Jan 1999 13:51:53 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (61 lines)
John Vestal asked...

> I have just been asked about how to call a NM XL routine from a CM
> program.  The answer is "switch stubs."  My question, how do you
> create switch stubs?

If you are going to call a NM routine from a CM program, you don't need
to create a switch stub.  However, you will need to call the HP
Intrinsic "HPSWTONMNAME" (see the "Switch Programming User's Guide" for
details).

Basically, the call (from COBOL) would be as follows:

        CALL INTRINSIC "HPSWTONMNAME" USING NM-PROC-NAME,
                                            NM-PROC-LEN,
                                            NM-LIB-NAME,
                                            NM-LIB-LEN,
                                            NM-NUMBER-OF-PARMS,
                                            NM-ARG-LIST,
                                            NM-ARG-DESCRIPTION,
                                            NM-FUNCTION-TYPE.

        NM-PROC-NAME (Byte array) contains the name of a valid NM
                     routine.
        NM-PROC-LEN  (Integer value) contains the length of the
                     procedure name
        NM-LIB-NAME  (Byte array) contains the FULLY-QUALIFIED
                     name of the XL to search
        NM-LIB-LEN   (Integer) contains the length of the
                     library name
        NM-NUMBER-OF-PARMS (Integer) contains the number of
                     parameters that will be passed to the NM rtn
        NM-ARG-LIST  (Integer array) contains the actual parameter
                     values to be passed (concatenated)
        NM-ARG-DESC  (Integer array) describes each of the parameters
                     in NM-ARG-LIST (see the manual)
        NM-FUNCTION-TYPE (Integer) indicates the type of variable
                     that will be returned if the called procedure
                     is truly a function.

Keep in mind you have to know which parameters are passed by value and
which are passed by reference.

Glenn




--
 ______________
|  Navigators  | Under contract to Hewlett-Packard ISG (Greeley, CO)
|     |)       |
|     | )      | Glenn J. Koster, Sr.             [log in to unmask]
|     |  )     | Managed Business Solutions    http://www.mbsnav.com
|     |   )    | 214 S. College, Suite 201              970 350-5337
|     |----    | Fort Collins, CO  80524                970 224-1016
| ============ |
| \__________/ |
|   of Change  | aka:  [log in to unmask]
|______________| home: http://members.aol.com/MichiTex

ATOM RSS1 RSS2