Ognacの雑感

木漏れ日々

目次

Blog 利用状況

書庫

ギャラリ

不便な基準でも普及してしまえば標準基準になる

その結果、現行開発の足を引っ張る結果になっているのもあります。
汎用機のコード体系に EBCDICコードというものがあります。
原型は AlphabetのA-Z(大文字)と0-9の数字の規定が基本になっています。
コードのbyte値がなんともユニークなんですよね。
数字の0~9のbyte値は "0" は 0xF0, "1"は0xF1,,,,,"9"は0xF9  のように連続します。
ところが "A"から"Z"は非連続なんです。
"A":0xC1 "B" :0xC2...."I":0xC9
"J":0xD1 "K" :0xD2...."R":0xD9
         "S" :0xD2...."Z":0xE9
その他はBlankで未定義扱い.
Open系の感覚からすれば A-Z は連続で  code++ で処理したいところ....

 策定された当時は IBMが定義したことが標準となる時代で、16進の世界なのに(二進化10進を考慮してか)10個刻みにalphabetを配置していますね。
 カタカナや漢字に対応するために Shift-in/out コードでモードを設定しています。
Open系のShift-JisやUnixでは当たり前に扱っているalphabetと漢字の混在ができない不便な世界となっています。汎用機のDBのUnicode化が進んでいるのでいずれは解消されるのでしょうが。過去の資産があるので、当分はEBCDIC文化のを意識して開発する局面は多いです。
 ワンクマBlogの世界にいると「半角全角、半角=1byte、全角=2byte」なんて発言したら嘲笑されてしまいますが、汎用機が絡む現場では逆にUnicodeで話をすると通じません。半角全角ShiftIn/Shiftoutで何文字で何Byte という会話が飛び交ってます。
未来から振り返るので、連続していない文字コードなんて馬鹿げているように感じますが、当時の人は熟考した結果の策定だったのでしょうかね。......将来のことを考えずに適当に策定した感じもする。
 一度決める変更するのに多大なコストがかかるので、標準の策定にはくれぐれも拡張性をお忘れなく。

投稿日時 : 2007年10月9日 11:57

Feedback

# re: 不便な基準でも普及してしまえば標準基準になる 2007/10/09 12:59 まさぶん

"S" :0xD2?
"S" :0xE2
と気づいてしまう汎用機コボラー

# re: 不便な基準でも普及してしまえば標準基準になる 2007/10/09 13:38 裏口

>16進の世界なのに(二進化10進を考慮してか)10個刻みにalphabetを配置していますね。

