We help IT Professionals succeed at work.

RPG III program will not execute inside a RPG IV program  (error message:  MCH3401)....

I am trying to call a rpg III program and it is failing.  The parent program is RPG IV and I am running "Turnover" on the iSeries v5r4.  "dsr596dbe" is the name of the RPG III program.

The things I have tried:  1.  Made sure that my library is in the library list.  2.  Switched from lower to upper case with the rpg call.
c                 call      'dsr596dbe'                      
c                 parm                    #bdte              
c                 parm                    #edte              
c                 parm                    cus                
c                 parm                    #tdbe              
c                 parm                    #rcst             1
c                 parm                    #cdbei            3
c                 parm                    #cdbeo            3


Message ID . . . . . . :   MCH3401       Severity . . . . . . . :   40        
Message type . . . . . :   Diagnostic                                         
Date sent  . . . . . . :   06/15/10      Time sent  . . . . . . :   09:21:19  
                                                                              
Message . . . . :   Cannot resolve to object dsr596dbe. 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 dsr596dbe, type and
  subtype 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.

Open in new window

Comment
Watch Question

Gary PattersonVP Technology / Senior Consultant

Commented:
Switch to caps and drop the single quotes.  Recompile.

- Gary Patterson

Author

Commented:
I have tried it both ways upper and lower case.

Author

Commented:
FOUND SOLUTION:

The program "Turnover" removes your new manual entries of libraries from the "Library List" (WRKLIBPDM) when you exit "Turnover".  Therefore make sure your sysadmin of "Turnover" has the libraries that you need permanently in the listing.
VP Technology / Senior Consultant
Commented:
Does the user profile that you are running under (at runtime) have  rights to execute program DSR596DE?

Silly things to check:  

Is the program name spelled right?  596/569 is an easy transposition, for example.
Does something in the runtime job change the library list in a way that removes your lib? When you get the error, look at the job's libl right then.


- Gary Patterson
Gary PattersonVP Technology / Senior Consultant

Commented:
Glad you figured it out!

- Gary