how to retrieve source file of user-defind command?

I can type "Chase" in command line of certain menu and get the customized user screen.  See below
1) Type CHASE in command line and hit enter
 G94                      TEST                                      400  
                                Security Officer                                
    ... USER SECURITY                     ... TECHNICAL SECURITY                
     2.  User Information                 14.  JDE System Values                
     3.  Menu Locks                       15.  Change User Profile Ownership    
     4.  Action Code                      16.  Library List Control            
     5.  Cost Center/Business Unit        17.  Software License Manager        
     6.  Name Search Type                 18.  Object List Overrides            
     7.  Batch Approval/Post              19.  Database Audit Manager          
     8.  Report Version                                                        
     9.  Review User                                                            
    10.  Function Keys                                                          
    11.  User Defined Codes                                                    
    12.  User License Types
 Selection or command                                                          
 ===> CHASE                                                    
2) I  get the following screen  

   ... Positive Pay Interface                                
    2. Build Transfer File                                  
    3. Transfer File to PC Diretory                          
    4. Display Checks to Transfer                            
    5. Remove Old Transfers                                  
    6. Work with Transfer Files

I think Chase is the user-defined command, but I seem not be able to find such command on our system.
How can I retreive the source file behind this command Chase                        


Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

tliottaConnect With a Mentor Commented:

To locate subsystem info, first determine what subsystem your job runs in. This would likely be QINTER on a default configuration, but could be any subsystem.

DSPJOB OPTION(*STSA) to show current job status will show the subsystem about two-thirds down the screen. Then use DSPSBSD SBSD( MySbs ) to bring up the subsystem options menu.

Option 7=Routing entries

The routing entries don't seem to be relevant since QCMD shows as the highest level program in your program stack, but it's common to have a different routing program that issues a TFRCTL to QCMD as the last step. The TFRCTL would remove the actual routing program from the stack and replace the entry with QCMD. To be certain, the list of routing entries should be reviewed.

Your program stack seems reasonable. It shows the system command-line functions at the bottom, rather than a custom program that processes entries. A [GO] command should result in access of a *MENU object.

But your initial program is still in the stack, so it has actual control. It can set up the environment any way it chooses. For example, it could set an override to the QCPFMSG message file so that messages have different results. An *ESCAPE message can have the DFTPGM() attribute assigned so that a custom program is called when the message is sent, or a condition-handler might be assigned within the job.

In other words, standard system functions can be customized to react any way the programmer wants. G94 might not be a *MENU object, but it might not matter as long as it's referenced in the right job environment.

This implies that J98INITA, J98INITV, P00MENU and J00CMDA all might alter how things work on your system.

I can't say that I like that; it can seriously confuse things without some good and obvious documentation. If system defaults are modified, the joblog and possibly the audit journal ought to have entries that tell what happened. I would always generate log entries if I did such a change to a job. That makes it possible for others (such as you) to know what happened in the job.

You might have no choice but to review all source down through those programs in your stack.

In the meantime, the routing entries could also provide a clue. And there might be something simple that hasn't been mentioned yet. Maybe someone else can add suggestions before this gets too far into strange territory.

Dave FordSoftware Developer / Database AdministratorCommented:

Do a dspcmd and note the "program to process command"


 ===> DspCmd chase

Command  . . . . . . . :   CHASE       Library  . . . . . . . :   USRGPL
Program to process command . . . . . . :   CHASEPGM                      
  Library  . . . . . . . . . . . . . . :     MYLIB                      
  State used to call program . . . . . :     *USER                        
Source file  . . . . . . . . . . . . . :   QCMDSRC                        
  Library  . . . . . . . . . . . . . . :     MYLIB                      
Source file member . . . . . . . . . . :   CHASE
jingyizouAuthor Commented:
Tried above solution and got Object CHASE in library *LIBL not found.  
Somebody else wrote this program, I don't know which library it resides.
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Dave FordSoftware Developer / Database AdministratorCommented:

Ok, then first find the object with:

wrkobj *all/chase

