Difference between revisions of "Service Entry Point"

From MidrangeWiki
Jump to: navigation, search
m (remove tips link)
(nomenclature cleanup)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:WDSC]]
 
  
*The following is a tip declaring how to debug CGI (or any other ILE) Pgms via WDSC's SEP (Service Entry Point) functionality.   
+
*The following is a tip demonstrating how to debug CGI (or any other ILE) programs via the RDi (and WDSC) SEP (Service Entry Point) functionality.   
 
*After right clicking on the PGM to set a SEP, it will of course be added to the SEP view.   
 
*After right clicking on the PGM to set a SEP, it will of course be added to the SEP view.   
 
*When you run the program debugging should start, BUT sometimes debug doesn't start.   
 
*When you run the program debugging should start, BUT sometimes debug doesn't start.   
  
*One possible reason being is because the debug isn't running under your iSeries profile (e.g. JSMITH) and is instead running under QTMHHTP1.   
+
*One possible reason being is because the debug isn't running under your IBM i profile (e.g. JSMITH) and is instead running under QTMHHTP1.   
 
*Right click on the SEP in the SEP view that was just created and select Modify and change the user from JSMITH to QTMHHTP1.   
 
*Right click on the SEP in the SEP view that was just created and select Modify and change the user from JSMITH to QTMHHTP1.   
*Now run the CGI program again and it '''SHOULD''' bring up the iSeries Debugger in WDSC.  
+
*Now run the CGI program again and it '''SHOULD''' bring up the Debugger in RDi / WDSC.  
  
 
If it still does not, read on.
 
If it still does not, read on.
*Another reason, why your debug session wouldn't start, could be if your user profile (i.e. the one you used in your iSeries connection - JSMITH here) neither has *ALLOBJ special authority nor *USE authortiy to the target *USRPRF object (QTMHHTP1 in this example)
+
*Another reason, why your debug session wouldn't start, could be if your user profile (i.e. the one you used in your IBM i connection - JSMITH here) neither has *ALLOBJ special authority nor *USE authority to the target *USRPRF object (QTMHHTP1 in this example)
  
 
*Yet another reason, if you recompile your program, the SEP becomes invalid. But there is an easy solution: Select your SEP in the SEP view and click the "Refresh service entry points" button. Just don't forget about it.
 
*Yet another reason, if you recompile your program, the SEP becomes invalid. But there is an easy solution: Select your SEP in the SEP view and click the "Refresh service entry points" button. Just don't forget about it.
  
*Yet another reason, is if you have done a 'green screen' STRDBG.  If debug is already active the WDSCi debug session wont start. [[User:FKOL|FKOL]] 21:56, 30 January 2008 (CST)
+
*Yet another reason, is if you have done a 'green screen' STRDBG.  If debug is already active the RDi / WDSC debug session wont start. [[User:FKOL|FKOL]] 21:56, 30 January 2008 (CST)
  
  
Line 21: Line 20:
 
*The difference is that you will see a prompt which allows you to modify the user profile (as well as program, module or procedure name, if they were different from the source member name you right clicked).
 
*The difference is that you will see a prompt which allows you to modify the user profile (as well as program, module or procedure name, if they were different from the source member name you right clicked).
  
 +
 +
By default, when SEP is used to debug a program that is repeatedly called (like an external SQL UDTF), the debugger will stop as expected only during the very first program call.  There is an option to terminate the debugger session; changing this will allow the debugger to stay active through all invocations of the program.  Remember to manually terminate the debug session when the program truly runs to completion.  Run/Debug > IBM i Debug > Terminate debug session on program completion.
  
  
Line 30: Line 31:
  
 
Here is a video tutorial: [http://rpg-xml.com/video/RXS_WDSC_WEBSRV_DEBUG_SEP/RXS_WDSC_WEBSRV_DEBUG_SEP.html]
 
Here is a video tutorial: [http://rpg-xml.com/video/RXS_WDSC_WEBSRV_DEBUG_SEP/RXS_WDSC_WEBSRV_DEBUG_SEP.html]
 +
 +
[[Category:WDSC]]
 +
[[Category:RDi]]
 +
[[Category:Debugging]]

Latest revision as of 00:18, 11 October 2016

  • The following is a tip demonstrating how to debug CGI (or any other ILE) programs via the RDi (and WDSC) SEP (Service Entry Point) functionality.
  • After right clicking on the PGM to set a SEP, it will of course be added to the SEP view.
  • When you run the program debugging should start, BUT sometimes debug doesn't start.
  • One possible reason being is because the debug isn't running under your IBM i profile (e.g. JSMITH) and is instead running under QTMHHTP1.
  • Right click on the SEP in the SEP view that was just created and select Modify and change the user from JSMITH to QTMHHTP1.
  • Now run the CGI program again and it SHOULD bring up the Debugger in RDi / WDSC.

If it still does not, read on.

  • Another reason, why your debug session wouldn't start, could be if your user profile (i.e. the one you used in your IBM i connection - JSMITH here) neither has *ALLOBJ special authority nor *USE authority to the target *USRPRF object (QTMHHTP1 in this example)
  • Yet another reason, if you recompile your program, the SEP becomes invalid. But there is an easy solution: Select your SEP in the SEP view and click the "Refresh service entry points" button. Just don't forget about it.
  • Yet another reason, is if you have done a 'green screen' STRDBG. If debug is already active the RDi / WDSC debug session wont start. FKOL 21:56, 30 January 2008 (CST)


An easier way to set the user profile right away:

  • Instead of right clicking the program object, you can also right click the source.
  • The difference is that you will see a prompt which allows you to modify the user profile (as well as program, module or procedure name, if they were different from the source member name you right clicked).


By default, when SEP is used to debug a program that is repeatedly called (like an external SQL UDTF), the debugger will stop as expected only during the very first program call. There is an option to terminate the debugger session; changing this will allow the debugger to stay active through all invocations of the program. Remember to manually terminate the debug session when the program truly runs to completion. Run/Debug > IBM i Debug > Terminate debug session on program completion.


NOTE: To use a SEP in V5R3 on another profile when you do not have *SERVICE special authority, you need to apply PTF SI28283.

  • This allows you to set the SEP and debug any profile to which you have *USE, *CHANGE, or *ALL authority.
  • (Superseding PTFs for V5R3 (SI28801) and V5R4 (SI28872) will check the specific data and object authorities to allow setting the SEP. Without V5R3 PTF SI28801 or V5R4 PTF SI28872, the SEP will fail if the authority is 'USER DEF'.


Here is a video tutorial: [1]