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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling a Mainframe program 1

Status
Not open for further replies.
Joined
May 30, 2002
Messages
78
Location
US
Hi,

I'm asking this question kind of blind. I'm curious if it's possible to use VB to call a COBOL load module sitting on a mainframe. I would like, if possible to pass a parameter to it as well.

That's all the information I have at this time. Any clues?

MG
 
My first kneejerk reaction is to say "No". There may be options though. Depends on how you access the mainframe. You certainly cannot run the program on the PC your code is executing on, but if you are into terminal emulation you can always try to emulate the appropriate terminal and use the MSCOMM control to initiate a serial connection into the mainframe and then have your program send (what would normally) be keystrokes to the mainframe instructing it to execute the COBOL program. Sounds like a lot of work though.
 
Hi Monkeygumbo

No problems about that mate :-) I write programs to do this on a regular basis. I would point you first of all in the direction of HLLAPI, don't be put off by its seeming complexity like most things you don't need all functionality provided. If you are using a terminal emulation program to access your M/F you will probably find HLLAPI in that apps directory.

A few questions, Is this an IBM box? Are you calling the Cobol prog directly or are you using CICS or one of its variants? This all makes a difference to how you go about it.

Cheers
Patrician
 
Hmmm, sounds very complicated. I'll probably have the COBOL program grab what it needs from a flat file produced by the VB prog.

Thanks!

MG
 
Patrician,

Looks like our posts came at the same time. I'll look into that thanks!

MG
 
Patrician,

To answer your earlier questions:
1) yes, m/f is IBM
2) I'd call the module directly

MG
 
Hi Monkeygumbo

Good, now can you log on to the mainframe with a terminal emulator(I use Attachmate extra!), and run your COBOL prog. Its a lot easier if you can get your TE to create and save a session first and then point HLLAPI to use that it cuts out a lot of setup. Some TE's can even create VBScript macros which can then be cut and pasted into VB.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top