Re: COBOL file dump...
From: Cor Ligthert (notfirstname_at_planet.nl)
Date: 09/16/04
- Next message: Cor Ligthert: "Re: COBOL file dump..."
- Previous message: Jon Skeet [C# MVP]: "Re: Java and .NET (no Flames Pls)"
- In reply to: Stephany Young: "Re: COBOL file dump..."
- Next in thread: MPF: "Re: COBOL file dump..."
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 16 Sep 2004 08:09:03 +0200
"Stephany Young"
> Hmmmmmmmmmm ....
> It seems that a few peoples have forgotten their COBOL Core skills :)
Pardon, I thought that I had given almost the same answer as you, the only
thing I was not sure of that MPF had to look for was the character for the
zeros, because than can be translatted in every EBCDIC to ASCII way in a
different way. That it is with you {} is not a default, maybe a lost of your
EBCDIC COBOL skills, because those signs are not the representant for the
same in EBCDIC place. That means Hex C0 and D0 in EBCDIC. Where C=zero plus
and D= zero minus.
With a one to one transaltion this would result in for the C0 the @ Sign
however that exist in EBCDIC as 7C and therefore there should be taken non
existing EBCDIC characters. What is in your case the {} however as far as I
know for sure not a default.
Therefore I asked to MDF was in what are the EBCDIC C0 (+0) and D0 (-0)
translated, because that depends on the converter.
Than the procedure is easy to do.
First copy the string except the last postiton,
If the last character not is the equivalent for -0 you can set the the
boolean IsMinus
For +0 and - 0 concatenate as a char "0" to the made string.
If not than for the values from A to R you can do a subtract in the byte
with 16 to get the last character which you can do for the J to R as well
with the value 25.
Concatenate that value as ASCW to the string.
Than when the it is minus subtract the string from an integer with the value
zero and otherwise make from it an integer.
That is all,
So what is this different from my previous message?
Cor
- Next message: Cor Ligthert: "Re: COBOL file dump..."
- Previous message: Jon Skeet [C# MVP]: "Re: Java and .NET (no Flames Pls)"
- In reply to: Stephany Young: "Re: COBOL file dump..."
- Next in thread: MPF: "Re: COBOL file dump..."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|