Differences between revisions 2 and 9 (spanning 7 versions)
Revision 2 as of 2013-09-18 06:09:33
Size: 2901
Editor: localhost
Comment: converted to 1.6 markup
Revision 9 as of 2022-02-21 02:39:54
Size: 3055
Editor: 58
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
readmin switches to display modified lines only readmin advance usage.
Line 3: Line 3:
-m<log_id>:<offset>:<size> === -c : display changed byte ===
Display altered bytes at the end of any ALT line , after the Tag, "ChgBytes:"
Line 5: Line 6:
Offset:
Run align on relevant file and find offset there
Size:
use n-number, t-text or nn for digits
Log ID:
#define COMP_LOG 1 // Company file log
#define CRED_LOG 2 // Supplier file log
#define DEBTR_LOG 3 // Customer file log
#define DRTYP_LOG 4 // Customer Type file log
#define GL_LOG 5 // General Ledger file log
#define DISC_LOG 6 // Special Customer/Product Group Discount file log
#define SMAN_LOG 7 // Salesman file log
#define CAT_LOG 8 // Category file log
#define STOCK_LOG 9 // Stock file log
#define STINFO_LOG 10 // Stock Information file log
#define MENU_LOG 11 // Menu file log
#define LAYAAD 12 /* for WB */
#define GRPAAD 13 /* for WB */
#define EMPAAD 14 /* for WB */
#define PRDAAD 15 /* for WB */#define DRINFO_LOG 19 // Customer Information file log
#define BOM_LOG 20 // Bills of Material file log
#define CAT_CNTL_LOG 21 // Cat control file log
#define SIZE_LOG 22 // Size file log
#define BRANCH_LOG 23 // Branch file log
#define EMP_LOG 24 // Employee file log
#define GLSUM_LOG 25 // General Ledger Summary Totals file log
#define GLSTAND_LOG 26 // General Ledger Standing Journals file log
#define CRTYP_LOG 27 // Supplier Type file log
#define PEDATE_LOG 28 // Period End Date file log
#define CRCARD_LOG 29 // Credit Card Hot List file log
#define COMM_LOG 30 // Comms file log
#define CONTL_LOG 31 // Company control file log
#define CRED_CNTL_LOG 32 // Supplier control file log
#define DEBTR_CNTL_LOG 33 // Customer control file log
#define GL_CNTL_LOG 34 // General Ledger control file log
#define TERMINAL_LOG 35 // Terminal details (contrl.dat)
#define SALESA_CNTL_LOG 36 // Sales Analysis control file log#define PRINTER_LOG 39 // Printer file log
#define TERM_CNTL_LOG 40 // Terminal control file log
#define BUTTON_LOG 41 // Button file log
#define DEMOG_LOG 42 // Demographic Questions and Responses
#define OPGRP_LOG 43 // Operator group file log
#define TERMS_LOG 44 // Terms record file log
#define TRAN_LOG 45 // Transaction file log
#define BRANCH_CNTL_LOG 46 // Discount/Layout/PettyCash control file log
#define COLOUR_LOG 47 // Colour file log
#define FREIGHT_LOG 48 // freight rate table log record
#define SURVEY_LOG 49 // survey responses log record
==== Example: ====
{{{
readmin -c
}}}
==== Output line: ====
{{{
160222 09:17:00 cc 10 stpost Alt STOCK_LOG 1 1002595 ECLIPSE CHAIR YELLOW CODE FABRIC 2609 ChgBytes: 124-125,3076-3077,3172,3333-3334,3336
}}}
=== -f <filename> : specify input log file ===
==== Example: ====
{{{
readmin -f log.22feb17-0
}}}
=== -m <logid:offset:datatype> ===
Search the log file for Alter logs, that changed a paticular field on one type of record.
Line 53: Line 22:
#define STOCK_CNTL_LOG 37 // Stock control file log
#define PRNTR_CNTL_LOG 38 // Printer type file log
==== logid ====
logid is the control logid which you can easily find out using fdbstat.
Line 56: Line 25:
#define ACCAAD 16 /* for WB */
#define SCAAD 17 /* for WB */
#define CRINFO_LOG 18 // Supplier Information file log
following example show logid for STOCK is 9

{{{
fdbstat -v /u/cc/comp/stock.dat
Filename flags ssize/ vsize/ bucsiz/ 1stbuc/ # bucs/ lastbuc nulls log release
                     prelen suflen keysize elsize maxnkey lastnod ok ? id alphalen

stock.dat MASTER 3072 1024 4096 2 0 1147 9 64
}}}
==== offset ====
offset is the starting byte of the field in the record. which can be found by running align on any dec files in /u/ccr.xx/std/hdrs/

