Re: Cobol convert program Job Request



On Feb 22, 2:06 pm, "Richard" <rip...@xxxxxxxxxxxx> wrote:
On Feb 23, 8:51 am, Louis Krupp <lkr...@xxxxxxxxxxxxxxxxxxxxxxx>
wrote:

The record matches the layout perfectly!
Micro Focus S9(4) COMP is two bytes binary
and 9V9(4) COMP is three bytes binary.

How do you fit a sign and four digits into two bytes? (Or am I being
unusually dense today?)

In binary (as stated). The value in 16 bit can be -32368 to 32367
which is a larger range than -9999 to 9999.

COMP (in this case) however is byte reversed compared to intel format
being big-endian.

I have some printouts of what the sketch should look like, I cannot
find the first record (pin 01-000-001-00), but I do have the second
(pin 01-000-006-00). Based on looking at the printout, I think the
first part should be like this:

01-000-006-00, A, -40, 16, 1, 11, 13, 33, 13, 49, 31, 49, 31, 53, 47,
53, 47, 27, 23, 27, 23, 33, 13, 33, 0, -2,

C I can do, and would love too, but a little rusty. The bytes and
strings I think I can get out, but I'm not sure about the S9(4) COMP
(two bytes reversed) thing.

if I have:

byte *buffer;
fread(buffer, 2, f);
// lets pretened I just read a comp, you previously said:
// "Just byte switch the COMP fields."
// How would I do that?
int x = (buffer[1] << 16) && buffer[0]; // something like this?

-Andy




.



Relevant Pages

  • Re: Cavity Pump help...
    ... small cotter pin. ... Place the plunger in the tube with the 'stop' pin about twice as far from ... plunger open-end down into your bucket of moistened comp. ...
    (rec.pyrotechnics)
  • Re: Monitor problem
    ... THe fact that you just hooked up a new comp, maybe you bent a pin on ... I would disconnect the cable, check it out, and ...
    (microsoft.public.windowsxp.help_and_support)