Deciphering data

  • Thread starter Thread starter booksnore
  • Start date Start date
B

booksnore

OK - this probably isn't the right forum for this question but seeing as
I'm desperate and also that I want to code the solution in C# I thought
I'd start here first and then branch out to other newsgroups as
appropriate.

So the issue is I have data from a cliemnt (or from a manager who got
the got from a client) and it contains
data like this....

0000195G0000020{0000000{0000215G0000000{0000000{0000000{0000000{0000000{
0000000{0000215G

Now the above is supposed to be numeric data the record is made up of 8
in length fields all appended together so
0000195G is one value 0000020{ the next and so on.

My question is (drum roll) does anyone recognize the format that has
been used here. I guess it's been produced by mainframe and the alphabet
and other characters denote sign and precision but apart from that I am
clueless on how to continue. Any help or tips on where to look (which
newsgroups to try) would be appreciated.


Joe
 
Why do you need to know the format? and is that exactly right, sure yournot
missing a { on the first part?

Assuming the { was meant to be in the first part then that looks like the
delimiter being used here to separate field data, so again assuming you want
to know the format so you can pull the data out and pulling the data out is
the objective just make a function to take in the string or byte array of
data or whatever and loop through it finding the delimiter and storing the
var repeating until it reaches the end.


Any help?
 
Joe,
why would somebody provide you (or your manager, or whomever) with data in a
certain format, which data you are assumed to be able to work with, and not
be able to tell you what the format is?

My point is, wouldn't you want to go back to the source first and ask them?
Peter
 
It is a way of encoding signed numbers

The instructions I have for it are

The right most position of a signed numeric field will designate
positive or negative.
- 0 = } + 0 = {
- 1 = J + 1 = A
- 2 = K + 2 = B
- 3 = L + 3 = C
- 4 = M + 4 = D
- 5 = N + 5 = E
- 6 = O + 6 = F
- 7 = P + 7 = G
- 8 = Q + 8 = H
- 9 = R + 9 = I
From this I would interpret the stream you sent as 8 byte number reps
holding
1957, 200, 0, 2157, 0, 0, 0, 0, 0, 0, 2157

I'm afraid that I have no further details on the format, I just found
it as comments in some of our host code.

hth,
Alan.
 
Hi Joe,

Don't you have any clue as to what this data is supposed to be? How do you
know it is numbers? If it is numbers, it could be almost anything, since
anyone can invent a numeric format. You need more info from your client.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
We got a sick zebra a hat,
you ultimate tuna.
 
The format (at face value) of each 'field' is that which would be produced
by the COBOL data definition of:

01 DATA-NAME PIC 9(8) SIGN TRAILING OVERPUNCHED.

For the uninitiated, this means that the field contains 8 digits with the
sign at the end but 'overpunched' on the last digit. The term 'overpunched'
is a throwback to the days of punched cards where a second hole was punched
in a specific column to indicate the sign of the value represented on the
card.

Tht said, it is also posible that the field has an implied decimal point
and, if it represents money then it could be described as:

01 DATA-NAME PIC 9(6)V99 SIGN TRAILING OVERPUNCHED.

The list of 'overpunches' given by alan is correct for SIGN TRAILING
OVERPUNCHED.

If it were SIGN TRAILING OVERPUNCHED then there is a different method of
determining the value.
 
Sorry, last paragraph should read:

If it were SIGN LEADING OVERPUNCHED then there is a different method of
determining the value.
 
Back
Top