[Logo] MyDWBI---致力于打造最专业的中文数据仓库,商务智能社区
  [Groups]首页  [Blog] 博客   [Search] 搜索   [Recent Topics] 最新主题   [Hottest Topics] 热门主题   [Hottest Download] 热门下载   [Members]  会员列表  
[Register] 会员注册 / 
[Login] 登入 
get most latest job log  XML
论坛首页 » IBM DataStage
前往:   
发表人 内容
daisylee

初级会员

注册时间: 2008-07-15 04:52:19
文章: 6
离线

I want to get the datastage job log. Then reformat it and write to another log file. I have tried to use dsjob -logsum -fatal but it returns not only the last job run result. How can I get only the last job run log?

Thank you.
lynx286
一失足成千古风流人物!


论坛CEO
[Avatar]

注册时间: 2008-04-22 11:52:00
文章: 652
来自: 四海为家
离线

Identifying the Newest Entry
The following syntax displays the ID of the newest log entry of the
specified type:
dsjob –lognewest [useid] project job|job_id type
  • useid specify this if you intend to use a job alias (jobid) rather than a job name (job) to identify the job.

  • project is the project containing job.

  • job is the job whose log entries are to be retrieved. To identify a job invocation, use the format job.invocation_id.

  • job_id is an alias for the job that has been set using the dsjob -jobid
    command

  • type can be one of the following options:
    INFO Information
    WARNING Warning
    FATAL Fatal error
    REJECT Rejected rows from a Transformer stage
    STARTED Job started
    RESET Job reset
    BATCH Batch


  • This syntax is equivalent to the DSGetNewestLogId function.

    唯大英雄能本色,是真名士自风流.
    [WWW]
    daisylee

    初级会员

    注册时间: 2008-07-15 04:52:19
    文章: 6
    离线

    Do you mean ...

    1. get the last fatal event id before the job run
    2. get the last fatal event id after the job run
    3. use logdetail to get all the job logs between these 2 event ids ?

    but logdetail can't control the message type I get, i.e. only fatal error message

    lynx286
    一失足成千古风流人物!


    论坛CEO
    [Avatar]

    注册时间: 2008-04-22 11:52:00
    文章: 652
    来自: 四海为家
    离线

    直接用dsjob –lognewest [useid] project job|job_id type 命令或DSGetNewestLogId 函数就可以得到阿。

    唯大英雄能本色,是真名士自风流.
    [WWW]
    daisylee

    初级会员

    注册时间: 2008-07-15 04:52:19
    文章: 6
    离线

    I have tried that

    dsjob -lognewest <project> <job> FATAL

    but it only gives me

    Newest id = 4445

    Status code = 0?

    but I want to get the fatal messages...

    lynx286
    一失足成千古风流人物!


    论坛CEO
    [Avatar]

    注册时间: 2008-04-22 11:52:00
    文章: 652
    来自: 四海为家
    离线

    如果你想得到如图所示最后一次运行的一批log,而不是最后一条log,从时间上来区分应该无法做到,在multiple instance job中没法用时间区分log,只能用invocation id 区分,下面命令是取图示log的命令:
    dsjob -logsum WINNCRM lynx286.inv_lynx286

    结果如下:
    12 STARTED Fri Jul 18 11:06:54 2008
    Starting Job lynx286.inv_lynx286. (...)
    13 INFO Fri Jul 18 11:06:54 2008
    Environment variable settings: (...)
    14 INFO Fri Jul 18 11:07:09 2008
    lynx286.inv_lynx286.Sequential_File_2.IDENT1: DSD.StageRun Active stage
    starting, tracemode = 0.
    15 INFO Fri Jul 18 11:07:18 2008
    lynx286.inv_lynx286.Sequential_File_2.IDENT1: Stage statistics (...)
    16 INFO Fri Jul 18 11:07:18 2008
    lynx286.inv_lynx286.Sequential_File_2.IDENT1: DSD.StageRun Active stage
    finishing.
    17 STARTED Fri Jul 18 11:07:20 2008
    Finished Job lynx286.inv_lynx286.
    18 BATCH Fri Jul 18 11:07:20 2008
    (seq_lynx286) <- lynx286.inv_lynx286: Job under control finished.
    19 RESET Fri Jul 18 11:07:20 2008
    Project-level auto-purge, 6 log entries removed

    Status code = 0
    [Thumb - dsjoblog.JPG]
     文件名称 dsjoblog.JPG [Disk] 下载
     描述
     文件大小 69 Kbytes
     下载次数:  5 次


    唯大英雄能本色,是真名士自风流.
    [WWW]
    lynx286
    一失足成千古风流人物!


    论坛CEO
    [Avatar]

    注册时间: 2008-04-22 11:52:00
    文章: 652
    来自: 四海为家
    离线

    或者你还可以研究一下它的metadata repository.看看可否从表中直接查到log信息。
    参考:http://blog.mydwbi.com/?p=9

    这篇文章被编辑了 1 次. 最近一次更新是在 2008-07-18 12:58:14


    唯大英雄能本色,是真名士自风流.
    [WWW]
     
    论坛首页 » IBM DataStage
    前往:   

    网站地图 |  联系我们 |   |  招聘版主 |  免责声明 |  意见建议 |  系统帮助 | 
    Copyright © 2008, mydwbi.com, All Rights Reserved | Powered by JForum 2.1.8 © JForum Team