use stock.dec as an example

{{{
align /u/ccr.16/std/hdrs/stock.dec
}}}
following is a simplified version of the output.

{{{
start end no.of decimal datatype field_name
byte byte byte
/* struct s_sstock */
0 3 4 0 RECPTR recno
4 5 2 0 BRANCHSIZE active
6 21 16 0 TEXT code
22 87 66 0 FILL old_desc
88 88 1 0 TEXT replen_period
89 89 1 0 TEXT status
90 90 1 0 SHTINT staxcode
91 91 1 0 SHTINT n_dim
92 95 4 0 RECPTR stk_par
96 98 3 0 TEXT st_type
99 104 6 0 TEXT b_unit
105 110 6 0 TEXT s_unit
111 111 1 0 TEXT use_curr_cost
112 115 4 0 RECPTR catptr
116 117 2 0 TYPDATE lastdblogedd
118 119 2 0 TYPTIME lastdblogedt
120 123 4 2 SHTDEC markup
124 127 4 2 SHTDEC supp_cost
etc....
/* total size of s_sstock = 3072 */
/* struct s_vstock */
0 3 4 2 SHTDEC incost
4 7 4 2 SHTDEC l_cost
8 9 2 0 TYPDATE lpdate
10 11 2 0 TYPDATE lastmov
12 35 24 0 FILL vsupp_fill
36 39 4 2 SHTDEC obqty
40 43 4 2 SHTDEC qty_on_ebay
44 47 4 2 SHTDEC qohand
etc...
/* total size of s_vstock = 1024 */
}}}

readmin advance usage.

-c : display changed byte

Display altered bytes at the end of any ALT line , after the Tag, "ChgBytes:"

Example:

readmin -c

Output line:

160222 09:17:00  cc       10   stpost    Alt  STOCK_LOG  1  1002595         ECLIPSE CHAIR YELLOW CODE FABRIC              2609 ChgBytes: 124-125,3076-3077,3172,3333-3334,3336

-f <filename> : specify input log file

Example:

readmin -f log.22feb17-0

-m <logid:offset:datatype>

Search the log file for Alter logs, that changed a paticular field on one type of record.

logid

logid is the control logid which you can easily find out using fdbstat.

following example show logid for STOCK is 9

fdbstat -v /u/cc/comp/stock.dat
Filename      flags  ssize/ vsize/ bucsiz/ 1stbuc/ # bucs/ lastbuc nulls log     release
                     prelen suflen keysize elsize  maxnkey lastnod ok ?  id      alphalen

stock.dat     MASTER 3072   1024   4096    2       0       1147          9       64

offset

offset is the starting byte of the field in the record. which can be found by running align on any dec files in /u/ccr.xx/std/hdrs/

use stock.dec as an example

align /u/ccr.16/std/hdrs/stock.dec

following is a simplified version of the output.

start   end    no.of   decimal datatype field_name
byte    byte   byte
/* struct s_sstock */
0       3       4       0       RECPTR  recno          
4       5       2       0       BRANCHSIZE      active         
6       21      16      0       TEXT    code           
22      87      66      0       FILL    old_desc       
88      88      1       0       TEXT    replen_period  
89      89      1       0       TEXT    status         
90      90      1       0       SHTINT  staxcode       
91      91      1       0       SHTINT  n_dim          
92      95      4       0       RECPTR  stk_par        
96      98      3       0       TEXT    st_type        
99      104     6       0       TEXT    b_unit         
105     110     6       0       TEXT    s_unit         
111     111     1       0       TEXT    use_curr_cost  
112     115     4       0       RECPTR  catptr         
116     117     2       0       TYPDATE lastdblogedd   
118     119     2       0       TYPTIME lastdblogedt   
120     123     4       2       SHTDEC  markup         
124     127     4       2       SHTDEC  supp_cost
etc....
/* total size of s_sstock = 3072 */
/* struct s_vstock */
0       3       4       2       SHTDEC  incost         
4       7       4       2       SHTDEC  l_cost         
8       9       2       0       TYPDATE lpdate         
10      11      2       0       TYPDATE lastmov        
12      35      24      0       FILL    vsupp_fill     
36      39      4       2       SHTDEC  obqty          
40      43      4       2       SHTDEC  qty_on_ebay    
44      47      4       2       SHTDEC  qohand 
etc...
/* total size of s_vstock = 1024 */

readmin (last edited 2022-02-21 03:02:38 by 58)