INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

VBA to OpenVMS and I'm lost

VBA to OpenVMS and I'm lost

(OP)
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

RE: VBA to OpenVMS and I'm lost

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("C:\Program Files\E!PC\Sessions\Mainframe.edp")
    Else
        Set oSess = oSystem.ActiveSession
    End If
'......
End Sub 
...where THIS 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,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: VBA to OpenVMS and I'm lost

(OP)
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

RE: VBA to OpenVMS and I'm lost

Quote:

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,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: VBA to OpenVMS and I'm lost

(OP)
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

RE: VBA to OpenVMS and I'm lost

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,

glassesJust traded in my OLD subtlety...
for a NUance!tongue

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close