简体   繁体   English

在IBM i中分析来自DSPJRN日记文件的数据

[英]analyzing data from DSPJRN journaled files in IBM i

How to analize extracted data from DSPJRN journaled Database files in IBM i?. 如何在IBM i中分析从DSPJRN记录的数据库文件中提取的数据? Output extracted from journal with command DSPJRN is composed of metadata and a block of data in native format (a stream of text and binary data). 使用命令DSPJRN从日志中提取的输出由元数据和本机格式的数据块(文本和二进制数据流)组成。 Even though some info could be extracted, I suppose there are some rules to read them, but out of my knowledge. 即使可以提取一些信息,我想也有一些规则可以读取它们,但是这是出于我的知识。 Not seen info in documents, yet. 尚未在文档中看到信息。 Anyone working with this data? 有人在处理这些数据吗?

Documentation for the journal entry information 日记帐分录信息的文档

The meta data is easy, since it's in standard columns. 元数据很容易,因为它位于标准列中。

It's the variable length entry specific data that's problematic. 有问题的是可变长度条目特定的数据。

The basics aren't to difficult to deal with, assuming no nullable columns in the file and that the journal is configure not to minimize data. 假设文件中没有可为空的列并且日志配置为不最小化数据,则基本知识并不难处理。 Then you can simply build a table with the metadata columns + the columns from the journaled table and simply copy the data to it; 然后,您可以简单地使用元数据列+日记表中的列来构建表,然后将数据复制到该表中; like so: 像这样:

  1. DSPJRN JRN(MYJRN) FILE((MYPF)) ENTTYP(*RCD) OUTPUT(*OUTFILE) OUTFILFMT(*TYPE1) OUTFILE(JRNOUT) ENTDTALEN(*CALC)
  2. Build the table, I use SQL CREATE TABLE MYJRNDATA as (SELECT <meta columns>,<PF columns> FROM JRNOUT, MYPF) with no data 建表,我使用SQL CREATE TABLE MYJRNDATA as (SELECT <meta columns>,<PF columns> FROM JRNOUT, MYPF) with no data
  3. CPYF FROMFILE(JRNOUT) TOFILE(MYJRNDATA) FMTOPT(*NOCHK) to copy the journal data to it. CPYF FROMFILE(JRNOUT) TOFILE(MYJRNDATA) FMTOPT(*NOCHK)将日记数据复制到其中。

Moving beyond the basics get complicated. 超越基础变得复杂。

There are a few commercial tools that you can use, I use the DBUJRN command that's part of Prodata's DBU utility. 您可以使用一些商业工具,我使用Prodata DBU实用程序中的DBUJRN命令。

There's also at least one open source tool, Export Journal Entries that would be where I'd start if I wanted to roll my own. 还有至少一个开源工具,即“ 导出日记条目” ,如果我想自己动手,它将是我的起点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM