Hi Mike, Exit 52 (and the corresponding exit 2) are for modifications to the JOB statement, not the JCL, so that's not the place to add your two cards (unless they are to be added to the JOB card). The proper place to change JCL and add cards within the JCL stream itself (under JES) is in exits 4 and 54 (the exits can be combined to one set of code for both exits, but that wasn't your question, and it's not a requirement, just a nice thing to do. Exit 4 is for scanning JCL and JES2 control statements for jobs submitted through card readers, RJE, SNA and BSC NJE, and SPOOL reload. For jobs submitted through internal readers or TCP/IP NJE, exit 54 is called to process JCL and JES2 control statements (JECL).
Each time the exit (4 or 54) is called, it's for a complete card of the JCL (or JECL). The thing to keep in mind is that if you have (for example) a DD card that is two lines long: //OUTPUT DD DSN=MIKES.DAT.SET,UNIT=SYSDA, // VOL=SER=12345,SPACE=(CYL,(1,1)),DISP=(NEW,CATLG) the exit will be called twice to process that DD (because it's two lines long) ,but the buffer will be the same on both calls, luckily you are told that you are doing that and which one you're on at the time, so it makes it simple to add your data, jsut make sure you remember the hint. The JES2 INIT exits manual is really complete on how to add cards in Exit 4 and 54, you will want to use the RJCB (RGETRJCB service, although you can also use the XPL instead, it's up to you) to add the cards. It's VERY clear on how to do it Module HASX04A in SYS1.SHASSAMP contains a sample of Exit 4. Modules HASX54A, HASX54B, and HASX54C in SYS1.SHASSAMP contains a samples of Exit 54. The exit 4 code above is pretty scarce, but the exit 54 samples are a lot more detailed. I have an exit 4/54 sample that changes job priority, and adds a continuation and EXPDT=99000 card to tape jobs that forget to specify it, but you can probably get much better samples from the JES2-L group. Exit40 is the proper place to change SYSOUT, but if it's part of the JCL itself, then you can also put the change into exit 4/54. I believe you can also get samples for these exits at the SHARE site. 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