{"id":2205,"date":"2012-11-09T12:25:56","date_gmt":"2012-11-09T03:25:56","guid":{"rendered":"http:\/\/www.lancard.com\/blog\/?p=2205"},"modified":"2025-03-12T11:29:20","modified_gmt":"2025-03-12T02:29:20","slug":"opencobol%e3%81%a7%e5%8d%b0%e5%88%b7%e6%a9%9f%e8%83%bd%e6%8b%a1%e5%bc%b5%e3%82%b3%e3%83%bc%e3%83%89%e5%81%b4","status":"publish","type":"post","link":"https:\/\/www.lancard.com\/blog\/2012\/11\/09\/opencobol%e3%81%a7%e5%8d%b0%e5%88%b7%e6%a9%9f%e8%83%bd%e6%8b%a1%e5%bc%b5%e3%82%b3%e3%83%bc%e3%83%89%e5%81%b4\/","title":{"rendered":"OpenCOBOL\u3067\u5370\u5237\u6a5f\u80fd\u62e1\u5f35(\u30b3\u30fc\u30c9\u5074)"},"content":{"rendered":"<p>OpenCOBOL-1.1\u306f\u5370\u5237\u306b\u95a2\u3057\u3066\u306f\u6539\u884c\u307e\u305f\u306f\u6539\u30da\u30fc\u30b8\u7a0b\u5ea6\u3057\u304b\u30b1\u30a2\u3057\u3066\u304f\u308c\u307e\u305b\u3093\u3002\u305d\u306e\u307e\u307e\u3067\u306f\u696d\u52d9\u3067\u306f\u4f7f\u3044\u3065\u3089\u3044\u306e\u3067\u8272\u3005\u3068\u62e1\u5f35\u3057\u3066\u5f0a\u793e\u3067\u306f\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002\u5370\u5237\u6a5f\u80fd\u3068\u3044\u3046\u3068REPORT caluse \u3067REPORT IS hoge\u306a\u3069\u3067\u5b9a\u7fa9\u3057\u3066\u4f7f\u3046\u306e\u304c\u4e00\u822c\u7684\u3067\u3059\u304c\u3001\u3053\u306e\u3042\u305f\u308a\u306f\u5404\u793e\u62e1\u5f35\u3057\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u5f0a\u793e\u3067\u5bfe\u5fdc\u3057\u305f\u5148\u3067\u306f\u3001\u5b9a\u7fa9\u306bCHARACTER TYPE fontname COLUMN pos \u5f62\u5f0f\u3067\u66f8\u3051\u308b\u62e1\u5f35\u304c\u3055\u308c\u3066\u3044\u307e\u3057\u305f\u306e\u3067cobc\/parser.y \u4ed6\u306b\u624b\u3092\u5165\u308c\u3066\u540c\u69d8\u306e\u69cb\u6587\u304c\u51e6\u7406\u3067\u304d\u308b\u3088\u3046\u306b\u62e1\u5f35\u3057\u3066\u3044\u307e\u3059(\u3064\u307e\u308a\u3001\u5143\u306e\u6c4e\u7528\u6a5f\u6a5f\u7a2e\u306eCOBOL\u30bd\u30fc\u30b9\u306b\u3088\u3063\u3066\u306f\u305d\u306e\u307e\u307e\u30b3\u30f3\u30d1\u30a4\u30eb\u304c\u901a\u308a\u307e\u3059\uff09\u3002<\/p>\n<pre lang=\"COBOL\">\r\n           02  FILLER                  PIC N(13) CHARACTER TYPE KM-12P\r\n                                VALUE  \"\u30c0\u30f3\u30d7\u30ea\u30b9\u30c8\" .\r\n           02  FILLER                  PIC X(14) VALUE SPACE.\r\n           02  FILLER                  PIC N(04) CHARACTER TYPE KM-7P\r\n                                           VALUE \"\u4f5c\u6210\u65e5\" .\r\n           02  H01-YY                  PIC Z9.\r\n           02  FILLER                  PIC N(02) CHARACTER TYPE KM-7P\r\n                                           VALUE \"\u5e74\u3000\" .\r\n           02  H01-MM                  PIC Z9.\r\n           02  FILLER                  PIC N(02) CHARACTER TYPE KM-7P\r\n                                           VALUE \"\u6708\u3000\" .\r\n<\/pre>\n<p>\u4e0a\u8a18\u3067\u306fKM-7P\u307e\u305f\u306fKM-12P\u3068\u3044\u3046\u30d5\u30a9\u30f3\u30c8\u540d\u3067\u5bfe\u5fdc\u3059\u308b\u6587\u5b57\u5217\u3092\u5370\u5b57\u3059\u308b\u3088\u3046\u306b\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001<\/p>\n<pre lang=\"COBOL\">\r\n       01  W-WORK.\r\n           02  W-SEIRNO                PIC ZZZZZZZ9         COLUMN    4.\r\n           02  W-YMD                   PIC X(08)            COLUMN   13.\r\n           02  W-KIN                   PIC ZZZZ,ZZZ,ZZZ,ZZ9 COLUMN   22.\r\n<\/pre>\n<p>\u4e0a\u8a18\u3067\u306f\u5370\u5b57\u4f4d\u7f6e\u3092 COLUMN\u3067\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u3055\u3066\u3001\u3053\u308c\u3089\u3092\u5185\u90e8\u7684\u306b\u3069\u306e\u3088\u3046\u306b\u51e6\u7406\u3057\u3066\u3044\u308b\u306e\u304b\u3068\u8a00\u3044\u307e\u3059\u3068\u3001\u5f53\u521d(2010\u301c2011\u5e74\u9803)\u53d6\u308a\u304b\u304b\u3063\u305f\u9803\u306f\u6587\u5b57\u30d5\u30a9\u30f3\u30c8\u6307\u5b9a\u3084\u6587\u5b57\u4f4d\u7f6e\u6307\u5b9a\u3092\u30b3\u30f3\u30d1\u30a4\u30eb\u4e2d\u306b\u300c\u96a0\u308cFILLER\u300d\u3068\u3057\u3066\u5b9a\u7fa9\u3092\u57cb\u3081\u8fbc\u3093\u3067\u3044\u305f\u306e\u3067\u3059\u304c\u3001GROUP\u9805\u76ee\u3092MOVE\u3059\u308b\u3068\u304d\u306b\u30b5\u30a4\u30ba\u304c\u7570\u306a\u3063\u3066\u3057\u307e\u3046\u3068\u3044\u3046\u554f\u984c\u306b\u3042\u305f\u308a\u307e\u3057\u305f\u3002\u305d\u3053\u3067\u3001WRITE\u6642\u306bCHARACTER TYPE\u307e\u305f\u306fCOLUMN\u306b\u5bfe\u5fdc\u3059\u308b\u60c5\u5831\u306b\u3057\u305f\u304c\u3063\u3066\u5225\u306e\u30d0\u30c3\u30d5\u30a1\u306b\u5024\u3092\u8a70\u3081\u76f4\u3059\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u308c\u306f\u5370\u5237\u306b\u4fc2\u308f\u308b\u51fa\u529b\u3078\u306eWRITE\u6642\u3060\u3051\u52b9\u304f\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u901a\u5e38\u306eMOVE\u6642\u3084\u5370\u5237\u306b\u95a2\u9023\u3057\u306a\u3044\u51fa\u529b\u3067\u306f\u5f71\u97ff\u3092\u53d7\u3051\u306a\u3044\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u5370\u5237\u6a5f\u80fd\u306f\u5370\u5237\u7528\u306eWRITE\u3092\u547c\u3073\u51fa\u3059\u524d\u306b\u3001\u4ee5\u4e0b\u306e\u69d8\u306a\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u3053\u3068\u3067\u5b9f\u73fe\u3057\u3066\u304a\u308a\u3001\u3053\u306e\u95a2\u6570\u306f\u5143\u306e\u5370\u5237\u5b9a\u7fa9\u306b\u3057\u305f\u304c\u3063\u3066\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u81ea\u52d5\u751f\u6210\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre lang=\"C\">\r\ncob_move_with_W_WORK (cob_field *from, cob_field *to, const int size)\r\n{\r\n    unsigned char *fp = from->data;\r\n    unsigned char *tp = to->data;\r\n    unsigned int i1   = 0;\r\n    unsigned int i2   = 0;\r\n    unsigned int i3   = 0;\r\n    \/\/ name= W-SEIRNO \r\n    memcpy(tp, \"\\x1b[4G\", 4);\r\n    tp += 4;\r\n    memcpy(tp, fp, 8);\r\n    tp += 8;\r\n    fp += 8;\r\n    \/\/ name= W-YMD \r\n    memcpy(tp, \"\\x1b[13G\", 5);\r\n    tp += 5;\r\n    memcpy(tp, fp, 8);\r\n    tp += 8;\r\n    fp += 8;\r\n    \/\/ name= W-KIN \r\n    memcpy(tp, \"\\x1b[22G\", 5);\r\n    tp += 5;\r\n    memcpy(tp, fp, 16);\r\n    tp += 16;\r\n    fp += 16;\r\n\/\/ \u4ee5\u4e0b\u7565\r\n<\/pre>\n<p>\u300c\\x1b [ col G\u300d\u306e\u3088\u3046\u306a\u30a8\u30b9\u30b1\u30fc\u30d7\u30b7\u30fc\u30b1\u30f3\u30b9\uff08\u591a\u5206\u82e5\u3044\u4eba\u306f\u3054\u5b58\u3058\u306a\u3044\uff1f\uff09\u3092\u5370\u5237\u51fa\u529b\u7528\u306e\u4e2d\u9593\u30c7\u30fc\u30bf\u306b\u5410\u304d\u51fa\u3059\u3053\u3068\u3067\u300ccol\u30ab\u30e9\u30e0\u76ee\u306b\u79fb\u52d5\u300d\u306e\u3088\u3046\u306a\u6307\u793a\u3092\u4eee\u60f3\u30e9\u30a4\u30f3\u30d7\u30ea\u30f3\u30bf\uff08PDF\u51fa\u529b\u7528\uff09\u306b\u9001\u308a\u51fa\u3057\u3066\u3044\u307e\u3059\u3002\u4eee\u60f3\u30e9\u30a4\u30f3\u30d7\u30ea\u30f3\u30bf\u5074\u3067\u306f\u3053\u306e\u3088\u3046\u306a\u30a8\u30b9\u30b1\u30fc\u30d7\u30b7\u30fc\u30b1\u30f3\u30b9\u4ee5\u5916\u306b\u3082\u3001\u30d7\u30ea\u30f3\u30bf\u306e\u30ab\u30fc\u30bd\u30eb\u4f4d\u7f6e\u3092\u76f4\u63a5\u6307\u5b9a\u3059\u308b\u3088\u3046\u306a\u30d0\u30a4\u30ca\u30ea\u30b3\u30fc\u30c9\u306b\u3082\u5bfe\u5fdc\u3055\u305b\u307e\u3057\u305f\u306e\u3067\u3001\u5370\u5237\u5e33\u7968\u306b\u95a2\u9023\u3059\u308bCOBOL\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u79fb\u690d\u306b\u3064\u3044\u3066\u304b\u306a\u308a\u67d4\u8edf\u306b\u5bfe\u5fdc\u51fa\u6765\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<br \/>\n\u305d\u3057\u3066\u3001\u300c\u4f55\u884c\u51fa\u529b\u3057\u305f\u3089\u6539\u30da\u30fc\u30b8\u300d\u300c\u30c7\u30fc\u30bf\u304c\u7d9a\u3044\u3066\u3044\u305f\u3089\u9023\u7d9a\u51fa\u529b\u3001\u5909\u308f\u3063\u305f\u3089\u6539\u30da\u30fc\u30b8\u300d\u306e\u3088\u3046\u306a\u5370\u5237\u5e33\u7968\u306b\u3042\u308a\u304c\u3061\u306a\u51e6\u7406\u306b\u3064\u3044\u3066\u30ed\u30b8\u30c3\u30af\u306b\u624b\u3092\u5165\u308c\u308b\u3053\u3068\u7121\u304f\u305d\u306e\u307e\u307e\u79fb\u690d\u51fa\u6765\u3066\u3057\u307e\u3046\u3068\u8a00\u3046\u5229\u70b9\u304c\u3042\u308a\u3001COBOL\u3067\u5e33\u7968\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u79fb\u690d\u306b\u304a\u56f0\u308a\u306e\u65b9\u306b\u306f\u5927\u5909\u6709\u7528\u306a\u30bd\u30ea\u30e5\u30fc\u30b7\u30e7\u30f3\u3060\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-facebook nolightbox\" data-provider=\"facebook\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Facebook\" href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F2205&#038;t=OpenCOBOL%E3%81%A7%E5%8D%B0%E5%88%B7%E6%A9%9F%E8%83%BD%E6%8B%A1%E5%BC%B5%28%E3%82%B3%E3%83%BC%E3%83%89%E5%81%B4%29&#038;s=100&#038;p&#091;url&#093;=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F2205&#038;p&#091;images&#093;&#091;0&#093;=&#038;p&#091;title&#093;=OpenCOBOL%E3%81%A7%E5%8D%B0%E5%88%B7%E6%A9%9F%E8%83%BD%E6%8B%A1%E5%BC%B5%28%E3%82%B3%E3%83%BC%E3%83%89%E5%81%B4%29\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"Facebook\" title=\"Share on Facebook\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/facebook.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"http:\/\/twitter.com\/share?url=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F2205&#038;text=OpenCOBOL%E3%81%A7%E5%8D%B0%E5%88%B7%E6%A9%9F%E8%83%BD%E6%8B%A1%E5%BC%B5%28%E3%82%B3%E3%83%BC%E3%83%89%E5%81%B4%29\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F2205&#038;title=OpenCOBOL%E3%81%A7%E5%8D%B0%E5%88%B7%E6%A9%9F%E8%83%BD%E6%8B%A1%E5%BC%B5%28%E3%82%B3%E3%83%BC%E3%83%89%E5%81%B4%29\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/linkedin.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-tumblr nolightbox\" data-provider=\"tumblr\" target=\"_blank\" rel=\"nofollow\" title=\"Share on tumblr\" href=\"https:\/\/tumblr.com\/share?s=&#038;v=3&#038;t=OpenCOBOL%E3%81%A7%E5%8D%B0%E5%88%B7%E6%A9%9F%E8%83%BD%E6%8B%A1%E5%BC%B5%28%E3%82%B3%E3%83%BC%E3%83%89%E5%81%B4%29&#038;u=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F2205\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"tumblr\" title=\"Share on tumblr\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/tumblr.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-mail nolightbox\" data-provider=\"mail\" rel=\"nofollow\" title=\"Share by email\" href=\"mailto:?subject=OpenCOBOL%E3%81%A7%E5%8D%B0%E5%88%B7%E6%A9%9F%E8%83%BD%E6%8B%A1%E5%BC%B5%28%E3%82%B3%E3%83%BC%E3%83%89%E5%81%B4%29&#038;body=%E3%82%B7%E3%82%A7%E3%82%A2%E3%81%99%E3%82%8B%EF%BC%9A:%20https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F2205\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"mail\" title=\"Share by email\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/mail.png\" \/><\/a>","protected":false},"excerpt":{"rendered":"<p>OpenCOBOL-1.1\u306f\u5370\u5237\u306b\u95a2\u3057\u3066\u306f\u6539\u884c\u307e\u305f\u306f\u6539\u30da\u30fc\u30b8\u7a0b\u5ea6\u3057\u304b\u30b1\u30a2\u3057\u3066\u304f\u308c\u307e\u305b\u3093\u3002\u305d\u306e\u307e\u307e\u3067\u306f\u696d\u52d9\u3067\u306f\u4f7f\u3044\u3065\u3089\u3044\u306e\u3067\u8272\u3005\u3068\u62e1\u5f35\u3057\u3066\u5f0a\u793e\u3067\u306f\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002\u5370\u5237\u6a5f\u80fd\u3068\u3044\u3046\u3068REPORT caluse \u3067REPORT I [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,6,1],"tags":[134,84,86,88,87],"class_list":["post-2205","post","type-post","status-publish","format-standard","hentry","category-opencobol","category-server","category-1","tag-opencobol","tag-84","tag-86","tag-88","tag-87"],"_links":{"self":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/2205","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/comments?post=2205"}],"version-history":[{"count":6,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/2205\/revisions"}],"predecessor-version":[{"id":2211,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/2205\/revisions\/2211"}],"wp:attachment":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/media?parent=2205"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/categories?post=2205"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/tags?post=2205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}