Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA to OpenVMS and I'm lost 1

Status
Not open for further replies.

bklabel1

Programmer
Jul 18, 2015
4
US
I have been reading the Attachmate documentation, trying code and using Google for about 2 weeks. The questions I see online are advanced. I just need to know the steps to connect from VBScript or VBA to work with OpenVMS. I have also tried connecting to OpenVMS from inside of the VBA editor in the menu choice that is in Attachmate. I don't know the place to enter the UserName and PW.

Do I need to set something up in Attachmate before I start to write the code?

Maybe I stepped into this attempt in the middle or I'm missing some concept.

In VBA I am using

Set oR = CreateObject(Session2.xxxxx) I don't have the code in front of me right now.

OR.xxxx
OR.xxxx
OR. Connect

The connect keeps asking for the Password. I cannot find a place to set the Password.

I'm thinking that once I am connected, then I can use the
.Session methods and properties

Am I on the right track?

Thanks,

Kevin

 
Hi,

Never used a terminal emulator to interface with OpenVMS, which I assume is a VAX mainframe system.

But Extra is Extra.

Here's some code I've used to establish an Attachmate!Extra session via Excel VBA. (FIRST, I set a reference to the Attachmate Extra Object Library in the Excel VBA Editor.)...
Code:
Option Explicit

'you must have a reference set for Attachmate EXTRA! n.m Object Library
'runs with Form ufmPassword

Public oSystem As ExtraSystem
Public oSessions As ExtraSessions
Public oSess As ExtraSession
Public oScrn As ExtraScreen

Sub IMS_Login
    Set oSystem = CreateObject("Extra.System")
    
    If oSystem.Sessions.Count = 0 Then
        Set oSess = oSystem.Sessions.Open([highlight #FCE94F]"C:\Program Files\E!PC\Sessions\Mainframe.edp"[/highlight])
    Else
        Set oSess = oSystem.ActiveSession
    End If
'......
End Sub
...where [highlight #FCE94F]THIS[/highlight] is the path/filename to the Extra emulator.

So if there is NO session opened already, it opens the emulator otherwise uses the active session.

The password is most likely to the OpenVMS system. What you need to do is based on the login screen. You probably have a Username and PWD, eacs at row and column coordinates. So your code must PutString() these two string values at the appropriate r,c. See HELP for PutString syntax.

This is code for an automatic login I used on my IMS system. It required acquiring the password in a variable via a form...
Code:
'
    With oScrn
        If bLogin Then
        ' BHT SignOn
            Do Until .WaitForCursor(17, 28)
                DoEvents
            Loop
            .PutString("S", 17, 28)
            .SendKeys ("<ENTER>")
        ' Login
            Do Until .WaitForCursor(14, 37)
                DoEvents
            Loop
            .PutString(fOSUserName(), 14, 37) 
            .PutString(vPassword, 15, 37)
            .SendKeys ("<ENTER>")
        ' SuperSession
            Do Until .WaitForCursor(9, 2)
                DoEvents
            Loop
        ' IMS Ready
        End If
    End With
'......



Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Skip,
I appreciate the reply.
Yes OpenMVS is for the old VAX.
I don't know what I should have in this file: ("C:\Program Files\E!PC\Sessions\Mainframe.edp")
Do I make an Excel UserForm put a button on it and call one of these pieces of code you supplied?
What does this mean? How do I do this? : 'you must have a reference set for Attachmate EXTRA! n.m Object Library
'runs with Form ufmPassword
I noticed Extra while searching for Attachmate information.
When do I use With Session that I see all over the place?
You can tell from my questions that I am still lost.
Any guidance to get me on track to communicating with VAX will be useful.
Thanks,
Kevin
 
I don't know what I should have in this file: ("C:\Program Files\E!PC\Sessions\Mainframe.edp")

Your emulator session has a path and filename. It was so long ago that I figured out how to find that, I couldn't tell you the method. But that's where to begin.

Then what Attachmate application are you using? Extra, Reflections???

Have you consulted the HELP for your application? Attachmate web site?



Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Skip,
I am using Attachmate. I saw mention of "Extra" when searching online for Reflections information. I didn't know that it was a separate product.
I don't know how to create or find the emulator Session.
The attachmate documentation is not clear to me. I cannot tell when I am creating the Session and when I can start using the Session object.
Thanks,
Kevin
 
Manually start a session in OpenVMS.

There ought to be some way to identify the path/filename of the session you manually started. Right-click the application and explore the properties.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top