Appendix A. Supporting information 467
/**********************************************************************/
If Env.Job_Type = ‘C’ | ,
Env.System_Name = ‘ASYS’ Then Do
/* You don’t want to process anything from CICS or Sys A */
Exit
End
/*
Establish the environment variables to be used...
*/
SMTPNode = ‘STLADS2C’ /* SMTP gateway NJE node */
SMTPJob = ‘SMTP’ /* SMTP address space */
HostName = ‘US.IBM.COM’ /* Your host name */
Contacts = ‘DEMOS.PDPAK.SAMPLES(CONTACTS)’
/* application contact & problem escalation list */
/* format: appl_name 1st_contact email_id */
/* Note: MUST be a member to avoid enqueues */
/* Remove trailing hex 0’s & convert blanks to special char */
AcctInfo = Strip(Env.Accounting_Info,’T’,’0’x)
AcctInfo = Translate(AcctInfo,”~”,” “)
/* Nibble through each byte to remove hex values */
Do i = 2 to Length(AcctInfo) /* Ignore first hex value */
varChar = Substr(AcctInfo,i,1)
Select
When DataType(varChar,’A’) = 1 Then
Iterate
When varChar = ‘~’ Then
Iterate
When DataType(varChar,’X’) = 0 Then
AcctInfo = Translate(AcctInfo,”,”,varChar)
Otherwise
Nop
End
End
Parse value AcctInfo with . ‘,’ . ‘,’ thisApp ‘,’ .
If thisApp = ‘’ Then
Exit /* Don’t even try to go there without any info */
Parse value Env.Abend_Date with aYear ‘/’ aMonth ‘/’ aDay
abend_date = aMonth’/’aDay’/’aYear /* For the Americans */
/*
Create the body of the e-mail message...
*/
MsgText.0 = 5
MsgText.1 = ‘Batch job ‘Strip(Env.Job_Name)’ abended with’,
‘a return code of’ Env.Abend_Code
MsgText.2 = ‘in program ‘Strip(Env.Abend_Module_Name)’ on’,
abend_date’ at’ Env.Abend_Time’.’
MsgText.3 = ‘It was assigned ‘Strip(Env.Fault_ID)’ in’,
Strip(Nfy.IDIHist)’.’
MsgText.4 = ‘Please review this abend immediately.’