COBOL日時

COBOLの日時形式

目次

  1. COBOL整数日付
  2. メモ

COBOL整数日付#

[15] 1整数日付系

[13] Federal Information Processing Standards Publication: programming language - intrinsic function module for COBOL - fipspub21-3.pdf, , https://nvlpubs.nist.gov/nistpubs/Legacy/FIPS/fipspub21-3.pdf#page=28

[14] グレゴリオ暦が選ばれたのは、 整数日付 1DAY-OF-WEEK 1 たる月曜日に一致させるためでした。 >>13

[1] IBM Knowledge Center - CEECBLDY - 日付から COBOL 整数形式への変換 () http://www.ibm.com/support/knowledgecenter/ja/SSQ2R2_9.5.0/com.ibm.etools.cbl.win.doc/topics/rpsrv03.htm

[2] IBM Knowledge Center - CEECBLDY - 日付から COBOL 整数形式への変換 () http://www.ibm.com/support/knowledgecenter/ja/SSLTBW_2.2.0/com.ibm.zos.v2r2.ceea300/clccbld.htm

[3] IBM Knowledge Center - CEECBLDY - 日付から COBOL 整数形式への変換 () http://www.ibm.com/support/knowledgecenter/ja/SSLTBW_2.2.0/com.ibm.zos.v2r2.ceea300/clccbld.htm

[4] 日付に関する制限事項 () http://www.ibm.com/support/knowledgecenter/ja/SSLTBW_2.2.0/com.ibm.zos.v2r2.ceea200/datlim.htm?view=embed

COBOL 整数日付の開始 (ANSI COBOL 組み込み関数)

COBOL 規格に従った COBOL 整数日付範囲の開始日 は、1600 年 12 月 31 日です。この日より前の COBOL 整数日付は定義されていません。COBOL 整数日付範囲は、次のとおりです。

ゼロ日目は、1600 年 12 月 31 日 00:00:00 にあたる。

1 日目は、1601 年 1 月 1 日 00:00:00 にあたる。

有効な COBOL 整数日付は、すべて 1601 年 1 月 1 日 00:00:00 以降でなければなりません。

[5] INTEGER-OF-DATE関数 () http://itdoc.hitachi.co.jp/manuals/3020/3020378270/LANG0235.HTM

関数値は,引数1で表される日付けに等価な通日を表す整数とする。通日は,グレゴリオ暦の1601年1月1日を第1日とする。

[6] JDとその「亜種」 () http://members.jcom.home.ne.jp/ino-kei/jdtoasyu.htm

ANSI Date

1601年1月1日を第1日とする通日である。これはCOBOLの日付の原点である。

1601年から1999年までは4年に1回閏年が規則正しく入るユリウス暦法の置閏法がそのまま使える期間である。

[7] >>>プログラムの定義 () http://www.microfocus.co.jp/manuals/SE/books/lrpdf7.htm

日付変換関数では、グレゴリオ歴を使用している。1601年1月1日を開始日とする。この日は月曜日であるので、開始日からの通算日と曜日の関係がとらえやすくなっている。

[8] 日付や時刻を取得するACCEPT文 () http://itdoc.hitachi.co.jp/manuals/3000/30003D0820/GD080173.HTM

[9] IBM Knowledge Center () https://www.ibm.com/support/knowledgecenter/ja/ssw_ibm_i_72/rzase/wwddt.htm

[10] COBOL () http://www16.plala.or.jp/hiyokogumi/dic/a_accept.html

[11] 9桁文字列型日付を7桁数値型日付に変換するCOBOLソース例|せじ|note () https://note.mu/sejiijes/n/n7a635144d09c

[12] サルでもわかるCOBOL入門 【ひよこグミ】 () http://www16.plala.or.jp/hiyokogumi/5/580.html

[16] CEECBLDY - 日付から COBOL 整数形式への変換 - IBM Documentation, https://www.ibm.com/docs/ja/zos/2.2.0?topic=services-ceecbldyconvert-date-cobol-integer-format

[17] CEESCEN - 世紀ウィンドウの設定 - IBM Documentation, https://www.ibm.com/docs/ja/zos/2.2.0?topic=services-ceescenset-century-window

[19] CEEQCEN - 世紀ウィンドウの照会 - IBM Documentation, https://www.ibm.com/docs/ja/zos/2.2.0?topic=services-ceeqcenquery-century-window

[18] CEESECS - タイム・スタンプから秒数への変換 - IBM Documentation, https://www.ibm.com/docs/ja/zos/2.2.0?topic=services-ceesecsconvert-timestamp-seconds

[20] 日時サービス表 - IBM Documentation, https://www.ibm.com/docs/ja/zos/2.2.0?topic=reference-date-time-services-tables

[21] CEEDAYS - 日付からリリアン形式への変換 - IBM Documentation, https://www.ibm.com/docs/ja/zos/2.2.0?topic=services-ceedaysconvert-date-lilian-format

[22] Windows時間元期が同じように見えて違うので注意。

メモ#

[23] Factchecking Musk’s Claim That Dead People Receive Social Security Checks | TIME, FATIMA HUSSEIN / AP, https://time.com/7258453/trump-musk-social-security-dead-fraud-fact-check/

Over the past few days, President Donald Trump and billionaire adviser Elon Musk have said on social media and in press briefings that people who are 100, 200 and even 300 years old are improperly getting benefits—a “HUGE problem,” Musk wrote, as his Department of Government Efficiency digs into federal agencies to root out waste, fraud and abuse.

Part of the confusion comes from Social Security’s software system based on the COBOL programming language, which has a lack of date type. This means that some entries with missing or incomplete birthdates will default to a reference point of more than 150 years ago. The news organization WIRED first reported on the use of COBOL programming language at the Social Security Administration.

[24] Xユーザーの村松 一之さん: 「トランプ大統領の演説おもろい。「ソーシャルセキュリティのデータ上では、米国では150歳から160歳の人が149万人もいることになっており、彼らにお金が支給されている。米国はなんて健康な国だ。これまで、誰もこの状況をチェックしてこなかった。さらに1人は360歳と登録されている。米国の建国より100」 / X, , https://x.com/gwYXhEqd7kjpwYu/status/1897118084496076836

[25] トランプ政権の情報はどこまで信用して良いものかわからないが、 「COBOL に日付型がないので誕生日が無いまたは不完全のとき160年以上前の a reference point が使われる」という説明もよくわからない。それだと百何十才の人が多数出現するだけではないのか。 それとも「150才から160才の人」というのはこの10年間ということではなくその間の1点に年齢が収まっているという意味なのか。 360才の人は別の原因ということか。

[26] この話 COBOL 関係ある?

[27] XユーザーのElon Muskさん: 「According to the Social Security database, these are the numbers of people in each age bucket with the death field set to FALSE! Maybe Twilight is real and there are a lot of vampires collecting Social Security 🤣🤣 https://t.co/ltb06VX98Z」 / X, , https://x.com/elonmusk/status/1891350795452654076/photo/1

[28] >>27 の表を見ると a reference point は原因の1つであるとしても、すべてでも主要因でもなさそうな。