Horror Stories From the Trenches
Recently Dominus posted a lovely horror story from his programming past and I couldn't help but think about my time as a mainframe programmer and the team lead who hated me. She once got upset at another developer for increasing the space allocation for jobs. Why was the other developer increasing that allocation? Because our nightly batch jobs were running out of space and we'd get woken up with calls telling us the jobs were failing and we'd tell them to increase the disk space and restart the job. The team lead was upset because if the operators didn't have to call us, "why would they need us?".
However, I was the person who really upset her and I never quite figured out why. I was told it was because, unlike her, I could actually program (allegedly she was an operator who simply rose through the trenches), but I don't know this for certain. All I know is that she did not like me and one day she managed to exact her revenge against me for whatever I had done to offend her.
It was shortly before the year 2000 and there was a code freeze. Only emergency bug fixes could go in and I had finished all of my other work. I asked my boss what I should work on and he told me to go ask the team lead. So I did. And then she told me something I very much didn't want to hear: "You're going to build our new test region."
On a mainframe, a test region is sort of like a partition. All code and data is copied to the region and the JCL (Job Control Language) is updated to use the new region instead of the old region. For some reason (that I can't remember), it's like if every time you copied code to a new location, you always had to update all filenames. I was dreading this because this was done infrequently and, as a result, it was not automated. My team lead gave me a job that was essentially a month of cutting and pasting code and manually updating everything. It was a job for an intern, not a programmer, and I was looking at a month of hell. There are tools for doing this, but I was a brand new programmer and I didn't know about them and everyone else told me that these regions were always built manually.
I went to the cafeteria to grab a cup of coffee and sulk when I remembered that we just had our terminal emulation software upgraded. All of a sudden, this task started to look interesting.
Because I was new to mainframe programming, my boss encouraged me to explore and play with tools to learn them. I had discovered that the new terminal emulation software had VBA scripting built in. This was almost useless because we simply had effectively random text getting spewed out to the screen and, unlike with Word or Excel, the only way to interact with the mainframe using VBA was screen scraping and simulating user input. However, by playing with this I had already written a form that could copy individual COBOL or JCL files so long as I pasted in the correct name to the form. Now I just needed to be able to copy them to different regions ... and to spider an entire mainframe region finding all of the files that I could copy.
This turned out to be rather hard because I kept getting logged out for trying to access files I didn't have the permissions to access. I remember scary messages about internal security being alerted, but a couple of questions later and I found out that no one could remember security ever following up on this. I decided to not say anything about this and continue.
I quickly wrote up some screen-scraping code to spider the mainframe region, detect log outs, log back in and ignore anything that logged me out and copy everything else over. While copying, it would, of course, update the JCL to point to the new region.
When I finally finished all of this, I took a deep breath, launched my spider and went to lunch.
When I came back, it was still copying files, so I just basically went around for the rest of the day, chatting with friends and seeing what they were up to. Four hours after I launched my spider, it was finished. I had done a "month's work" in a day.
I sent an email to the team explaining that I had just built the new mainframe test region but since I had never built a mainframe test region before, could they please double-check my work?
People started coming over to my cube, trying to find out what the hell had just happened. The boss showed up and was amazed by the VBA interface I had built. People were congratulating me.
And the team lead sent me a nasty email (cc'd to everyone) informing me that I should be more careful because I hadn't corrected the email addresses. That took 30 seconds to fix. She also chewed me out for using VBA for this one-off task because no one else knew VBA. In my annual review, the team lead mentioned those email addresses and wrote that I "lacked attention to detail."
As I left that company for my first Perl job, I heard through the grapevine that they decided to move her off the team, but it seems that no one else wanted her. Meanwhile, I may be the only guy on the planet to have built a mainframe test region using VBA. This is not on my CV.
I thought I was in TheDailyWTF for a moment there. :) Great story indeed!
Just curiosity, was the terminal emulator an Attachmate one?
I'm tired of its VBA. Now I am using Perl and Win32::OLE to automate processes and gathering data. I am also planing to write some CPAN module when I have clear what tests make sense to automate.
jose, I honestly don't remember. I seem to recall it was something by IBM.
This story ends with something like "This is what you get for making things better! A bad review!"