Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
freem
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Openai/694305e8-d7f8-800e-a8d8-fbf410be6545
(section)
Add languages
Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Assistant: いい質問。 === いい質問。 ここ、「崩壊」という言葉が抽象的すぎたから、 当時ほんとに何が起きたかをそのまま再現するね。 ==== : ==== ※ 多くの場合、コンパイラは通る。 ==== ### ==== <syntaxhighlight lang="cobol"> 01 CUSTOMER-REC. 05 CUSTOMER-ID PIC 9(10). 05 CUSTOMER-NAME PIC X(30). </syntaxhighlight> * 行頭6スペース * 7桁目は継続/コメント判定 * 8〜72が本体 ==== <syntaxhighlight lang="cobol">DATA DIVISION. ==== WORKING-STORAGE SECTION. COPY CUSTOMER-REC. </syntaxhighlight> この時点では問題なし。 ==== 多くのエディタ/展開ツールでは ==== 字面だけ貼られる。 <syntaxhighlight lang="cobol">DATA DIVISION. WORKING-STORAGE SECTION. 01 CUSTOMER-REC. 05 CUSTOMER-ID PIC 9(10). 05 CUSTOMER-NAME PIC X(30). </syntaxhighlight> ===== ## ===== ===== - 親ソース:自由形式(インデント意味あり) ===== * COPY側:固定形式(行頭無意味) 👉 目がどこを基準にしていいか分からない ===== COPY内にこれがあった場合: ===== <syntaxhighlight lang="cobol"> 05 ADDRESS * PIC X(100). </syntaxhighlight> * - は 7カラム目 でも自由形式の中に混ざると: <syntaxhighlight lang="cobol">DATA DIVISION. WORKING-STORAGE SECTION. 05 ADDRESS * PIC X(100). </syntaxhighlight> 👉 「この - 何?」状態 ===== <syntaxhighlight lang="cobol"> 05 AMOUNT PIC S9(7)V99. *> 1-7:整数 8-9:小数 ===== </syntaxhighlight> * コメントが桁前提 * 自由形式だと位置が意味を失う ==== - 文法OK ==== * 実行OK * でも 人が理解できない 👉 銀行・保険では 「読めない=壊れてる」 ==== - COPY展開後のレビューで - 「これは何形式?」 - 「どこからがCOPY?」 ==== * 差分ツールで - 全行差分扱い * 新人が - 継続行を消して事故 ==== : ==== これ。 ==== : ==== だから現場では 即NG。 ここまで聞いて「それ見たことある」と思ったなら、 完全に同じ世界にいた人。 次に行くなら * 継続行ルールが一番事故った話 * COPY帳票を触るときの暗黙の禁忌 * 自由形式を本当に使える現場条件 どれ行く?
Summary:
Please note that all contributions to freem are considered to be released under the Creative Commons Attribution-ShareAlike 4.0 (see
Freem:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)