by Tim » Fri Mar 25, 2011 8:48 pm
[I think my first post disappeared; sorry if this turns out to be a duplicate]
Thank you for laying out the options so clearly. As I mentioned before, the host job ftps files to and from various other (*nix and Wintel) systems. I work with those other systems. If you need anything from C#/.Net to ESB/SOA, I'm the guy to call. But before last week, I didn't know JCL from jingle bells (and obviously still don't).
It's impossible to overstate the inertia in an organization where a) everything is running more or less correctly (operators rerun any jobs that fail), and b) any thing that doesn't run smoothly generates revenue for the vendor. What I'm saying is that suggestions to have this or that group do something probably make sense in most organizations, but I don't think it's going to work here. I wish I could just turn this over to the mainframe team but I'm afraid we're on our own in my group. Basically I'm limited to working with the job and procs under my control, ans submitting them to run under whatever it is that runs them (OPCA, I'm told).
They say if you want something done.... So I got a copy of the job and proc, which for some reason my group owns. They were probably written by the vendor and turned over to us, since no one here has the skills to have written them. I got a JCL manual, absorbed the basics, looked up if/then/else, and figured out how to get BXPBATCH to run sleep in a Unix shell. I put in the ftp retry logic. Everything worked exactly as expected, except the job completion code never changed, and the Blackberry still kept beeping in the middle of the night. All I wanted to do was set my job completion code to 0. I never imagined it would be difficult, let alone impossible.
As a programmer, I expect to be able to control more or less what my programs and scripts do, but JCL is an alien world. I'm still trying to wrap my head around the fact that the job completion code is set to the highest code returned by any step, and there's nothing you can do to change it. Some of the suggestions have been along the lines of "you should rewrite the whole thing in glorbrik and run it under twizzleblat." While I appreciate someone taking the time to respond, I have zero mainframe background, so it means nothing to me (and apparently there are some who take offense at that).
So, to answer your question, (re)writing something in REXX or anything else is beyond my current skill set, and even if there were someone here who knew how to do it, they have there own problems to deal with. And it hasn't gone unnoticed by my manager that this isn't what I'm getting paid to do.
I wish there were another solution, but it looks like I'm stuck. If I do come up with something, I'll post it here.
To those who offered advice, thank you. You've been very patient with me and very generous with your time.