ITPub博客

首页 > Linux操作系统 > Linux操作系统 > How to debug backgroud job

How to debug backgroud job

原创 Linux操作系统 作者:shangchongtian 时间:2009-01-13 12:36:03 0 删除 编辑
Steps
1. Create variant called BACKGROUND for program(ZTEST0009) to be debugged.
   创建一个名为:BACKGROUND 变式
程序:ZTEST0009:


2. Execute ZDEBUGBG (pgm code below) in background for immediate processing.
   执行变式
3. Execute transaction SM50.
4. Select process that runs ZDEBUGBG.
5. Goto 'Program/Session' 'Program' 'Debugging'.

A se80 debug session will open.
6. Change variable W_EXIT to 'E'.



7. Step thru (F6) until ZTEST0009 comes up.



*&---------------------------------------------------------------------*
*& Report ZDEBUGBG *
*& *
*&---------------------------------------------------------------------*
*& *
*& *
*&---------------------------------------------------------------------*
REPORT zdebugbg.
DATA:
w_exit TYPE c.
FIELD-SYMBOLS TYPE ANY.
SELECTION-SCREEN BEGIN OF BLOCK one.
PARAMETERS: p_repid LIKE trdir-name DEFAULT 'ZTEST0009'.
SELECTION-SCREEN END OF BLOCK one.
START-OF-SELECTION.
PERFORM. loop_time.
PERFORM. submit_time.
END-OF-SELECTION.
*---------------------------------------------------------------------*
* FORM. loop_time *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
FORM. loop_time.
DO.
IF w_exit = 'E'.
EXIT.
ENDIF.
ENDDO.
ENDFORM.
*---------------------------------------------------------------------*
* FORM. submit_time *
*---------------------------------------------------------------------*
* ........ *
*---------------------------------------------------------------------*
FORM. submit_time.
ASSIGN p_repid TO .
SUBMIT ()  USING SELECTION-SET 'BACKGROUND'.
ENDFORM.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9633129/viewspace-536603/,如需转载,请注明出处,否则将追究法律责任。

下一篇: 动态内表
请登录后发表评论 登录
全部评论

注册时间:2009-01-13

  • 博文量
    18
  • 访问量
    30899