用INTRDR在job中submit第二个job

今天学到的,如何在当前job当中trigger另外一个job?答案就是利用Internal Reader 例如:

//*******************************************************************    
//* Submit an DUMMY job MYJOB2 from current job card 
//* Submit to the Internal Reader                                    
//*******************************************************************
//STEP04    EXEC PGM=IEBGENER                  
//SYSUT1   DD  DISP=SHR,DSN=IBMUSER.TEST.CNTL(MYJOB2)           
//SYSUT2   DD  SYSOUT=(*,INTRDR)                            
//SYSPRINT DD  SYSOUT=*                                     
//SYSIN    DD  DUMMY  

这种技术经常被用来发送notification email,比如:

//****************************************************************      
//*   THIS STEP WILL SEND AN EMAIL TO THE CLIENT GROUP                    
//*   INDICATING THAT THE DESIRED FILE WAS NOT RECEIVED                     
//****************************************************************      
//STEP08   EXEC PGM=IEBGENER,COND=(2,NE,STEP02)                                                                                     
//SYSIN    DD  DUMMY                                                    
//SYSPRINT DD  SYSOUT=*                                                 
//SYSUT1   DD  DSN=IBMUSER.TEST.CNTL(STEMAIL),DISP=SHR                       
//SYSUT2   DD  SYSOUT=(A,INTRDR),                                       
//             DCB=(RECFM=FB,LRECL=80,BLKSIZE=0,DSORG=PS)  

上面例子中邮件的内容如下:IBMUSER.TEST.CNTL(STEMAIL) ```ruby//IBMUSERT JOB 0000000TEST,
// CLASS=3,MSGCLASS=I,REGION=4096K,
// //STEP04 EXEC PGM=IEBGENER
//SYSUT2 DD SYSOUT=A,DEST=(,SMTP)
//SYSPRINT DD SYSOUT=

//SYSIN DD DUMMY
//SYSUT1 DD *
HELO
MAIL FROM:IBMUSER1@xxx.com
RCPT TO:IBMUSER2@xxx.com
DATA
FROM:IBMUSER1@xxx.com
TO:IBMUSER2@xxx.com
SUBJECT: FILE WAS NOT RECEIVED

START OF MESSAGE...

DO NOT RESPOND TO THIS MESSAGE
File was not recieved. Please send again. //*
```

Comments !