I received an email today which at first seemed really simple to say yes/no to, but it started me to thinking. I was asked if it's possible to dynamically add a step to the end of a job via some system exit. At first I thought to tell them to use JES exit 4/54, because I've used it to add and change JCL cards many times, but never to the end of the JOB. I figured that there was probably a bit setting on the invocation that designated that it was the last card. Then a quick manual check seemed to show that while you can add and change JCL whenever you want, you have no real way of knowing when you are at the end of the job in question.
If you have something to key off of, like the submitter was nice enough to put a /*EOF JECL card, you could probably do it, but the question was to be able to do this without making any user changes to the JCL. I thought about using the submit exit, but she was talking about jobs from any source. Our JOB scheduling package (SyzAUTO) can do it for the JOBs we schedule. But we control the copying of the JCL to the internal reader, so when we get to the end, we just pop our "special" step(s) to control the schedule or whatever else we want to do auto-magically (like sending the EOJ step condition codes via email, etc.). That doesn't apply in this case because the exit doesn't appear to know when the last JCL card is reached. I would imaging that if it's possible that (if you could figure out that you were at the last card of the JCL in exit 4/54) you could probably add as many cards as you wanted, although she only wants to add a single step execution card. I'm still stuck on how you figure out that your at the end. I just can't see that JES tells you that you are on the last card, although it does tell you when you are on the last line of the JOB card in the other input exits, it doesn't seem to know that it's at the end of the actual JCL. That almost doesn't make sense because I can't believe that JES doesn't know when it reaches the end, but I can't see it in the manuals. Does anyone have any ideas? I thought I might ask before I started to go through HASPRDR. Maybe I'm not even in the right area and JES isn't the spot to do it, but I don't think IEFUJV would work either. Brian ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html