× 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: Resolving to QTEMP + Template Mappings.
  • From: Chris.2.Roberts@xxxxxx
  • Date: Thu, 27 Jul 2000 12:19:32 +0100



I've got two questions which I hope someone out there can help me on (I'm new to
MI and just learning!). I'm running OS/400 V4R4.

1) Resolving to QTEMP.

I'm trying to resolve to QTEMP using the MI Builtins. Within C, I can use the
rslvsp() MI function to resolve to an object in QTEMP. According to the manual,
it does this by resolving to the Context (QTEMP) and then to the object. This
works fine for all objects and contexts (including QTEMP).

    _SYSPTR           pgm_ptr;
    pgm_ptr = rslvsp(_Program,  "MYOBJ", "QTEMP", _AUTH_UPDATE);


I have attempted to convert this into RPG MI Builtins using _RSLVSP2 to resolve
to the context first then _RSLVSP4 to resolve to the object. The _SYP variables
are declared as pointers and LibParm and ObjParm hold the object and library
names to resolve to.


   c                   callp     rslvsp2(ctx_SYP : x'0401' + LibParm +
   Resolve to Context
   c                             '                    ' + x'0000')
   (i.e. Library)
   c                   callp     rslvsp4(obj_SYP : x'0201' + ObjParm +
   Resolve to Object
   c                             '                    ' + x'0100' : ctx_SYP)


The RPG works fine for rslvsp2 for a permanent object context (i.e. QSYS, QGPL)
but when I try QTEMP, I get the following errror:

   Cannot resolve to object QTEMP. Type and Subtype X'0401' Authority X'0000'.
Does anyone have an idea what I'm doing wrong? I have also tried different
authority types but get the same error.

The only alternative I can think of to get QTEMP is to find the PCO (using
PCOPTR, get the SEPT and then offset 65 to find the address of QTEMP). But I'm
not sure if this will change to point to a job QTEMP if I service another job
via STRSRVJOB.


2) Creation Templates, etc.

The OS/400 Diagnostic aids refer to Creation Templates, Materialization
templates and Object Content Mapping for each object type. Where can I find
further details of the templates and mappings for each object?


Thanks

Chris.

--
Chris Roberts (mailto:Chris.2.Roberts@sb.com).
IR Standard Applications, SmithKline Beecham PLC,,
c/6 SB House, Great West Rd., Brentford, Middlesex, TW8 9BD, UK.

DISCLAIMER: The views contained herein are those of the author
            and not of my employer, its subsidiaries or affiliates.


+---
| 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:

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.