Currently, our associates use a Mainframe application, but have to stop during the process to get information from the web. They begin to process a transaction, but once they get to a specific screen, they need to retrieve data from the web to determine the next steps. They stop and start a web browser, login to a site, copy and paste the data retrieved from the Mainframe application into the web browser and get the results from the web site. They then continue to process the transaction on the Mainframe. I would like to automate this. From the Mainframe, a PFkey is pressed, that starts a web browser. It would automatically log into the website (generic username and password), pass the specific data from the Mainframe (screen scrape) and show the results from the web browser. Any thoughts would be appreciated!
3 Answers
You don't indicate the mainframe runtime environment, but if the mainframe application is running in CICS, you may be able to use CICS APIs to access the web page in question. This would not be in a separate browser window but in the mainframe code.
This wouldn't be any easier than the path @SaggingRufus indicates. Parsing HTML can be interesting.
IBM's CICS Knowledge Center has the documentation for CICS APIs.

- 10,237
- 1
- 28
- 39
-
1Doing everything in the background directly from the mainframe should be the way to go. Perhaps the provider of the website also offers some machine-to-machine interface (SOAP- or REST-webservice) which would make things easier than having to go through the website (which might not be feasible because of some sort of js-framework that is used). – piet.t Jun 14 '18 at 06:21
You can't really do that (at least not easily).
You would basically be looking at programming some form of VB script/macro that would interact with the terminal emulator (not the mainframe itself) and the web browser. I would probably advise against this. What really needs to happen here is find what exactly the requirement is. Why would they need this macro, and is there anyway that mainframe application can do coded to get information without the use of the browser. Like hitting a database or a file somewhere that contains the information it needs.

- 1,814
- 16
- 32
There is a product that will aid in building REST calls from existing mainframe applications to external REST services. It is called z/OS Connect. It provides the tooling to form the request and parse the response so you can execute the request as part of the application and not bother with the emulator. z/OS Connect supports CICS, IMS, MQ and DB2.
Its not free but it was designed to make what you want to do a lot easier.

- 3,581
- 2
- 9
- 25