I'm too lazy to all that work. I cheat (a lot). But my cheating does
require that my HLASM code be LE enabled, or use CEEPIPI to establish an LE
environment. I find the former to be easier. Once I do that, I can use the
C subroutine "SPRINTF" to do my conversion from floating point to
printable. Well, I don't actually do floating point. I do other
conversions. The C calling sequence is a bit of a bother, but once learned,
it is not too difficult to use.

On more recent z machines (but I don't know what level) there is an HFP
"convert to fixed" set of instructions. However, they round to an integer.
So you'd need to scale the floating point by multiplying by an appropriate
factor of 10 before doing the instruction. The instructions are

CFER - short HFP to 32 bit integer
CFDR - long HFP to 32 bit integer
CFXR - extended HFP to 32 bit integer
CGER - short HFP to 64 bit integer
CGDR - long HFP to 64 bit integer
CGXR - extended HFP to 64 bit integer

These are all <opcode> <gen_register>,<mask>,<float_register>

where mask specifies the rounding

0 - towards 0
1 - invalid
2 - invalid
3 - invalid
4 - to nearest, ties go towards zero
5 - to nearest, ties go towards even
6 - to +inf
7 - to -inf

On Thu, Jul 25, 2013 at 2:38 PM, Dr Rick Williams <
dr.rick.willi...@gmail.com> wrote:

> I have a prohram that prints some specific SMF data, that I use for
> charting & graphing. I am running into some SMF fields that are listed in
> the SMF manual as s_float, l_float, float ... my assumption is that these
> are hex float fields? A good example can be seen in the SMF 74(5) records.
> I was wondering if anyone out there had some examples of assembler code
> where they converted these fields to standard EBCDIC 1,234.56 format.. I am
> finding some very complex methods, but dont really need to actively add,
> multilpy, or devide,, just convert .. Any assistance and/or advise would be
> greatly appreciated!
>
> Thanks!
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>



-- 
This is a test of the Emergency Broadcast System. If this had been an
actual emergency, do you really think we'd stick around to tell you?

Maranatha! <><
John McKown

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to