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



Michael,

Thanks for the suggestion. I had to debug back to the CL and still the CURLIB was PRICELIB, not ADSOE200, as is usual - or is the case immediately before and immediately invoking the menu option.

I'm replying here for the archives only (Forgive me, Father, for I have sinned). The problem was the S36 environment (no comments from the Peanut Gallery, please) procedure on the menu. I just hadn't traced it back far enough before I posted my message. Like Bob said once, "You can get hurt working in the /36 environment." He's right, of course, but I have no choice - for the moment.

Thanks.

        * Jerry C. Adams
*iSeries Programmer/Analyst
B&W Wholesale Distributors, Inc.* *
voice
        615.995.7024
fax
        615.995.1201
email
        jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx>



Michael Ryan wrote:

Debug the program and put in a breakpoint right before the program call.
Display your library list then and make sure it's correct. Looks like
something is changing your library list.

On 3/24/06, Jerry Adams <jerry@xxxxxxxxxxxxxxx> wrote:
I have a problem with which I hope someone can help.

When I run a program with a call to another program I am getting a halt:

Error occurred while calling program or procedure *LIBL/ADX002

Previous messages in the joblog:
Cannot resolve to object ADX002. Type and Subtype X'0201' Authority
 X'0000'.
Function check. MCH3401 unmonitored by OVR002 at statement 0000000080,
 instruction X'0000'.


Why can't the ADX002 program be found?


The relevant (I think) code is:



D ADX002          PR                  EXTPGM('ADX002')
D  Company                      30A
D  Report                       30A

/free
ADX002(@company:@report);


Not that it should matter but both programs are RPG IV.


When I use the WRKOBJ command, it shows that the program (ADX002) is in
my library list (below).

                               Work with Objects

   Type choices, press Enter.

   Object . . . . . . . . . . . . . OBJ          > ADX002
     Library  . . . . . . . . . . .                  *LIBL
   Object type  . . . . . . . . . . OBJTYPE      > *PGM


                                 Work with
   Objects


   Type options, press
   Enter.
     2=Edit authority        3=Copy   4=Delete   5=Display authority
   7=Rename
     8=Display description   13=Change
   description


   Opt  Object      Type      Library     Attribute
   Text
        ADX002      *PGM      ADSOE200    RPGLE       Retrieve
   Company/Report Nam




If I change the prototype to use "EXTPGM('ADSOE200/ADX002')", it works
fine.

The only out of the ordinary thing is that the main program is run from
a menu that resides in a library that is not normally in my library
list.  I get to the menu using: GO PRICELIB/PCOVER.  The menu option
invokes the main program using: CALL PGM(PRICELIB/OVR002C).  The CL
(OVR002C) looks like:

   PGM
   DCL        VAR(&PREFIX) TYPE(*CHAR) LEN(1)
   DCL        VAR(&FILE)   TYPE(*CHAR) LEN(10)

   RTVDTAARA  DTAARA(*LDA (1 1)) RTNVAR(&PREFIX)
   CHGVAR     VAR(&FILE) VALUE(&PREFIX *TCAT '.ADTAB1')
   OVRDBF     FILE(ADTAB1) TOFILE(&FILE)
   OVRDBF     FILE(STRULE) TOFILE(PRICELIB/STRULE)

   OVRPRTF    FILE(OVR002P) TOFILE(OVR002P) DEV(PF)             +
                PAGESIZE(66 80) LPI(6) CPI(10) PAGRTT(0)        +
                SPOOL(*YES) FORMTYPE(*STD) SPLFNAME(STRULES)

   CALL       PGM(PRICELIB/OVR002)

   ENDPGM

I hope that I have included all of the necessary bits and pieces.  I
can, of course, leave the library hard-coded, but I don't like doing that.

The called program (ADX002), by the way, is a general utility that has
been in production for over a year.  The call to it works fine when used
in our normal menu set whether called from an RPG IV or RPG II (don't
get me started) program.


Thanks.
--
       * Jerry C. Adams
*iSeries Programmer/Analyst
B&W Wholesale Distributors, Inc.* *
voice
       615.995.7024
fax
       615.995.1201
email
       jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx>


--
This is the RPG programming on the AS400 / iSeries (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 ...

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.