jingyizouAuthor Commented:
wrkobj *all/Chase returns the following:

Opt  Object      Type      Library     Attribute   Text                      
      CHASE       *DTAARA   MODJDEOBJ               Chase Positive Pay Next Num
      CHASE       *OUTQ     QGPL                    Print Queue for J.P.Morgan
jingyizouAuthor Commented:
There seems no Chase command, I'm wondering how can I type Chase in command line and get the associated menu showing up?

Most direct answer would be that you aren't typing on a command line; you're typing into an entry field of a display file and the program that reads that entry field knows what to do when you type [CHASE].

If you type [go main] and press [Enter], do you arrive at the system MAIN menu? If you are at the system MAIN menu and you type [CHASE] and press [Enter], do you arrive at the CHASE menu?

jingyizouAuthor Commented:
If I type [go main] and press [Enter], I do arrive at the system MAIN menu
Then type [CHASE] and press [Enter]  I  get " Command CHASE in library *LIBL not found. "
G94 is the menu that [chase] works. as long as i type
[go g94] and press [ENTER]
then [CHASE], I'd always arrive chase menu.
jingyizouAuthor Commented:
how could I know the source file associated to chase?

This indicates to me that [CHASE] isn't a command at all, but rather it's a short-cut that's built into whatever program displays the G94 menu. I would start by assuming that G94 is a type *PGM menu. This could be verified by:

 ==>  dspmnua  g94

...rather than [go g94]. If it's a type *PGM menu, then you will need the source for that menu program to know what [CHASE] actually does. I can't think of any other alternatives off the top of my head.

jingyizouAuthor Commented:
Hey Tom,
Tried both  
in G94 menu command line.
and got " Object G94 not found."


Well, now it's even more confusing. The [GO] command should work for objects of type *MENU. If you can enter [go g94] and not receive an error message, then G94 ought to be a *MENU...

This might take some thought.

1. What shows when you enter [WRKOBJ *ALL/GO]?
2. What shows when you enter [WRKOBJ *ALL/G94]?
3. Do you have *ALLOBJ special authority available?

jingyizouAuthor Commented:
I know! Tom.

Opt  Object      Type      Library     Attribute   Text        
      GO          *CMD      QSYS                    Go to Menu  
      GO          *CMD      QSYSV5R2M0              GO TO MENU  
      GO          *CMD      QSYSV5R3M0              GO TO MENU  

enter [WRKOBJ *ALL/G94]                                              
 (Cannot find object to match specified name.)  

Below is special authorities of my profile

 Special authority  . . . . . . . . . . . . :   *ALLOBJ    


When you signon, do you arrive at a system menu or are you in an application? Do you have an initial program specified in your user profile? Do you have an initial menu?

When you signon, what subsystem do you run in? Are there special routing programs for that subsystem? If you run [DSPJOB OPTION(*PGMSTK)] at the first command line, what shows for RqsLvl and Program/Procedure?

There are many layers that can cause customized results.

jingyizouAuthor Commented:
I was going to tell you that I logged on as qsecofr and type [go G94] and it didn't work.
 Object G94 in library *LIBL not found.
I made sure qsecofr lib. list has all the libraries of my profile.
Following are answers to your questions above
When I signon, I'm in an application not system menu
My profile has initial program J98INITA, first  menu Main
[DSPJOB OPTION(*PGMSTK)] returns following screen
     QCMD       QSYS                     /04F3              
    J98INITA   JDFOBJ        13700      /00EB              
    J98INITV   JDFOBJ                   /00D3              
    P00MENU    JDFOBJ                   /02F7              
    J00CMDA    JDFOBJ        12100      /00CB              
    QCMDEXC    QSYS                     /012F              
    QMNWRKXX   QSYS                     /029C              
 1  QUIMGFLW   QSYS                     /04C8              
 2  QUICMD     QSYS                     /048D              

How could i find subsytem information?


jingyizouAuthor Commented:
Thank you for the help Tom!
Forced accept.

EE Admin
All Courses

From novice to tech pro — start learning today.