In the link I provided was a commented out link with more detail. I got
the following from that by really scrolling down.

create table rob.jt (
mychar *char*(*10*),
myint *int*);


*-- Data Field Buffer Buffer Field Column *
*--Field Type Length Length Position Usage Heading*
*--MYCHAR CHAR 10 10 1 Both MYCHAR *
*-- Allows the null value *
*-- Coded Character Set Identifier . . . . . : 37 *
*--MYINT BINARY 9 0 4 11 Both MYINT *
*-- Allows the null value *
;
*insert* into rob.jt
values('hi', *27*);

SELECT
*INTERPRET*(*substring*(entry_data, *11*, *4*) as *INTEGER*) as myint,
*CAST*(*SUBSTRING*(JT.ENTRY_DATA, *1*, *200*) AS *CHAR*(*200*
)), JT.ENTRY_DATA, JT.* FROM TABLE (
QSYS2.DISPLAY_JOURNAL( '#MXJRN', 'USERS',
OBJECT_LIBRARY *=>* 'ROB',
OBJECT_NAME *=>* 'JT',
OBJECT_OBJTYPE *=>* '*FILE',
OBJECT_MEMBER *=>* 'JT',
JOURNAL_CODES *=>* 'R'
)) AS JT;
;
*-- returns 27 for myint*

On Thu, May 22, 2025 at 3:05 PM Rob Berendt <robertowenberendt@xxxxxxxxx>
wrote:

Does this help?

https://www.ibm.com/support/pages/example-how-extract-and-read-entrydata-joesd-journal-receiver-field-using-displayjournal-table-function

On Thu, May 22, 2025 at 12:53 PM Justin Taylor <jtaylor.0ab@xxxxxxxxx>
wrote:

I'm using Display_Journal() to parse DB journal entries. I'm struggling
to
parse binary data (SQL type Integer). DSPFFD shows:
BINARY 9 0 4 312

I can do:
substring(Entry_Data, 312, 4)
But how do I decode that back into an Integer?


Thanks
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 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.