QMHSNDPM API

QMHSNDPM API

Post by Njal Fisketjon (Nj?l Fisketj » Sat, 17 May 1997 04:00:00





Quote:>In using the Send Message API (V3R2), I've noticed an oddity and was
>wondering if this is a bug or if there is a valid reason for it.

>If I initialize the Stack parm (4 byte binary) as a standalone field, I
>get all sorts or errors saying there are large numbers in the parm (like
>282000) even though it shows 2 or 3 or whatever I put into it both
>before and after the call when I look at it in debug.

>If I initialize the same variable inside a datastructure, it works
>fine.  What's different?
>--

It depends on how you define the stand alone field.
A stand alone binary field should be defined as 9b 0 (or 10i 0) to
occupy 4 bytes.
 
 
 

QMHSNDPM API

Post by The TEAMIBM Netwo » Sat, 17 May 1997 04:00:00


You already have the basic answer to your question - but let me
suggest an improvement. Since you are on V3R2 you can use the I (Signed
Integer) and U (Unsigned Integer) data types - these are true binary
types.

Type B is not a true binary since it is constrained to the equivalent
of a 4 or 9 digit field - this can cause problems when working with APIs
that return larger values.



 
 
 

QMHSNDPM API

Post by Helmut Salze » Sat, 17 May 1997 04:00:00


It's always the same trap: When you define the binary field inside a data
structure the field is 4 BYTE (!!!) long. When you define the field as a
stand allone field, you must define it with  9 B ---> with other words: A
binary field with length 9 will take 4 byte storage !!!

Greetings
--
Helmut Salzer

webmaster  Profi Reifen Service Ges.m.b.H.

           http://www.profi-reifen.co.at/profi/

           http://members.ping.at/salzer.h/as400.htm



> In using the Send Message API (V3R2), I've noticed an oddity and was
> wondering if this is a bug or if there is a valid reason for it.

> If I initialize the Stack parm (4 byte binary) as a standalone field, I
> get all sorts or errors saying there are large numbers in the parm (like
> 282000) even though it shows 2 or 3 or whatever I put into it both
> before and after the call when I look at it in debug.

> If I initialize the same variable inside a datastructure, it works
> fine.  What's different?
> --
> Nelson Smith
> Haines City, FL, USA


 
 
 

QMHSNDPM API

Post by Scott Klemen » Sat, 17 May 1997 04:00:00


I'm not sure what you're up against, here... but if you're using
ILE RPG/400, you may be encoutering the error if you're defining
your field as a standalone field with data type 4B 0.

The reason is because the 4 does not specify how many bytes the field
is, but how many digits it can store.  (I think that was a stupid way
of doing it, but thats what IBM did)

So when you define a data structure of Start Pos 1, End Pos 4, you
get 4 bytes, which is equivilent to a standalone field defined as
being 9B 0.

Does that help at all?


> In using the Send Message API (V3R2), I've noticed an oddity and was
> wondering if this is a bug or if there is a valid reason for it.

> If I initialize the Stack parm (4 byte binary) as a standalone field, I
> get all sorts or errors saying there are large numbers in the parm (like
> 282000) even though it shows 2 or 3 or whatever I put into it both
> before and after the call when I look at it in debug.

> If I initialize the same variable inside a datastructure, it works
> fine.  What's different?
> --
> Nelson Smith
> Haines City, FL, USA


 
 
 

1. Send Programm Message (QMHSNDPM) API - Pointer Question.

Hello,

I'm using       the Send Programm Message (QMHSNDPM) API to send
message's to my program itself by using the following parameters:

Call Stack Entry = '*PGMBDY'
Call Stack Counter = 0

or to the prior program on the call stack with:

Call Stack Entry = '*PGMBDY'
Call Stack Counter = 0

BUT NOW I'd like to send a message
to a program SOMEWHERE ON THE CALL STACK
by using:

Call Stack Entry = Pointer Receiving Program

QUESTIONS:
* How to get the Pointer of the Receiving Program?
* How to use Optional Parameter Group 1?
* Can somebody proviode me an RPGLE example?

Thanks ... Ron

--

2. Discussion Group Time Warp

3. QMHSNDPM API

4. Frontier shared menu not working with CW9?

5. MC68302 Performance Data

6. 'QMHSNDPM' API

7. Any chance of a GBA emulator for a SA Risc PC?

8. API QMHSNDPM: Where to send msg to, to end up in the JOBLOG?

9. API QMHSNDPM

10. RPGLE: DSPLY, API QMHSNDPM ... other suggestions?

11. QMHSNDPM in CLP PROGRAM: Need sample program

12. QMHSNDPM & QMHRCVPM