Solved

how to retrieve  source file of user-defind command?

Posted on 2007-11-14
18
806 Views
Last Modified: 2008-03-25
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                        
                                         
                                                             
                                                             
                                                                                                                                           
                                                                               

                                                                   
                                                                               
     
                                                                               



0
Comment
Question by:jingyizou
  • 9
  • 5
  • 2
  • +1
18 Comments
 
LVL 18

Expert Comment

by:daveslash
Comment Utility

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

e.g.

 ===> 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
0
 

Author Comment

by:jingyizou
Comment Utility
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.
0
 
LVL 18

Expert Comment

by:daveslash
Comment Utility

Ok, then first find the object with:

wrkobj *all/chase

0
 

Author Comment

by:jingyizou
Comment Utility
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
0
 

Author Comment

by:jingyizou
Comment Utility
There seems no Chase command, I'm wondering how can I type Chase in command line and get the associated menu showing up?
0
 
LVL 27

Expert Comment

by:tliotta
Comment Utility
jingyizou:

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?

Tom
0
 

Author Comment

by:jingyizou
Comment Utility
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.
0
 

Author Comment

by:jingyizou
Comment Utility
how could I know the source file associated to chase?
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 27

Expert Comment

by:tliotta
Comment Utility
jingyizou:

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.

Tom
0
 

Author Comment

by:jingyizou
Comment Utility
Hey Tom,
Tried both  
DSPMNUA MENU(*CURLIB/G94)
 DSPMNUA MENU(*LIBL/G94)
in G94 menu command line.
and got " Object G94 not found."
Thanks
Jingyi

0
 
LVL 27

Expert Comment

by:tliotta
Comment Utility
Jingyi:

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?

Tom
0
 

Author Comment

by:jingyizou
Comment Utility
I know! Tom.
[WRKOBJ *ALL/GO]

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    
                                                         *SERVICE  





           
                                                                 
 
0
 
LVL 27

Expert Comment

by:tliotta
Comment Utility
Jingyi:

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.

Tom
0
 

Author Comment

by:jingyizou
Comment Utility
Tom,
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?

Thanks
Jingyi

0
 
LVL 27

Accepted Solution

by:
tliotta earned 50 total points
Comment Utility
Jingyi:

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.

Tom
0
 

Author Comment

by:jingyizou
Comment Utility
Thank you for the help Tom!
0
 
LVL 1

Expert Comment

by:Computer101
Comment Utility
Forced accept.

Computer101
EE Admin
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
In this article, I will show you HOW TO: Create your first Windows Virtual Machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, the Windows OS we will install is Windows Server 2016.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now