× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: Convert an MI program to RPG
  • From: "Bill" <bubbzbill@xxxxxxxxx>
  • Date: Tue, 18 Jul 2000 08:07:39 -0700

Well, OK, I'll stay public with this.  Yes, you are correct, the problem is
in the RslvSP call.  Here is the dump:

 @OBJ                  POINTER              SPP:*NULL
 LIBNAME               CHAR(10)             'QUERYLIB  '
'D8E4C5D9E8D3C9C24040'X
 OBJNAME               CHAR(10)             'SDBOOKCOS '
'E2C4C2D6D6D2C3D6E240'X
 OBJTYPE               CHAR(2)              '  '             '1911'X
 RSLVOBJ_T             DS
   INTLIBNAME          CHAR(31)             'QUERYLIB
'
                       VALUE IN HEX
'D8E4C5D9E8D3C9C20040404040404040404040404040404040404040404040'X
   INTOBJNAME          CHAR(31)             'SDBOOKCOS
'
                       VALUE IN HEX
'E2C4C2D6D6D2C3D6E200404040404040404040404040404040404040404040'X
   INTOBJTYPE          CHAR(4)              '    '           '19114040'X
   REQAUTH             CHAR(4)              '    '           '00000000'X
 RTNCODE               CHAR(1)              '1'              'F1'X
 SPCPTR                POINTER              SPP:*NULL

As I look at the dump, I see everything is aligned as I would expect them to
be.

> on VRM440 with Cume 0049440.  From your comment about the object name, I
guess you
> haven't done much MI.

You are correct.  The only MI I have done is to copy down what someone (Phil
Hall) had done for me, which was the original program that I am now wanting
to convert into RPG.

> If you check the MI reference you will see that the rsvlsp MI instruction
expects operand
> 2 to be a structure having a 1-byte object type, a 1-byte subtype, a
30-byte name, and a
> 2-byte authorization.  If you apply that layout to the invalid data above
you get:
>
>      Ty St      Name Auth
> >    20 00 E2C4C2D6D6D2C3D6E2404040404040404040404040404040404040404040
0000
>
> Not only does MCH5003 tell you the problem is the first field but you can
see the name
> and auth are in the correct place.  The 'two byte offset' you mention is
the type and
> subtype.  Type x'20' subtype x'00' is a SOM object which is an invalid
object type for
> the external version of rslvsp.  I assume you are trying to resolve to a
program object
> which is type x'02' subtype x'01'
>
> Fix the object type and the code should work.
>

Then I am really confused.  From your explanation, it sounds as if you are
saying that the combination of the object type and object name are the
second parameter.  But this is not how you coded the function, nor how it
was prototyped.  The hex representation of the object type is in parameter 1
and the object name is in parameter 2.  If they are both in parameter 2,
what is in parm1?

This is from the MI Reference manual:  _SYSPTR rslvsp (_OBJ_TYPE_T obj_type,
_OBJ_NAME obj_name,   _LIB_NAME lib_name,              _REQ_AUTH auth);

This clearly shows type and name as seperate parms.  What am I missing?

Bill




__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
+---
| This is the MI Programmers Mailing List!
| To submit a new message, send your mail to MI400@midrange.com.
| To subscribe to this list send email to MI400-SUB@midrange.com.
| To unsubscribe from this list send email to MI400-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: dr2@cssas400.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.