MCH3401 Cannot resolve to object - IBM AS400

This is a discussion on MCH3401 Cannot resolve to object - IBM AS400 ; I read already many items about this errorcode but I did'nt find a good solution for my problem. I run an RPGLE program CHKSRM01. In that program I call another CLE program (RTVINTADR) with three parameters. I call the program ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: MCH3401 Cannot resolve to object

  1. MCH3401 Cannot resolve to object

    I read already many items about this errorcode but I did'nt find a good
    solution for my problem.

    I run an RPGLE program CHKSRM01. In that program I call another CLE
    program (RTVINTADR) with three parameters.
    I call the program with CAPITAL characters.
    The programs are in the librarylist.
    The CALLSTACK let me see that the programs are all in the default
    activation groupe.
    When I call the second program with parameters on the commandline it
    runs well.

    Below you find some code for information:
    CHKSRM01
    C IF #RTN = 'NORMAL'
    * Als user bestaat moet hij zijn ingeschreven in WRKDIRE Ún een
    Intern
    C CALL 'RTVINTADR'
    C parm ##$SMUSR 10

    C parm *blanks intadrs 40
    C parm *blanks ##Return 8

    RTVINTADR

    PGM PARM(&USRID &INTADRS &RTRN)
    /******************************************+******* ******************/
    /* Declarations */
    /************************************************** ******************/
    DCL &usrid *CHAR 10 /* */
    DCL &intadrs *CHAR 40 /* */
    DCL &RTRN *CHAR 8 /* Returncode */

    when program CHKSRM01 calls RTVINTADR it gives me the wellknown error
    as you see below:

    Message ID . . . . . . : MCH3401 Severity . . . . . . . : 40

    Message type . . . . . : Escape

    Date sent . . . . . . : 06/12/06 Time sent . . . . . . :
    06:51:42


    Message . . . . : Cannot resolve to object . Type and Subtype
    X'0201'
    Authority X'0000'.

    Cause . . . . . : Either a system pointer or a data pointer can not
    be
    resolved.

    For a system pointer, it can not be resolved to object , type and
    subtyp
    X'0201', authorization X'0000', because either the named object was
    not in
    any context referred to or the correct object was located but the
    user
    profile did not have the required authority.

    The object types for common type or subtype codes follow:

    -- 0100-Access group, 0201-Program, 0401-Library,

    -- 0701-Journal receiver, 0801-User profile, 0901-Journal,

    -- 0B90-Data space, 0C90-Data space index, 0D50-Data base file
    member,


    So I changed the authority to both programs to PUBLIC *ALL but nothing
    helps.
    Can you help me????

    Kind regards
    Hammie


  2. Re: MCH3401 Cannot resolve to object


    Hammie wrote:
    > I read already many items about this errorcode but I did'nt find a good
    > solution for my problem.
    >
    > I run an RPGLE program CHKSRM01. In that program I call another CLE
    > program (RTVINTADR) with three parameters.
    > I call the program with CAPITAL characters.
    > The programs are in the librarylist.
    > The CALLSTACK let me see that the programs are all in the default
    > activation groupe.
    > When I call the second program with parameters on the commandline it
    > runs well.
    >
    > Below you find some code for information:
    > CHKSRM01
    > C IF #RTN = 'NORMAL'
    > * Als user bestaat moet hij zijn ingeschreven in WRKDIRE Ún een
    > Intern
    > C CALL 'RTVINTADR'
    > C parm ##$SMUSR 10
    >
    > C parm *blanks intadrs 40
    > C parm *blanks ##Return 8
    >
    > RTVINTADR
    >
    > PGM PARM(&USRID &INTADRS &RTRN)
    > /******************************************+******* ******************/
    > /* Declarations */
    > /************************************************** ******************/
    > DCL &usrid *CHAR 10 /* */
    > DCL &intadrs *CHAR 40 /* */
    > DCL &RTRN *CHAR 8 /* Returncode */
    >
    > when program CHKSRM01 calls RTVINTADR it gives me the wellknown error
    > as you see below:


    what statement is in error? Is the error in the CL program RTVINTADR or
    is it on the RPG CALL to 'RTVINTADR'?

    to help debug you can CHGJOB LOGCLPGM(*YES). Then after you get the
    error you can DSPJOBLOG to see which, if any, CL statements executed.

    Something like this might help in the RPG program, right before the
    CALL:

    ** -------------------- sys_qcmdexc ----------------------------
    d sys_qcmdexc pr extpgm('QCMDEXC')
    d InCmds 256a const
    d InCmdsLx 15p 5 const

    /free
    sys_qcmdexc( 'dsplibl': 256 ) ;
    sys_qcmdexc('chgjob logclpgm(*yes) log(4 00 *seclvl)': 256 ) ;
    sys_qcmdexc( 'dsppgm RTVINTADR': 256 ) ;
    /end-free

    -Steve


  3. Re: MCH3401 Cannot resolve to object

    Eliminate the obvious--sign off and sign on again.

    It it still doesn't work, do WRKOBJ RTVINTADR. You should see a *PGM
    object. If not, you have a compile problem.

    If RTVINTADR is there, STRDBG CHKSRM01. Set a breakpoint on the CALL. Then
    use F14 or F15, I forget which, to load RTVINTADR into memory. Set a
    breakpoint on the first instruction. F12, then CALL CHKSRM01. Step into
    using F22 (shift F10).

    If this doesn't isolate the problem, post your results.

    Sam
    "Hammie" wrote in message
    news:1165385334.279645.216810@j44g2000cwa.googlegr oups.com...
    I read already many items about this errorcode but I did'nt find a good
    solution for my problem.

    I run an RPGLE program CHKSRM01. In that program I call another CLE
    program (RTVINTADR) with three parameters.
    I call the program with CAPITAL characters.
    The programs are in the librarylist.
    The CALLSTACK let me see that the programs are all in the default
    activation groupe.
    When I call the second program with parameters on the commandline it
    runs well.

    Below you find some code for information:
    CHKSRM01
    C IF #RTN = 'NORMAL'
    * Als user bestaat moet hij zijn ingeschreven in WRKDIRE Ún een
    Intern
    C CALL 'RTVINTADR'
    C parm ##$SMUSR 10

    C parm *blanks intadrs 40
    C parm *blanks ##Return 8

    RTVINTADR

    PGM PARM(&USRID &INTADRS &RTRN)
    /******************************************+******* ******************/
    /* Declarations */
    /************************************************** ******************/
    DCL &usrid *CHAR 10 /* */
    DCL &intadrs *CHAR 40 /* */
    DCL &RTRN *CHAR 8 /* Returncode */

    when program CHKSRM01 calls RTVINTADR it gives me the wellknown error
    as you see below:

    Message ID . . . . . . : MCH3401 Severity . . . . . . . : 40

    Message type . . . . . : Escape

    Date sent . . . . . . : 06/12/06 Time sent . . . . . . :
    06:51:42


    Message . . . . : Cannot resolve to object . Type and Subtype
    X'0201'
    Authority X'0000'.

    Cause . . . . . : Either a system pointer or a data pointer can not
    be
    resolved.

    For a system pointer, it can not be resolved to object , type and
    subtyp
    X'0201', authorization X'0000', because either the named object was
    not in
    any context referred to or the correct object was located but the
    user
    profile did not have the required authority.

    The object types for common type or subtype codes follow:

    -- 0100-Access group, 0201-Program, 0401-Library,

    -- 0701-Journal receiver, 0801-User profile, 0901-Journal,

    -- 0B90-Data space, 0C90-Data space index, 0D50-Data base file
    member,


    So I changed the authority to both programs to PUBLIC *ALL but nothing
    helps.
    Can you help me????

    Kind regards
    Hammie



  4. Re: MCH3401 Cannot resolve to object


    Saml schreef:

    > Eliminate the obvious--sign off and sign on again.
    >
    > It it still doesn't work, do WRKOBJ RTVINTADR. You should see a *PGM
    > object. If not, you have a compile problem.
    >
    > If RTVINTADR is there, STRDBG CHKSRM01. Set a breakpoint on the CALL. Then
    > use F14 or F15, I forget which, to load RTVINTADR into memory. Set a
    > breakpoint on the first instruction. F12, then CALL CHKSRM01. Step into
    > using F22 (shift F10).
    >
    > If this doesn't isolate the problem, post your results.
    >
    > Hello

    I did all the things you and your collegue wrote in the answer.
    I know for sure: the program is there and it's in the librarylist
    I debugged both programs. The error is on the CALL statement for
    program RTVINTADR.
    That program in not called because of the error. It's also NOT in the
    programstack.
    And again: when I call that RTVINTADR standalone from the commandline
    with the parameters it's running well!!!!??????

    Who has still another idea????

    Kind Regards
    Jaap


  5. Re: MCH3401 Cannot resolve to object


    Hello

    The next thing I did was the following:

    I changed in the CHKSRM the CALL statement into a CALLB statement.
    After that I first create 2 modules for both the programs and create 1
    program: CHKSRM01.
    And that WORKS!!

    Still I'am wondering why it doesn't work if I use two programs

    Regards Jaap


  6. Re: MCH3401 Cannot resolve to object

    Hammie wrote:

    > The next thing I did was the following:
    >
    > I changed in the CHKSRM the CALL statement into a CALLB statement.
    > After that I first create 2 modules for both the programs and create 1
    > program: CHKSRM01.
    > And that WORKS!!
    >
    > Still I'am wondering why it doesn't work if I use two programs


    So far, you haven't shown us what the whole problem is. You've shown a
    section of your RPG program that issues a CALL to RTVINTADR and the parm
    declarations in RTVINTADR. You also showed some details of the MCH3401
    but not the attributes that tell what program sent the message nor what
    program it was sent to. The part of MCH3401 that you did show us was
    missing the name of the object that couldn't be resolved, so the missing
    info is critical and other info might also be missing.

    If everything works when the two are compiled as modules and bound
    together _AND_ the library containing the RTVINTADR program was in the
    library list when the error message was sent, it could be an
    authorization error. Perhaps the job user didn't have authority to
    RTVINTADR, but it worked for you from a command-line call for CHKSRM01
    because you did have authority.

    Perhaps RTVINTADR attempted to resolve an object and failed and it
    attempted to send the message up the call stack improperly; that might
    explain why the object name was missing from what you showed. We can't
    see what RTVINTADR does in its main processing nor how it handles error
    messages that are sent to it.

    Perhaps many things could be wrong. Without sufficient info, there's no
    good answer.

    Tom Liotta

    http://zap.to/tl400

  7. Re: MCH3401 Cannot resolve to object

    Tom Liotta schreef:

    Hello Tom

    Below you find the complete CLLE program. Nothing special.
    When I debugged the CHKSRM01 program it stops on the line with the
    call. On the same time I had the program RTVINTADR in debugmode. But I
    didn't see any statement of that program...

    1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7
    DCLF FILE(QSYS/QAOSDIRF)
    RTVNETA SYSNAME(&SYSTEM)

    CHGVAR VAR(&RTRN) VALUE('ERROR')
    DSPDIRE USRID(&USRID &SYSTEM) OUTPUT(*OUTFILE) +
    OUTFILE(QTEMP/QAOSDIRF) DETAIL(*FULL) +
    OUTFILFMT(*TYPE2)
    MONMSG MSGID(CPF2204 CPF8006) EXEC(GOTO CMDLBL(EOF))

    OVRDBF FILE(QAOSDIRF) TOFILE(QTEMP/QAOSDIRF)
    RCVF
    MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(EOF))
    IF COND(&DFADD1 *NE ' ') THEN(DO)
    CHGVAR VAR(&RTRN) VALUE('NORMAL')
    CHGVAR VAR(&INTADRS) VALUE(&DFADD1)
    CHGVAR VAR(&usrname) VALUE(&DFDESC)

    I myself had, with the same authority, called the separate program's as
    the prooces with the same authority. So I can't find any problems with
    that.

    The detailmsg description of the error: see below:

    Message ID . . . . . . : MCH3401 Severi
    Date sent . . . . . . : 11/12/06 Time s
    Message type . . . . . : Escape
    >From . . . . . . . . . : NLHAMEJ CCSID


    >From program . . . . . . . . . : #mnrnrl

    Instruction . . . . . . . . : 000458

    To program . . . . . . . . . . : CHKSRM01
    To library . . . . . . . . . : CISPTST53
    To module . . . . . . . . . : CHKSRM01
    To procedure . . . . . . . . : CHKSRM01
    To statement . . . . . . . . : 257

    I don't know which program is: #mnmrl.


    Can you give me some other hints?

    Regards
    Jaap


  8. Re: MCH3401 Cannot resolve to object

    Hammie wrote:
    >
    > when program CHKSRM01 calls RTVINTADR it gives me the wellknown error
    > as you see below:
    >
    > Message ID . . . . . . : MCH3401 Severity . . . . . . . : 40
    >
    > Message type . . . . . : Escape
    >
    > Date sent . . . . . . : 06/12/06 Time sent . . . . . . :
    > 06:51:42
    >
    > Message . . . . : Cannot resolve to object . Type and Subtype
    > X'0201'
    > Authority X'0000'.


    Hammie, it looks like some RPG internal data got corrupted. Normally,
    MCH3401 would look say something like "Cannot resolve to object
    RTVINTADR. Type and Subtype X'0201'" but for your message, the program
    name appears blank.

    The most usual cause of data corruption is mismatched parameters. Does
    your program call another program before it calls RTVINTADR? If so,
    check that the parameter lengths match between the two programs.

+ Reply to Thread