Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hex Character Display?

116 views
Skip to first unread message

ra

unread,
Jan 28, 2004, 12:15:34 PM1/28/04
to
This may be an easy one and I'm just missing it but is there a way to
display the underlying hex values of a field on a display.

Thanks,
Rob


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----

Thomas Raddatz

unread,
Jan 28, 2004, 3:49:27 PM1/28/04
to
Hi Rob,

You may try the cvthc() MI function to convert a hex string to its character
representation:

*
* Convert Hex to Character (CVTHC)
D cvthc...
D PR extproc('cvthc')
D i_pReceiver * value
D i_pSource * value
D i_size 10I 0 value


clear USR2966;
USR29661 = '';
cvthc(%addr(USR29662): %addr(i_eolChar):
%len(%trimR(i_eolChar)) * 2);
msg = f_newMsg('USR2966': USR2966);

In the sample given above i_eolChar contains a hex string that is converted
to a character string which is put into USR29661. E.g. given that i_eolChar
contained x'OD25' (2-byte hex string which is the ebcdic code for CR+LF),
USR29661 would contain '0D25' (4-byte character string) after having called
cvthc(). The length of i_eolChar has to be multiplied by 2 because the
length is specified in nibbles.

From the C Library Reference manual:

void cvthc (_SPCPTR receiver,
_SPCPTRCN source,
int size);

Description:

The cvthc function takes each hexadecimal digit (4- bit value) of source and
converts it to a character digit (8-bit value) and places into receiver.

Parameters:

receiver (input/output)
Pointer to an 8-bit character value.

source (input)
Pointer to a 4-bit hexadecimal value.

size (input)
The length in nibbles of the source.


Thomas Raddatz.

--
*=====================================================*

e-mail Adresse:
Thomas....@tools400.de

Homepage:
http://www.tools400.de

*=====================================================*

"ra" <r...@yahoo.com> schrieb im Newsbeitrag
news:4017ee25$1...@corp.newsgroups.com...

Thomas Raddatz

unread,
Jan 28, 2004, 3:51:28 PM1/28/04
to
Rob,

I forgot to mention that you have to specify the QC2LE binding directory at
the CRTPGM command or BNDDIR('QC2LE') at the H-spec.

Thomas Raddatz.

--
*=====================================================*

e-mail Adresse:
Thomas....@tools400.de

Homepage:
http://www.tools400.de

*=====================================================*

"Thomas Raddatz" <thomas....@tools400.de> schrieb im Newsbeitrag
news:bv978o$le7$1...@online.de...

Birgitta Hauser

unread,
Jan 29, 2004, 2:57:54 AM1/29/04
to
Hell Rob,

the simplest way to show the hex values of a field is to use
SQL-Scalar-Function HEX():

C/EXEC SQL
C+ Set :MyHexField = Hex(:MyField)
C/END-EXEC

Birgitta

"ra" <r...@yahoo.com> wrote in message news:<4017ee25$1...@corp.newsgroups.com>...

SIB-er

unread,
Jan 29, 2004, 8:36:26 PM1/29/04
to
If you use dsppfm check F11 key

HTH
Alex

"ra" <r...@yahoo.com> wrote in message news:4017ee25$1...@corp.newsgroups.com...

Chris

unread,
Jan 29, 2004, 10:11:32 PM1/29/04
to
Someone with a better memory than I may have more info, but didn't some of
the old terminals actually have a key combination you could press that would
show a hex representation of all of the fields on the screen? Does anyone
know if any of the emulators offer a comparable feature?


"ra" <r...@yahoo.com> wrote in message news:4017ee25$1...@corp.newsgroups.com...

Chris

unread,
Jan 29, 2004, 10:18:19 PM1/29/04
to
OK. I should have bothered to look before my first reply. In Mochasoft
(www.mochasoft.dk), you can log the 5250 traffic to a text file that
includes both the EBCDIC characters, as well as a hex representation...

HTH,
Chris


"ra" <r...@yahoo.com> wrote in message news:4017ee25$1...@corp.newsgroups.com...

Saml

unread,
Jan 30, 2004, 7:47:11 PM1/30/04
to
I have a very old version of Rally! that will show the field attribute bytes
in hex. Maybe that's what you are thinking of, but I seem to remember and
IBM terminal that has could do the same thing.

Sam

"Chris" <y...@dontneedtoknow.com> wrote in message
news:EXjSb.179953$I06.1901089@attbi_s01...

ra

unread,
Feb 11, 2004, 5:04:48 PM2/11/04
to
Thank You - that works great!
"Birgitta Hauser" <Birgitt...@lp-gmbh.com> wrote in message
news:e98ddd06.0401...@posting.google.com...
0 new messages