If I wanted any proof that I was a resillient and obssessive automator, this incident was more than sufficient. Our team was faced with a predicament – the business wanted to get some reports downloaded from the testing region. Usually this was an easy process, we could download the report From CA-View and email or FTP it.
After a migration to a new firewall, FTP & email stopped working and we had to download reports that were more than 1000 pages. The last option (not the best, but had to be done) was a screen capture process. I had three options
- VB.Net to use the Quick3270 Object and extract the data
- Excel and VBA to capture screenshots (again with the Quick3270 Object)
- Quick3270 Macro Language
I tried each and every option from the list above (in the same order). VB.Net seemed to be an overkill. I had to create forms (to collect screen details, logon information etc.)
VBA & Excel was looking like a good option; I had worked with this combination in the past when we had to download the entire list of FCTs from the CICS region (CEMT & Screen capture did a pretty good job). The screen capture Excel Macro worked well, except for a couple of points which didn’t make this the option of choice. Firstly, the macro could capture data one line at a time (since the code needed to identify the last line of the data on the screen). Secondly, due to login process, screen navigation, etc., one couldn’t guarantee that the user was on the right page. Finally, it was nearly impossible to pause/stop the macro without force closing the program.
Quick3270 Macro it was. While it is based on Visual Basic commands and structure (it even has constants such as vbOkOnly), it does not have the entire instruction set. Picking up parts from the VBA code and modifying it for the Macro language, the final product was ready.
The Macro language had decent support for File I/O and could create Excel.Application Objects. With this, I gave flexibility to the user to route the output into a new excel sheet or into a text file. The language did not support arrays, which meant that concatenating data across screens (scrolling horizontally) required some long winding logic. Creating 24 different variables (one for each line), assigning them data, scrolling and appending data, this took up about 1/3rd of the macro coding. Similar pages of code had to be written for outputting data (variable by variable).
The reference Guide for the Quick3270 Macro language can be found on the dn-computing downloads page. I must warn you that the Macro language is specific to the version you are using. The manual is for v4.12, do take this in consideration while starting to code.
With my battle scars to show for and a running macro, I think I will keep this language in mind during future ventures into Mainframe Automation.
(203) Total number of views