× 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.



Forgive me for not looking it up in the manual at this moment. I've found
that sometimes these things are very picky about the reserved space being
all nulls. What you have is one null and some number of blanks. Even if it
doesn't fix your problem, I think inz( *allx'00' ) will clear the whole
Reserved... elements with nulls. Also in ASPToSearch, you end up with
x'0040', not x'0000' and even though it's not used due to search method
x'00', it couldn't hurt to inz it nicer. Again I am not looking at the
manual but that inz looks odd to me.

I think ReqAuth has to have inz(x'8000') (plus whatever authority you want)
to set the highest bit (use extended template). Or am I crosseyed? It's
*after working hours* here.

Stu


On Fri, Oct 22, 2010 at 15:51, <Rick.Chevalier@xxxxxxxxxxxxxxx> wrote:

I am trying to use the RSLVSP MI instruction to check object existence from
a procedure at run time. If the object exists everything is fine. If the
object doesn't exist I get a MCH error. If I understand the documentation
correctly I can set a value in the extended template under the options
section to not return the MCH error and just return a null pointer instead.

When I try this I get MCH5601:
Message . . . . : Template value not valid for instruction.
Cause . . . . . : The location of the value is template with an offset
to
field in bytes X'FFDC', an offset in field in bits X'0001', a length of
field of 128, and an instruction operand number of 2. The reason code is
X'0000'. If the reason code is X'0000', a reason code may not be
available.

Running the value of x'FFDC' through a hex to decimal conversion I get
65,500 which is slightly larger than my field size of 128.

I have searched the RPG archives for an example of using the extended
template but didn't see one. Here is what I have based on my understanding
of the documentation.

d dsUsrIdxDesc ds Qualified
d TypeCode 1a Inz(x'0E')
d SubtypeCode 1a Inz(x'0A')
d ServicePgm 30a Inz('UT1025UI')
d ReqAuth 2a Inz(x'0001')
d TemplateVer 1a Inz(x'00')
d SearchMethod 1a Inz(x'00')
d Options 1a Inz(x'02')
d Reserved1 7a Inz(x'00')
d ASPToSearch 2a Inz(x'00')
d ASPOfContext 2a
d PtrToContext * ProcPtr
d Reserved2 64a Inz(x'00')

Any ideas what I'm missing?


Rick Chevalier




________________________________
Privileged and Confidential. This e-mail, and any attachments there to, is
intended only for use by the addressee(s) named herein and may contain
privileged or confidential information. If you have received this e-mail in
error, please notify me immediately by a return e-mail and delete this
e-mail. You are hereby notified that any dissemination, distribution or
copying of this e-mail and/or any attachments thereto, is strictly
prohibited.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



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.