Starting in ACR 9.1, you can now send emails containing reports and messages generated when a job is run in ACR/Summary or ACR/Detail using rule definitions that you create. This article will go over how to set up everything so that you can utilize this feature.
1. Go to your User Options. There, you will see an option for "Email Notification". Put an S there and hit F5.
2. Enter in the required settings. There are a few things that need to be edited here. They are:
- Set "Turn on email notification?" to Y.
- The Name for the Transfer Protocol should be "SMTPACR". The Class should be B.
- Allocate space for the reports (if you're planning to send them). Do not go below the default size, but do increase it if necessary.
- Specify your Unit. This may not be SYSALLDA for you.
- Edit the Job Card. When ACR sends an email, it runs a separate "Email Job". Region must be 0M, Class must be E, and MSGCLASS must be X.
3. Set a rule to email you. In a rule, you can set a Return Code for the message being displayed. Inside that message, you can choose to have it emailed or not and decide whether or not to attach reports. You must at least set "Notify by email?" to Y and enter in a valid email address to receive an email. You do not need to include reports.
4. Create your JCL. At a bare minimum, you will need to add the following JCL to have emails be sent. No reports will be sent with this.
Add DD for JCLOUT and assign it to INTRDR
//JCLOUT DD SYSOUT=(”,INTRDR)
Add DD for UNINOTIF (Email Notify File)
//UNINOTIF DD DSN=&&UNINOTIF,
// DCB=(RECFMFB,LRECL2O0,BLKSIZE=0),
// DISP=(NEW,DELETE),
// UNIT=SYSALLDA,
// SPACE=(TRK,f10,10),RLSE
You can either do this manually or use the online "Create JCL" feature within the panels, which will automatically add this JCL for you.
5. Add JCL for reports/SYSOUT. If you want to add reports or SYSOUT, you'll need to add JCL to output the data to a permanent dataset. See the following example JCL:
//SYSOUT DD DSN=R99UC47.SUM.SYSOUT,
// DISP=(MOD,CATLG,DELETE),
// UNIT=SYSALLDA,SPACE=(CYL,(1 0,5))
//UNIACR DD DSN=R99UC47.SUM.UNIACR,
// DISP=(MOD,CATLG,DELETE),
// DCB=(RECFM=FBA, LRECL=1 33. BLKSIZE=1 33},
// UNIT=SYSALLDA,SPACE=(CYL,(1 0,5))
//UNIACR3 DD DSN=R99UC47.SUM.UNIACR,
// DISP=(MOD,CATLG,DELETE),
// DCB=(RECFM=FBA, LRECL=81 ,BLKSIZE=81),
// UNIT=SYSALLDA,SPACE=(CYL,(1 0,5))
If you do this, you will also need to add JCL that deletes the permanent datasets you create at the beginning of the JCL.
NOTE: If you are using Qualifier Jobs in ACR/Detail, this JCL should only be added to the Base Job's JCL. If you are running File Interface in ACR/Summary, only the Base Job's JCL needs everything. If you are using Program Interface in ACR/Summary, you will need to add this JCL to the JCL of all Qualifier Jobs as well.
6. Submit your job. You should see an email if the conditions for it are met in your job.
Comments
0 comments
Please sign in to leave a comment.