Highlighted
Larry Weisberg
Visitor.
52 views

automate mainframe connection with login and other commands

Jump to solution

Hi - I recently installed the Script Editor (ScriptEngine.msi) for Rumba 9.5.  I have available to me a .RSDM file which connects to a Mainframe.  After running that, I can record and then run a script to give the mainframe various command (logon/user/password/+ other commands specific to our mainframe's application). 

What I would like to have is a standalone script which I can run automatically every X minutes (e.g., via Windows scheduler, running something like "VSP.exe myScript.csf") which connects+logs on + runs 1-3 commands.  I would like to then be able to detect that all the steps worked, returned some expected text result from the mainframe, etc.

Can someone give me some ideas on how to combine the above into a single script?  (I was hoping to find the demo.csf after installing the Script Editor, but was unable to find it.  I am not sure if that would have helped anyway :-))

 

Thanks in advance,
Larry

0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

Re: automate mainframe connection with login and other commands

Jump to solution

Hi Larry,
you already described the basic steps to automate Rumba.
You need to modify and adjust the recorded script.

If you want to open a specific Rumba session you could use
EMStartSession "MyRumbaSession.rsdm","SESSION1"

Or configure your parameter in your code

EMSetTN3270 "yourMFhost.com",23,2,"ExtendedDS"
EMStartSession "*","3270"
'3270 session now active.
EMConnect "TELNET"

EMWaitCursor TimeOut ,19,45
If NM_ResultCode = 2 Then
Goto HandelError
End If

The HandelError could be a Function or Sub routine that logs the information into a File.


You can execute rumba csf scripts via the commandline
VSP.exe [-n -d -p -v -e -s -i] [yourScript.csf]

Option Description
-n Opens the Script Player in a normal window size. If the option is omitted, the Script Player opens minimized.
-d Opens the Script Player in debug mode. The Script Player window is normal size. If a filename.csf is specified, it is run.
-p Opens the Script Player in animate mode. The Script Player window is normal size. If a filename.csf is specified, it is run.
-v Variable predefinition.
-e Sets the active emulation (can be:Telnet, 3270, 5250).
-s Sets the active session.
-i Sets the active InstanceName. When using long instance names, include the name within quotes (").

You can use the windows task scheduler to start your script .

Sample scripts can be found under RUMBA\System\ScriptEngine\Scripts

1 Reply
Micro Focus Expert
Micro Focus Expert

Re: automate mainframe connection with login and other commands

Jump to solution

Hi Larry,
you already described the basic steps to automate Rumba.
You need to modify and adjust the recorded script.

If you want to open a specific Rumba session you could use
EMStartSession "MyRumbaSession.rsdm","SESSION1"

Or configure your parameter in your code

EMSetTN3270 "yourMFhost.com",23,2,"ExtendedDS"
EMStartSession "*","3270"
'3270 session now active.
EMConnect "TELNET"

EMWaitCursor TimeOut ,19,45
If NM_ResultCode = 2 Then
Goto HandelError
End If

The HandelError could be a Function or Sub routine that logs the information into a File.


You can execute rumba csf scripts via the commandline
VSP.exe [-n -d -p -v -e -s -i] [yourScript.csf]

Option Description
-n Opens the Script Player in a normal window size. If the option is omitted, the Script Player opens minimized.
-d Opens the Script Player in debug mode. The Script Player window is normal size. If a filename.csf is specified, it is run.
-p Opens the Script Player in animate mode. The Script Player window is normal size. If a filename.csf is specified, it is run.
-v Variable predefinition.
-e Sets the active emulation (can be:Telnet, 3270, 5250).
-s Sets the active session.
-i Sets the active InstanceName. When using long instance names, include the name within quotes (").

You can use the windows task scheduler to start your script .

Sample scripts can be found under RUMBA\System\ScriptEngine\Scripts

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.