Run an mainframe VB macro from Excel
Postby Vijender Singh » Tue May 07, 2013 6:17 pm
Hi all,
Need to run an Mainframe VB script from Excel.
I have recorded a Mainframe macro and pasted it in excel. On a daily basis i have to change the data in the macro from the web site.
All i do is copy the data from website and paste it in excel and click on a button, that button sorts the data and edits the mainframe VB script on sheet3.
Then we copy the script paste it on mainframe and run the macro.
I want to omit the copy and paste option and run the macro directly from Excel, like a mirror.
[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)
REM This line calls the macro subroutine
subSub1_
sub subSub1_()
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys"001"
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLPS.SendKeys"p1.1"
autECLSession.autECLPS.SendKeys "[field+]"
autECLSession.autECLPS.SendKeys"gbp1.1"
autECLSession.autECLPS.SendKeys "[field+]"
autECLSession.autECLPS.SendKeys"1.1"
autECLSession.autECLPS.SendKeys "[field+]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys"002"
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLPS.SendKeys"p2.2"
autECLSession.autECLPS.SendKeys "[field+]"
autECLSession.autECLPS.SendKeys"gbp2.2"
autECLSession.autECLPS.SendKeys "[field+]"
autECLSession.autECLPS.SendKeys"2.2"
autECLSession.autECLPS.SendKeys "[field+]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys"003"
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLPS.SendKeys"p3.3"
autECLSession.autECLPS.SendKeys "[field+]"
autECLSession.autECLPS.SendKeys"gbp3.3"
autECLSession.autECLPS.SendKeys "[field+]"
autECLSession.autECLPS.SendKeys"3.3"
autECLSession.autECLPS.SendKeys "[field+]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys"004"
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLPS.SendKeys"p4.4"
autECLSession.autECLPS.SendKeys "[field+]"
autECLSession.autECLPS.SendKeys"gbp4.4"
autECLSession.autECLPS.SendKeys "[field+]"
autECLSession.autECLPS.SendKeys"4.4"
autECLSession.autECLPS.SendKeys "[field+]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys"005"
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLPS.SendKeys"p5.5"
autECLSession.autECLPS.SendKeys "[field+]"
autECLSession.autECLPS.SendKeys"gbp5.5"
autECLSession.autECLPS.SendKeys "[field+]"
autECLSession.autECLPS.SendKeys"5.5"
autECLSession.autECLPS.SendKeys "[field+]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys"006"
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLPS.SendKeys"p6.6"
autECLSession.autECLPS.SendKeys "[field+]"
autECLSession.autECLPS.SendKeys"gbp6.6"
autECLSession.autECLPS.SendKeys "[field+]"
autECLSession.autECLPS.SendKeys"6.6"
autECLSession.autECLPS.SendKeys "[field+]"
autECLSession.autECLPS.SendKeys "[roll up]"
This is the recorded Mainframe macro which i want to run from Excel. Please help its Important friends
Thanks & Regards
Vijender Singh