{"id":370,"date":"2015-11-25T00:01:43","date_gmt":"2015-11-24T15:01:43","guid":{"rendered":"http:\/\/esoro.jp\/?p=370"},"modified":"2015-11-25T00:01:43","modified_gmt":"2015-11-24T15:01:43","slug":"p-com%e3%83%9e%e3%82%af%e3%83%ad%e3%81%a7%e3%83%9b%e3%82%b9%e3%83%88%e4%bd%9c%e6%a5%ad%e3%82%92%e8%87%aa%e5%8b%95%e5%8c%96","status":"publish","type":"post","link":"https:\/\/esoro.jp\/?p=370","title":{"rendered":"P-COM\u30de\u30af\u30ed\u3067\u30db\u30b9\u30c8\u4f5c\u696d\u3092\u81ea\u52d5\u5316"},"content":{"rendered":"<p>\u3000\u30db\u30b9\u30c8\uff08\uff1d\u30e1\u30a4\u30f3\u30d5\u30ec\u30fc\u30e0\uff09\u3063\u3066\u307e\u3060\u7d50\u69cb\u4f7f\u3063\u3066\u3044\u308b\u3068\u3053\u308d\u304c\u591a\u3044\u3088\u3046\u306b\u601d\u3044\u307e\u3059\u3002<br \/>\n\u7b46\u8005\u304c\u77e5\u308b\u9650\u308a(3270\u7cfb\u3057\u304b\u77e5\u308a\u307e\u305b\u3093\u304c)\u3001\u30a8\u30df\u30e5\u30ec\u30fc\u30bf\u306bPersonal Communications(P-COM)\u304bFalcon\u306e\u3069\u3061\u3089\u304b\u3092\u4f7f\u3063\u3066\u3044\u3066\u3001\u3069\u3061\u3089\u3082\u30de\u30af\u30ed\u6a5f\u80fd\u304c\u3042\u308a\u3001\u4e3b\u306b\u753b\u9762\u64cd\u4f5c\u3092\u81ea\u52d5\u5316\u3059\u308b\u3053\u3068\u304c\u51fa\u6765\u307e\u3059\u3002<br \/>\n \u3067\u3001\u3061\u3087\u3063\u3068\u524d\u306b\u3001\u3068\u3042\u308b\u30db\u30b9\u30c8\u306e\u904b\u7528\u4f5c\u696d\u3092\u81ea\u52d5\u5316\u3057\u305f\u3044\u3068\u3044\u3046\u8a71\u304c\u3042\u3063\u305f\u306e\u3067\u3001P-COM\u306e\u30db\u30b9\u30c8\u30fb\u30a2\u30af\u30bb\u30b9\u30fb\u30af\u30e9\u30b9\u30fb\u30e9\u30a4\u30d6\u30e9\u30ea\u30fc\u3092\u4f7f\u3063\u305fVB\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u3063\u3066\u307f\u307e\u3057\u305f\u3002P-COM\u306e\u30db\u30b9\u30c8\u30fb\u30a2\u30af\u30bb\u30b9\u30fb\u30af\u30e9\u30b9\u30fb\u30e9\u30a4\u30d6\u30e9\u30ea\u30fc\u306b\u3064\u3044\u3066\u306f\u4e0b\u8a18\u304c\u53c2\u8003\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n<a href=\"http:\/\/www-01.ibm.com\/support\/knowledgecenter\/SSEQ5Y_5.9.0\/com.ibm.pcomm.doc\/books\/html\/host_access08.htm?lang=ja\" target=\"_blank\">http:\/\/www-01.ibm.com\/support\/knowledgecenter\/SSEQ5Y_5.9.0\/com.ibm.pcomm.doc\/books\/html\/host_access08.htm?lang=ja<\/a><br \/>\n\u57fa\u672c\u7684\u306bP-COM\u8d77\u52d5\u3084\u30db\u30b9\u30c8\u63a5\u7d9a\u3001\u7d42\u4e86\u4ee5\u5916\u306f\u3001\u753b\u9762\u306e\u5ea7\u6a19\u8ef8\uff08\u7e26\u3068\u6a2a\uff09\u306b\u5bfe\u3057\u3066\u6587\u5b57\u3092\u5165\u529b\u3057\u305f\u308a\u3001\u6307\u5b9a\u5834\u6240\u306b\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u306e\u304c\u7279\u5b9a\u306e\u6587\u5b57\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3059\u308b\u3068\u3044\u3046\u7e70\u308a\u8fd4\u3057\u306b\u306a\u308b\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3001VBS\u3067\u306f\u305d\u308c\u3089\u3092\u30b5\u30d6\u30eb\u30fc\u30c1\u30f3\u306b\u3057\u3066\u307e\u3059\u3002<br \/>\n\u307e\u305f\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5f15\u6570\u3068\u3057\u3066\u3001\u30ed\u30b0\u30a4\u30f3ID\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u53ca\u3073\u3001\u4e8b\u524d\u306b\u7528\u610f\u304c\u5fc5\u8981\u306a\u63a5\u7d9a\u30d7\u30ed\u30d5\u30a1\u30a4\u30eb\uff08\u62e1\u5f35\u5b50\u304cws\u306e\u3084\u3064\uff09\u3092\u6307\u5b9a\u3059\u308b\u5f62\u306b\u306a\u3063\u3066\u307e\u3059\u3002<\/p>\n<pre class=\"lang:vb decode:true \" title=\"vbs\" >'\uff12\u79d2\uff0a\uff13\uff10\u3067\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u5224\u5b9a\r\nConst DEF_MAXCOUNT = 30\r\n\r\nDim oConnMGR, oECLPS, oECLOIA\r\nDim oParam, HUserID, HPassWd, ProFile\r\nDim i, idx\r\n\r\nSet oParam = WScript.Arguments\r\n\r\nFor idx = 0 To oParam.Count - 1 \r\n   Select Case idx\r\n   Case 0\r\n      HUserID = UCase( oParam(idx) )\r\n   Case 1\r\n      HPassWd = UCase( oParam(idx) )\r\n   Case 2\r\n      ProFile = oParam(idx)\r\n   End Select\r\nNext\r\n'''''\u5f15\u6570\u30a8\u30e9\u30fc\u51e6\u7406\u5272\u611b\r\n\r\n'PCOM\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210\r\nSet oConnMGR = CreateObject(\"PCOMM.autECLConnMgr\")\r\nSet oECLPS = CreateObject(\"PCOMM.autECLPS\")\r\nSet oECLOIA = CreateObject(\"PCOMM.autECLOIA\")\r\n\r\n'\u63a5\u7d9a\u958b\u59cb\r\nHost_Start\r\n\r\nIf Check_Host(\"DISP3270\") = false Then\r\n\tWScript.Sleep(10000)\r\n\tIf Check_Host(\"DISP3270\") = false Then\r\n\t\tHost_End\r\n\t\tWScript.Quit(-11)\r\n\tEnd If\r\nEnd If\r\n\r\n'(13\/01) \u30ed\u30b0\u30a4\u30f3 [LOGON \u30e6\u30fc\u30b6\u30fcID] + CTL\r\nHost_Input 13, 1, \"LOGON \" &amp; HUserID , \"[enter]\", 1\r\n\r\n'(8\/20) \u30d1\u30b9\u30ef\u30fc\u30c9 [      ] + CTL 2\u56de\r\nHost_Input 8, 20, HPassWd , \"[enter]\", 2\r\n\r\nDim iPutLine, InputCmd\r\n\r\n'\u753b\u9762\u9077\u79fb\u30c1\u30a7\u30c3\u30af (4,59) \u30e6\u30fc\u30b6\u30fcID\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3092\u30c1\u30a7\u30c3\u30af\r\nIf Host_OutputChk(4, 59, Len(HUserID), HUserID) = False Then\r\n\t'\u30a8\u30e9\u30fc\r\n\tHost_Input 0, 0, \"\", \"[pf3]\", 2\r\nEnd If\r\n\r\n\u30fb\u30fb\u30fb\u4ee5\u4e0b\u7701\u7565\r\n\r\n'\u7d42\u4e86\r\n'F3 2\u56de\u3067\u5f8c\u51e6\u7406\u3078\u623b\u308b\r\nHost_Input 0, 0, \"\", \"[pf3]\", 2\r\n\r\n'(5\/27) \u5370\u5237\u305b\u305a\u306b\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u3092\u524a\u9664\u300c\uff12\u300d\u3092\u9078\u629e [2] + CTL\r\nHost_Input 4, 27, \"2\", \"[enter]\", 1\r\n\r\n'(2\/01) \u30ed\u30b0\u30aa\u30d5 [LOGOFF] + CTL\r\nHost_Input 2, 1, \"LOGOFF\", \"[enter]\", 1\r\n\r\n'\u5207\u65ad\r\nHost_End\r\n\r\n'\u3053\u3053\u3067\u30b9\u30af\u30ea\u30d7\u30c8\u7d42\u4e86\r\nWScript.Quit(0)\r\n\r\n'\u4ee5\u4e0b\u30b5\u30d6\u30eb\u30fc\u30c1\u30f3\r\n'\uff11\u3000\u30db\u30b9\u30c8\u63a5\u7d9a\u958b\u59cb\r\nSub Host_Start\r\n\t\r\n\toConnMGR.autECLConnList.Refresh\r\n\t\r\n\t'\u4e8b\u524d\u306b\u53d6\u5f97\u3057\u305f\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u306e\u6570\u3060\u3051\u30eb\u30fc\u30d7\u3057\u3066\u63a5\u7d9a\u3092\u505c\u6b62\u3059\u308b\r\n\tFor i = 1 To oConnMGR.autECLConnList.Count   \r\n\t\toConnMGR.autECLConnList(i).StopCommunication()\r\n\t\tWScript.Sleep 5000\r\n\t\toConnMGR.StopConnection oConnMGR.autECLConnList(i).Name, \"saveprofile=no\"\r\n\t\tWScript.Sleep 5000\r\n\tNext\r\n\r\n\tDim strCmd\r\n\tstrCmd = \"profile=\" &amp; ProFile &amp; \" connname=A\"\r\n\toConnMGR.StartConnection strCmd \r\nEnd Sub\r\n\r\n'\uff12\u3000\u30db\u30b9\u30c8\u63a5\u7d9a\u7d42\u4e86\r\nSub Host_End\r\n\t\r\n\toConnMGR.autECLConnList.Refresh\r\n\tIf oConnMGR.autECLConnList.Count &gt; 0 Then\r\n\t\toConnMGR.StopConnection \"A\", \"saveprofile=no\"\r\n\t\tWScript.Sleep 3000\r\n\tEnd If\r\nEnd Sub\r\n\r\n'\uff13\u3000\u30db\u30b9\u30c8\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u53d6\u5f97\uff08\u63a5\u7d9a\u30bf\u30a4\u30d7\uff09\r\nFunction Check_Host(ConnType)\r\n\r\n\tFor i = 0 To DEF_MAXCOUNT\r\n\t\toConnMGR.autECLConnList.Refresh\r\n\t\tIf oConnMGR.autECLConnList.Count &gt; 0 Then\r\n\t\t\tExit For\r\n\t\tEnd If\r\n\t\tWScript.Sleep 2000\r\n\tNext\r\n\r\n\tFor i = 1 To oConnMGR.autECLConnList.Count   '\u53d6\u5f97\u3057\u305f\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u306e\u6570\u3060\u3051\u30eb\u30fc\u30d7\r\n\t    If oConnMGR.autECLConnList(i).ConnType = ConnType Then\r\n\t        '\u8a72\u5f53\u30bb\u30c3\u30b7\u30e7\u30f3\u306e\u30cf\u30f3\u30c9\u30eb\u304b\u3089\u30bb\u30c3\u30b7\u30e7\u30f3\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30bb\u30c3\u30c8\r\n\t        oECLPS.SetConnectionByHandle (oConnMGR.autECLConnList(i).Handle)\r\n\t        oECLOIA.SetConnectionByHandle (oConnMGR.autECLConnList(i).Handle)\r\n\t        Exit For\r\n\t    End If\r\n\tNext\r\n\tCheck_Host = True\r\n\tIf i &gt; oConnMGR.autECLConnList.Count Then\r\n\t\tCheck_Host = False\r\n\tElse\r\n\t\tFor i = 0 To DEF_MAXCOUNT\r\n\t\t\tWScript.Sleep 2000\r\n\t\t\t'\u51e6\u7406\u5b8c\u4e86\u5f85\u3061\r\n\t\t\tIf oECLOIA.InputInhibited = 0 Then\r\n\t\t\t\tIf Host_OutputChk(12, 16, 5, \"*****\") = True Then\r\n\t\t\t\t\tExit For\r\n\t\t\t\tEnd If\r\n\t\t\tEnd If\r\n\t\tNext\r\n\t\t'\u8d77\u52d5\u78ba\u8a8d\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\r\n\t\tIf i &gt;= DEF_MAXCOUNT Then\r\n\t\t\tHost_End\r\n\t\t\tWScript.Quit(-2)\r\n\t\tEnd If\r\n\tEnd If\r\n\r\nEnd Function\r\n\r\n'\uff14\u3000\u30db\u30b9\u30c8\u753b\u9762\u3078\u306e\u5165\u529b\uff08Y\u5ea7\u6a19\u3001X\u5ea7\u6a19\u3001\u6587\u5b57\u5217\u3001\u30ad\u30fc\u5165\u529b\u3001\u30ad\u30fc\u5165\u529b\u56de\u6570\uff09\r\nSub Host_Input(argY, argX, argStr, argKeyStr, argKeyCnt)\r\n\tDim iKey\r\n\t\r\n\tIf argY &lt;&gt; 0 And argX &lt;&gt; 0 Then\r\n\t\toECLPS.SetCursorPos argY, argX\r\n\t\toECLPS.SendKeys argStr\r\n\tEnd If\r\n\t\r\n\t'\u30a8\u30f3\u30bf\u30fc\u30ad\u30fc\r\n\tIf argKeyStr &lt;&gt; \"\" Then\r\n\t\tFor iKey = 1 To argKeyCnt\r\n\t\t\toECLPS.SendKeys argKeyStr\r\n\t\t\tFor i = 0 To DEF_MAXCOUNT * 10\r\n\t\t\t\tWScript.Sleep 200\r\n\t\t\t\t'\u51e6\u7406\u5b8c\u4e86\u5f85\u3061\r\n\t\t\t\tIf oECLOIA.InputInhibited = 0 Then\r\n\t\t\t\t\tExit For\r\n\t\t\t\tEnd If\r\n\t\t\tNext\r\n\t\t\tIf i &gt;= DEF_MAXCOUNT * 10 Then\r\n\t\t\t\tHost_End\r\n\t\t\t\tWScript.Quit(-2)\r\n\t\t\tEnd If\r\n\t\tNext\r\n\tEnd If\r\n\r\nEnd Sub\r\n\r\n'\uff15\u3000\u753b\u9762\u8868\u793a\u5185\u5bb9\u306e\u30c1\u30a7\u30c3\u30af\uff08Y\u5ea7\u6a19\u3001X\u5ea7\u6a19\u3001\u6587\u5b57\u5217\u306e\u9577\u3055\u3001\u6587\u5b57\u5217\u3000\u4e00\u81f4\u3057\u305f\u3089true\u3092\u8fd4\u3059\r\nFunction Host_OutputChk(argY, argX, argLen, argStr)\r\n\r\n\tDim strBuff\r\n\t\r\n\tstrBuff = oECLPS.GetTextRect(argY, argX, argY, argX + argLen-1)\r\n\tIf Trim(strBuff) = Trim(argStr) Then\r\n\t\tHost_OutputChk = True\r\n\tElse\r\n\t\tHost_OutputChk = False\r\n\tEnd If\r\n\r\nEnd Function\r\n<\/pre>\n<p>\u3084\u3063\u304b\u3044\u306a\u306e\u306f\u3001\u3042\u304f\u307e\u3067\u753b\u9762\u64cd\u4f5c\u306a\u306e\u3067\u63a5\u7d9a\u3068\u304b\u5fdc\u7b54\u306b\u6642\u9593\u304c\u639b\u304b\u3063\u305f\u308a\u3001\u3044\u308d\u3044\u308d\u554f\u984c\u304c\u51fa\u3066\u304d\u307e\u3059\u3002<br \/>\n\u3061\u3087\u3063\u3068\u96d1\u306bSleep\u3092\u30ac\u30f3\u30ac\u30f3\u304b\u307e\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u304a\u5bdf\u3057\u304f\u3060\u3055\u3044\u3002\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3000\u30db\u30b9\u30c8\uff08\uff1d\u30e1\u30a4\u30f3\u30d5\u30ec\u30fc\u30e0\uff09\u3063\u3066\u307e\u3060\u7d50\u69cb\u4f7f\u3063\u3066\u3044\u308b\u3068\u3053\u308d\u304c\u591a\u3044\u3088\u3046\u306b\u601d\u3044\u307e\u3059\u3002  &hellip; <a href=\"https:\/\/esoro.jp\/?p=370\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/esoro.jp\/index.php?rest_route=\/wp\/v2\/posts\/370"}],"collection":[{"href":"https:\/\/esoro.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/esoro.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/esoro.jp\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/esoro.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=370"}],"version-history":[{"count":0,"href":"https:\/\/esoro.jp\/index.php?rest_route=\/wp\/v2\/posts\/370\/revisions"}],"wp:attachment":[{"href":"https:\/\/esoro.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/esoro.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/esoro.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}