I would like to establish a link to our s/390 mainframe using VB6. Currently it possesses a PCOMMS emulator, but we want more control than this gives at the moment.
Any ideas?
Thx
Derrick
Printable View
I would like to establish a link to our s/390 mainframe using VB6. Currently it possesses a PCOMMS emulator, but we want more control than this gives at the moment.
Any ideas?
Thx
Derrick
At present how do you communicate with your mainframe machine ?
Can you telnet to it ?
At the moment we can only ftp the mainframe. What I need is to communicate/screen-scrape the Mainframe or use something such as SENDKEYS to control the emulator.
What operating system is the mainframe running ?
Can you run custom applications on the mainframe ?
The operating system is VSE/ESA.
We can customize any application on the mainframe, but I would not have thought it necessary to do this.
We want, at least initially, a simple method to send commands and receive feedback from systems, including CICS, on the mainframe, or to read the VSAM files held there.
Well in terms of reading files, you could in theory setup an ftp account to allow access straight into certain directories on the server and pull the files from there.
Regarding sending commans, you'd really need to telnet in to do it.
If you can ftp in, I'd say you should be able to telnet in too...
There are .dll files that come with PCOMMS, the mainframe emulator. I want to use these to communicate with the mainframe.
Although software has been added for telnet it does not currently work, I still wouldnt know how to send commands and receive feedback by this method.
Thanks
Derrick
There are some examples available somewhere for implementing screen scraping with the PCOMM API's, it's not that easy to use cos I tried a while ago.
I used to have them all installed but can't find em now, look around your PCOMM installation directory for samples. You might need to read the C samples and convert it.
It has nothing to do with interfacing between the two. What you need is third party's library. In the past (not that long ago) I've used EXTRA'S! for Windows (I think made by Attachmate Corporation) and RUMBA (can't recall manufacturer's name). These 2 are very reliable and quite easy to use. They offer both OCXs and API library.Quote:
Originally posted by plenderj
What operating system is the mainframe running ?
Can you run custom applications on the mainframe ?
But the real problem with MF/VB (or whatever the front end language can be) interface isn't the tool you'll use but people that maitain MF applications. If they won't notify you of any changes on their side - your app won't work as it won't be able to find appropriate screen on the MF side.
I am looking to use either EHLLAPI or HACL API's to estblish this link to VB6.
Does this help anybody to help me?
Regards
Derrick
Sorry, never worked with those two, but in case you reconsider your software usage, here are the links to those that I did:
http://www.attachmate.com
http://www.netmanage.com/
What I meant was that if they want to grab of the screen on the mainframe, they could write an app to do it.Quote:
Originally posted by McGenius
It has nothing to do with interfacing between the two. What you need is third party's library. In the past (not that long ago) I've used EXTRA'S! for Windows (I think made by Attachmate Corporation) and RUMBA (can't recall manufacturer's name). These 2 are very reliable and quite easy to use. They offer both OCXs and API library.
But the real problem with MF/VB (or whatever the front end language can be) interface isn't the tool you'll use but people that maitain MF applications. If they won't notify you of any changes on their side - your app won't work as it won't be able to find appropriate screen on the MF side.
And if the system happened to be running a popular *nix operating system, then there may already be an easy way to do it, through the use of 3rd party applications
What you are referring to as "want to grab of the screen on the mainframe" is also called a Screen Scraping and there is no way (easy or not) without third party's interface (whatever that may be: OCX/API)Quote:
Originally posted by plenderj
What I meant was that if they want to grab of the screen on the mainframe, they could write an app to do it.
And if the system happened to be running a popular *nix operating system, then there may already be an easy way to do it, through the use of 3rd party applications
I know what its called.
I too have used Rumba - it's not bad at all.
Hummingbird makes a pretty good product too.
Can't remember what its called though. Been a while since I used it.
I'm sure you do, but being a technical person you must express yourself in such manner.Quote:
Originally posted by plenderj
I know what its called.
Must I ?Quote:
Originally posted by McGenius
I'm sure you do, but being a technical person you must express yourself in such manner.
Thanks for pointing that out.
You are very welcome.
Hummingbird supply HostExplorer, but is not what we want. Just a simple method of communication using no third party software will suffice for now.
Derrick, what version of pcomm are you using?
If it's 4.? I can't help but I had a play yesterday with 5.0 and it's actually quite easy.
I created a class I called Screen
VB Code:
Option Explicit Private mSess As AutSess Private mPS As AutPS Private mOIA As AutOIA Private mWin As AutWinMetrics Private mRows As Long Private mCols As Long Public Sub OpenSession() Set mSess = New AutSess Set mPS = New AutPS Set mOIA = New AutOIA Set mWin = New AutWinMetrics mSess.SetConnectionByName "A" mPS.SetConnectionByName "A" mOIA.SetConnectionByName "A" mWin.SetConnectionByName "A" End Sub Public Function GetFields() If mPS.CommStarted Then GetFields = mPS.GetTextRect(1, 1, Rows, Cols) End If End Function Public Property Get Rows() As Long If mPS.CommStarted Then mRows = mPS.NumRows Rows = mRows Else mRows = 0 Rows = 0 End If End Property Public Property Get Cols() As Long If mPS.CommStarted Then mCols = mPS.NumCols Cols = mCols Else mCols = 0 Cols = 0 End If End Property
You have to have a session open (the first one will be "A")
You also need to reference most of the available PCOMM API's
I apologise if you haven't got version 5
Mail me if you want any more code (as and when I write more of course!)
Thankyou for your time on this.
I am using PCOMMS version 5.0.
I have entered the code and set up a class, unfortunately when trying to set any of the objects i get the following error
Method 'SetConnectionByName' of object 'IAutSess' failed, I have searched the net for solutions to this but it seems to be a generic problem that occurs when using COM and ADO.
Have I set something up incorrectly in VB?
Thx for your help
Derrick
This error might occur if you don't have a session open, I'll test that theory...
...No it wasn't that.
I'll send you the project I started and see if it will work on your machine.