|
I'm trying to do something using Query/400 (QU1) that I thought would take a couple of seconds and it has turned into several
hours with no luck!
The QAUDJRN ZC data puts out a string of data that contains Character and Packed Numeric's
Column 1 - 31 is all CHARACTER DATA ... Column 32-34 is a Packed Numeric (Dec 5 0)
Code . . . . . . . . : T - Audit trail entry
Type . . . . . . . . : ZC - Object change access
Entry specific data
Column *...+....1....+....2....+....3....+....4....+....5
00001 'CPOWER520 QSYS *LIB " '
Same Data Displayed in HEX ...
Code . . . . . . . . : T - Audit trail entry
Type . . . . . . . . : ZC - Object change access
Entry specific data
Column * . . . + . . . . 1 . . . . + . . . . 2 . . . . +
00001 'C3D7D6E6C5D9F5F2F04040D8E2E8E24040404040405CD3C9C2'
00026 '4040404000007F404040404040404040404040404040404040'
You can see that the value I'm after in this example is 00007
I'm trying to create a Query Report showing the data in Column 32-34 ...
But I can't figure out how to change this Packed Numeric data into a Character that can be displayed on my report.
The data I'm trying to process is a substring of field AUDATA ...
(AUDATA, 32, 3) to be exact... I realize the AUDATA field is
defined as CHAR with a length of 1000 ... This field contains the
character data and this bit of packed Data .... I imagine this is
the root of my problem.
The DB file I'm running my queries over is defined like this:
Field Level Information
Data Field Buffer Buffer Field
Field Type Length Length Position Usage
<<SNIP>>
AUDATA CHAR 1000 1000 111 Both
Field text . . . . . . . . . . . . . . . : Entry data
Coded Character Set Identifier . . . . . : 37
Anyone have a tip that can help me out?
I have already tried this - TYPE SUBSTR(AUDATA, 32, 3)
CHARTYPE DIGITS(TYPE)
... that didn't work ...
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.