COBOL文件转储... [英] COBOL file dump...

查看:85
本文介绍了COBOL文件转储...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

唉,我投降......


在来自COBOL转储的文件中,该文件是ASCII格式,其中一个字段定义为

as S9(9)V99值+0。

此位置的值为0000018922D,根据

的作者来源,转换为00000189224.


如何通过.Net翻译?我已经尝试过StreamReader并尝试将
转换为字节,但我最终得到了相同的值(0000018922D)。

在此先感谢。


Morgan

Alas, I surrender...

In a file from a COBOL dump, which is in ASCII, one of the fields is defined
as S9(9) V99 Value +0.
The value in this location is 0000018922D, which according to the author of
the source, translates to 00000189224.

How can this be translated via .Net? I''ve tried StreamReader and trying to
convert everything to bytes, but I end up with the same value (0000018922D).
Thanks In Advance.

Morgan

推荐答案

这是所谓的压缩十进制的表示。在最后一个半字节中带有

符号(+或 - )的字段。在Cobol中称为COMP-3字段。在一个

压缩十进制字段中,每个十进制数字存储在一个半字节中(4位,半个/ b $ b字节)。如果为正,则符号为C或F,如果为负则为符号。

因此在您的示例中,de字段中的值为-189.22。

这是一个相当不错的URL解释:
http://digilander.libero.it/foxes/ Packed_Decimal.htm


希望这会有所帮助,

/ Ger

" MPF" < AB ** @ senditon.com> schreef in bericht

新闻:Ol ************** @ TK2MSFTNGP15.phx.gbl ...
This is the representation of a so called "packed decimal" field with the
sign (+ or -) in the last nibble. In Cobol terms a COMP-3 field. In a
packed decimal field each decimal digit is stored in a nibble (4-bits, half
byte). The sign is C or F if positive, D if negative.
So in your example the value in de field is -189.22.
Here is a URL with a fairly good explanation:
http://digilander.libero.it/foxes/Packed_Decimal.htm

Hope this helps,
/Ger
"MPF" <ab**@senditon.com> schreef in bericht
news:Ol**************@TK2MSFTNGP15.phx.gbl...
唉,我投降了。 ..

在来自COBOL转储的文件中,其中一个字段是
,定义为S9(9)V99值+0。
这个位置是0000018922D,根据作者
的来源,翻译为00000189224.

如何通过.Net翻译?我已经尝试过StreamReader并尝试将所有内容转换为字节,但最终得到的值相同
(0000018922D)。

在此先感谢。

摩根
Alas, I surrender...

In a file from a COBOL dump, which is in ASCII, one of the fields is defined as S9(9) V99 Value +0.
The value in this location is 0000018922D, which according to the author of the source, translates to 00000189224.

How can this be translated via .Net? I''ve tried StreamReader and trying to
convert everything to bytes, but I end up with the same value (0000018922D).

Thanks In Advance.

Morgan



MPF,


这应该很容易翻译,唯一的问题是要知道转换为ASCII时使用的

表示为+0和-0


在这个序列中是A + 1(这是EBCDIC中的穿孔卡代码12 + 1)

EBCDIC


最后一个位置被告知整个字段为正或负。


因此,例行程序很安静,但是在你的情况下,+ 0和-0翻译为什么是



Cor

" MPF" < AB ** @ senditon.com> schreef in bericht

新闻:Ol ************** @ TK2MSFTNGP15.phx.gbl ...
MPF,

This should be easy to translate, the only problem is to know the
representation that is used while converted to ASCII for +0 and -0

In this sequence is A +1 (which is punched card code 12 + 1) in EBCDIC
and J is -1 however what is -0. (which is punched card code 11 + 1) in
EBCDIC

With that last position is told that the whole field is plus or minus.

Therefore a routine is quiet easy however what is that +0 and -0 translated
to in your situation.

Cor
"MPF" <ab**@senditon.com> schreef in bericht
news:Ol**************@TK2MSFTNGP15.phx.gbl...
唉,我投降了。 ..

在来自COBOL转储的文件中,其中一个字段是
,定义为S9(9)V99值+0。
这个位置是0000018922D,根据作者
的来源,翻译为00000189224.

如何通过.Net翻译?我已经尝试过StreamReader并尝试将所有内容转换为字节,但最终得到的值相同
(0000018922D)。

在此先感谢。

摩根
Alas, I surrender...

In a file from a COBOL dump, which is in ASCII, one of the fields is defined as S9(9) V99 Value +0.
The value in this location is 0000018922D, which according to the author of the source, translates to 00000189224.

How can this be translated via .Net? I''ve tried StreamReader and trying to
convert everything to bytes, but I end up with the same value (0000018922D).

Thanks In Advance.

Morgan



你在这里显示你的年龄Cor(打孔卡和EBCDIC - 扩展

二进制编码的十进制交换代码/主机/ IBM等)

LOL


-


OHM(特里烧伤)

。 。 。单手人。 。

如果你需要我的电子邮件,请问我


当你不知道自己在做什么时,过得很快


" Cor Ligthert" <无********** @ planet.nl>在消息中写道

news:uF ************** @ TK2MSFTNGP11.phx.gbl ...
You are showing your age here Cor ( Punched Cards and EBCDIC - Extended
Binary-Coded Decimal Interchange Code / Mainframes / IBM Etc )
LOL

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don''t know what you''re doing

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:uF**************@TK2MSFTNGP11.phx.gbl...
MPF,
这应该很容易翻译,唯一的问题是要知道转换为ASCII时使用的
表示为+0和-0

在这个序列中是A EBCDIC中的+1(穿孔卡代码12 + 1)和J是-1但是-0是什么。 (这是打孔卡代码11 + 1)在EBCDIC中

最后一个位置被告知整个字段是正负。

因此一个例行程序很安静,但是在你的情况下,+ 0和-0
的翻译是什么。


" MPF" < AB ** @ senditon.com> schreef in bericht
新闻:Ol ************** @ TK2MSFTNGP15.phx.gbl ...
MPF,

This should be easy to translate, the only problem is to know the
representation that is used while converted to ASCII for +0 and -0

In this sequence is A +1 (which is punched card code 12 + 1) in EBCDIC
and J is -1 however what is -0. (which is punched card code 11 + 1) in
EBCDIC

With that last position is told that the whole field is plus or minus.

Therefore a routine is quiet easy however what is that +0 and -0 translated to in your situation.

Cor
"MPF" <ab**@senditon.com> schreef in bericht
news:Ol**************@TK2MSFTNGP15.phx.gbl...
唉,我投降......
Alas, I surrender...

In a file from a COBOL dump, which is in ASCII, one of the fields is


定义

为S9(9)V99值+0 。
这个位置的值是0000018922D,根据作者
as S9(9) V99 Value +0.
The value in this location is 0000018922D, which according to the author


来源,转换为00000189224.

如何通过.Net进行翻译?我已经尝试过StreamReader并尝试
将所有内容转换为字节,但最终得到的值相同
the source, translates to 00000189224.

How can this be translated via .Net? I''ve tried StreamReader and trying to convert everything to bytes, but I end up with the same value


(0000018922D)。


(0000018922D).



在此先感谢。

摩根


Thanks In Advance.

Morgan




这篇关于COBOL文件转储...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