当時メインフレーム上で精度の高かったBCD演算(十進演算)で扱い易くするためだと習いました(はるか昔www
そういう意味では0xC9と0xD1は連続していることになります。

# わんくまにもメインフレーマっていたのね。知らなかった。

# re: 不便な基準でも普及してしまえば標準基準になる 2007/10/09 15:54 Ognac

>"S" :0xE2 と気づいてしまう汎用機コボラー
Typo 失礼しました。メインフレーマの方でしたかおみそれしてました。

>当時メインフレーム上で精度の高かったBCD演算(十進演算)で扱い易くするためだと習いました
>そういう意味では0xC9と0xD1は連続していることになります

ハードとしての演算ユニットが BCDに特化しいたとみていいのでしょうか。忘却の彼方なので習ったのでしょうが、まったく記憶がありません。

(参考)コード表 : http://ja.wikipedia.org/wiki/EBCDIC
コード表を見る限り、0xC0/0xD0/0xE0/0xE1 が空欄で, 記号類が 0xxB~0xxF の範囲なのも解せない配置ですね。 入門した当時は疑問にも抱きませんでしたが、今見れば不思議一杯のコード体系ですね。
突っ込んで聞き出しておけばよかった。(答えられ人がいたのだろうか)

# re: 不便な基準でも普及してしまえば標準基準になる 2007/10/09 17:41 裏口

>ハードとしての演算ユニットが BCDに特化しいたとみていいのでしょうか。

詳細までは知りませんw
想像で恐縮ですが、ハードウェアじゃなくってBCD演算用のシステムライブラリじゃなかろうかと。
# この辺りはメーンフレーム・オフコンのDECIMAL演算専用モジュールの拡張とも想像できますが・・・。

# re: 不便な基準でも普及してしまえば標準基準になる 2007/10/09 19:39 Chuki

System/360はASCIIで作ったけれど、周辺機器が間に合わなかったのと、顧客がBCDをたんまりかかえてたので方向変換したんだと聞いてます。

ググってみた
「IBM System/360」
http://ja.wikipedia.org/wiki/System/360

# re: 不便な基準でも普及してしまえば標準基準になる 2007/10/09 22:19 Ognac

>ググってみた 「IBM System/360」

おお、ありがたき情報。知らなかったです。IBMは一旦EBCDICを捨てようとしたのだ。将来性なしということは解っていたのですね。しかし普及したBCD環境を覆すことはできなかった。
うーん、やはり不十分な規格でも普及してしまったら取り返しが着かないですね。
ウン? ということはトークンリングもそうかな http://ja.wikipedia.org/wiki/%E3%83%88%E3%83%BC%E3%82%AF%E3%83%B3%E3%83%AA%E3%83%B3%E3%82%B0
こちらは、潜在能力はイーサーより高いので、普及競争で負けただけか。
 EBCDICのコード配置がなぜこの配置になったかは不明なまま。 だれかご存知の方いませんかぁ。

# re: 不便な基準でも普及してしまえば標準基準になる 2007/10/09 22:46 片桐

EBCDICコードに関してはここですね。

http://en.wikipedia.org/wiki/EBCDIC

濃いお話が展開されてますぜ。
8Bitと7Bitの攻防の末、生まれたのがEBCDIC、だとかなんとか。
SiとSoを間違って消してえらい目にあってみたり、
まちがってキー押しちゃって全部半角カナ表示でぱにっくってみたり、
ああ、なにもかもが懐かしい。

Comp-3のテストデータ作るとき、
とりあえず上下段0埋めして、
データ区切りにソソソソ@を入れると正数のデータになったりとか(笑)
あー、なつかしい

ってつい去年までやってたくせに、自分w

# re: 不便な基準でも普及してしまえば標準基準になる 2007/10/09 23:59 Ognac

>濃いお話が展開されてますぜ。
面白いページ情報、ありがとうございます。まだ一部しか見てませんが面白い背景があるんですね。

>データ区切りにソソソソ@を入れると正数のデータになったりとか(笑)
この年代物の裏技、今も現役だったのですか。
コードページの関係で半角カタカナとalphabet小文字は共存できなかったですね。
ツール類は殆ど USA製だったので

ソソソソソソソソソソソソソソソソソソソソソソソソソソソ
カ VTOC DITTO outer キ
ツツツツツツツツツツツツツツツツツツツツツツツツツツツ

てな感じの帳票をLinePrinterが吐き出してました。もうン10年前の話ですが。

# re: 不便な基準でも普及してしまえば標準基準になる 2007/10/10 9:43 裏口

ちーと話をBCDに戻しますが、COBOLの世界ではA~Rは演算可能な数字です。
A(0xC1)~I(0xC9)が+1~+9に相当し、J(0xD1)~R(0xD9)が-1~-9に相当します。
実際にUnpackDecimalで+123は0xF1F2C3,-567は0xF5F6D7なのでcharではそれぞれ"12C","56P"となります。
# 当初はこれがどうやったら四則演算できるのか疑問でした。

有効数字の問題はプログラマ責任という点を除けば事務処理計算には非常に有用でした・・・。

# re: 不便な基準でも普及してしまえば標準基準になる 2007/10/10 9:58 安岡孝一

「将来のことを考えずに適当に策定した感じもする」ってのは、私も同感。『The Structure of SYSTEM/360, Part I』(IBM Systems Journal, Vol.3, No.2 (1964), pp.119-135)を読む限りでは、Gerrit Anne Blaauwは本当はASCII互換にしたかったみたいだし、むしろ過去(つまりはBCD)との互換性を優先しなきゃいけなかったんでしょうね…。

# re: 不便な基準でも普及してしまえば標準基準になる 2007/10/10 11:07 Ognac

>charではそれぞれ"12C","56P"となります。
unpackを文字列で扱うそうなりますね。
そういえば、コボルでバイナリー値か必要なとき, Pack数字をOccursでunion的にバイト分解して値を取得していた事を思い出した。
制御コードで任意のbinary値が必要になり苦肉の策で回避したっけ..遠い眼。

>本当はASCII互換にしたかったみたいだし、

IBMも根底はしっかりしているのね。なぜマーケティング部門に押されて半端な製品を出し且つグラつくのだろう。 商売上の必然の結果なのだろうか。

# Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You clearly know what youre talking about, why throw away your intelligence on just posting videos to your weblog when you could be giving us 2021/08/30 16:58 Write more, thats all I have to say. Literally, it

Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point.
You clearly know what youre talking about, why throw away your intelligence on just posting videos to your weblog
when you could be giving us something enlightening to read?

# Have you ever thought about adding a little bit more than just your articles? I mean, what you say is important and everything. Nevertheless just imagine if you added some great images or video clips to give your posts more, "pop"! Your content 2021/09/01 19:53 Have you ever thought about adding a little bit mo

Have you ever thought about adding a little bit more than just your articles?
I mean, what you say is important and everything. Nevertheless just imagine if you added some great images or video clips to give your posts more, "pop"!
Your content is excellent but with images and videos, this site could definitely be one
of the best in its niche. Excellent blog!

# Have you ever thought about adding a little bit more than just your articles? I mean, what you say is important and everything. Nevertheless just imagine if you added some great images or video clips to give your posts more, "pop"! Your content 2021/09/01 19:54 Have you ever thought about adding a little bit mo

Have you ever thought about adding a little bit more than just your articles?
I mean, what you say is important and everything. Nevertheless just imagine if you added some great images or video clips to give your posts more, "pop"!
Your content is excellent but with images and videos, this site could definitely be one
of the best in its niche. Excellent blog!

# Have you ever thought about adding a little bit more than just your articles? I mean, what you say is important and everything. Nevertheless just imagine if you added some great images or video clips to give your posts more, "pop"! Your content 2021/09/01 19:55 Have you ever thought about adding a little bit mo

Have you ever thought about adding a little bit more than just your articles?
I mean, what you say is important and everything. Nevertheless just imagine if you added some great images or video clips to give your posts more, "pop"!
Your content is excellent but with images and videos, this site could definitely be one
of the best in its niche. Excellent blog!

# Have you ever thought about adding a little bit more than just your articles? I mean, what you say is important and everything. Nevertheless just imagine if you added some great images or video clips to give your posts more, "pop"! Your content 2021/09/01 19:56 Have you ever thought about adding a little bit mo

Have you ever thought about adding a little bit more than just your articles?
I mean, what you say is important and everything. Nevertheless just imagine if you added some great images or video clips to give your posts more, "pop"!
Your content is excellent but with images and videos, this site could definitely be one
of the best in its niche. Excellent blog!

# I think the admin of this site is in fact working hard in support of his site, as here every information is quality based data. 2021/09/03 2:01 I think the admin of this site is in fact working

I think the admin of this site is in fact working hard in support of his site, as here every
information is quality based data.

# I think the admin of this site is in fact working hard in support of his site, as here every information is quality based data. 2021/09/03 2:02 I think the admin of this site is in fact working

I think the admin of this site is in fact working hard in support of his site, as here every
information is quality based data.

# I think the admin of this site is in fact working hard in support of his site, as here every information is quality based data. 2021/09/03 2:03 I think the admin of this site is in fact working

I think the admin of this site is in fact working hard in support of his site, as here every
information is quality based data.

# Exceptional post but I was wanting to know if you could write a litte more on this topic? I'd be very thankful if you could elaborate a little bit further. Kudos! 2021/09/04 21:30 Exceptional post but I was wanting to know if you

Exceptional post but I was wanting to know
if you could write a litte more on this topic? I'd
be very thankful if you could elaborate a little bit further.
Kudos!

# Exceptional post but I was wanting to know if you could write a litte more on this topic? I'd be very thankful if you could elaborate a little bit further. Kudos! 2021/09/04 21:31 Exceptional post but I was wanting to know if you

Exceptional post but I was wanting to know
if you could write a litte more on this topic? I'd
be very thankful if you could elaborate a little bit further.
Kudos!

# Exceptional post but I was wanting to know if you could write a litte more on this topic? I'd be very thankful if you could elaborate a little bit further. Kudos! 2021/09/04 21:32 Exceptional post but I was wanting to know if you

Exceptional post but I was wanting to know
if you could write a litte more on this topic? I'd
be very thankful if you could elaborate a little bit further.
Kudos!

# Exceptional post but I was wanting to know if you could write a litte more on this topic? I'd be very thankful if you could elaborate a little bit further. Kudos! 2021/09/04 21:33 Exceptional post but I was wanting to know if you

Exceptional post but I was wanting to know
if you could write a litte more on this topic? I'd
be very thankful if you could elaborate a little bit further.
Kudos!

# When some one searches for his necessary thing, so he/she wishes to be available that in detail, therefore that thing is maintained over here. https://parttimejobshiredin30minutes.wildapricot.org/ part time jobs hired in 30 minutes 2021/10/22 22:28 When some one searches for his necessary thing, so

When some one searches for his necessary thing, so he/she wishes to
be available that in detail, therefore that thing is maintained over here.

https://parttimejobshiredin30minutes.wildapricot.org/ part time jobs hired in 30 minutes

# These are truly great ideas in concerning blogging. You have touched some pleasant things here. Any way keep up wrinting. 2021/12/08 14:15 These are truly great ideas in concerning blogging

These are truly great ideas in concerning blogging.

You have touched some pleasant things here. Any way keep up wrinting.

# These are truly great ideas in concerning blogging. You have touched some pleasant things here. Any way keep up wrinting. 2021/12/08 14:16 These are truly great ideas in concerning blogging

These are truly great ideas in concerning blogging.

You have touched some pleasant things here. Any way keep up wrinting.

# These are truly great ideas in concerning blogging. You have touched some pleasant things here. Any way keep up wrinting. 2021/12/08 14:16 These are truly great ideas in concerning blogging

These are truly great ideas in concerning blogging.

You have touched some pleasant things here. Any way keep up wrinting.

# These are truly great ideas in concerning blogging. You have touched some pleasant things here. Any way keep up wrinting. 2021/12/08 14:17 These are truly great ideas in concerning blogging

These are truly great ideas in concerning blogging.

You have touched some pleasant things here. Any way keep up wrinting.

# by prednisone w not prescription - https://prednisonesale.pro/# 2023/04/22 15:23 Prednisone

by prednisone w not prescription - https://prednisonesale.pro/#

# buy cytotec over the counter - https://cytotecsale.pro/# 2023/04/29 4:53 Cytotec

buy cytotec over the counter - https://cytotecsale.pro/#

# nausea medication over the counter https://overthecounter.pro/# 2023/05/08 22:58 OtcJikoliuj

nausea medication over the counter https://overthecounter.pro/#

# aarp approved canadian pharmacies https://pillswithoutprescription.pro/# 2023/05/16 9:45 PillsPro

aarp approved canadian pharmacies https://pillswithoutprescription.pro/#

# cost of prednisone 40 mg https://prednisonepills.pro/# - prednisone 20mg 2023/06/05 5:28 Prednisone

cost of prednisone 40 mg https://prednisonepills.pro/# - prednisone 20mg

# paxlovid cost without insurance https://paxlovid.store/
buy paxlovid online 2023/07/13 21:51 Paxlovid

paxlovid cost without insurance https://paxlovid.store/
buy paxlovid online

# what is the best ed pill https://edpillsotc.store/# - cheapest ed pills 2023/10/08 1:22 EdPills

what is the best ed pill https://edpillsotc.store/# - cheapest ed pills

# where can i get doxycycline https://doxycycline.forum/ doxycycline 150 mg 2023/11/25 13:22 Doxycycline

where can i get doxycycline https://doxycycline.forum/ doxycycline 150 mg

# medication for ed dysfunction https://edpills.tech/# otc ed pills 2023/12/23 8:19 EdPills

medication for ed dysfunction https://edpills.tech/# otc ed pills

# eva elfie modeli https://evaelfie.pro/ eva elfie izle 2024/03/03 10:28 EvaElfia

eva elfie modeli https://evaelfie.pro/ eva elfie izle

# Abella Danger https://abelladanger.online/ abella danger filmleri
2024/03/04 15:14 Adella

Abella Danger https://abelladanger.online/ abella danger filmleri

# eva elfie full videos https://evaelfie.site/ eva elfie videos
2024/03/07 2:14 EvaElfie

eva elfie full videos https://evaelfie.site/ eva elfie videos

# aviator online https://aviatormocambique.site aviator
2024/03/11 20:57 AviatorMaz

aviator online https://aviatormocambique.site aviator

# gates of olympus hilesi - https://gatesofolympus.auction/ gates of olympus demo türkçe oyna 2024/03/27 20:45 Olympic

gates of olympus hilesi - https://gatesofolympus.auction/ gates of olympus demo türkçe oyna

タイトル
名前
Url
コメント