Dear Experts,
My requirement is to send an automatic email to support services by using a new program, when an abend occurs in an existing COBOL-DB2 program.
To be in detailed:
I have a table ABC_LOCATION with the fields location_id, capacity, locaton_name. All are CHAR(3) And the table contains 12 rows as of now.
In my COBOL-DB2 program, I am retrieving the corresponding location_id and capacity depends on location_name coming from a file which is producing by Up-stream system.
There is another table XYZ_LOCATION which is the base table contains many fields includes location_id and locaton_name.
When ever a new location details are added into the table XYZ_location in the upstream system then my program will give an SQLCODE +100 because there is no row correspond to that new location in the table ABC_LOCATION
OfCourse, they need to do the impact analasys and to inform our team to do necessary amendments in our relative tables.
In the worst case scenario, To avoid the abending of the batch job which impacts all other down-stream batches, we are looking for a solution to write a program to send an automatic mail to support services and inform them to insert a new row into the table ABC_LOCATION and then rerun the job again.
Please suggest me the way to do this. I couldn't get any sample program in our system.
COBOL program to send an automatic Email when job abends...
Moderators: dbzTHEdinosauer, Moderator Group
COBOL program to send an automatic Email when job abends...
Kumar
If u can dream it, U can do it.
If u can dream it, U can do it.
-
- Member
- Posts: 3
- Joined: Tue Dec 18, 2007 12:38 pm
check this program
//TSOHVIJ7 JOB (12345),'JCL',CLASS=E, 00001000
// MSGCLASS=X,NOTIFY=&SYSUID, 00002000
// MSGLEVEL=(1,1) 00003000
/*ROUTE PRINT LOCAL 00004000
//* 00005000
//STEP EXEC SAS 00010000
//SYSIN DD * 00040000
DATA; 00050000
FILENAME MY_FILE EMAIL 00060000
TO="HVIJAYAKUMAR@INAUTIX.COM" 00070000
FROM="HVIJAYAKUMAR@INAUTIX.COM" 00080000
SUBJECT="MAIL CODE" 00080100
ATTACH=("TSOHVIJ.SAS(MAIL1)" 00081000
NAME="MAIL CODE" 00081100
EXTENSION='TXT' 00082000
CONTENT_TYPE="TEXT/PLAIN"); 00083000
DATA _NULL_; 00100000
FILE MY_FILE; 00110000
PUT 'DESCRIPTION OF THE MAIL'; 00120000
RUN; 00130000
QUIT; 00140000
/* 00150000
// MSGCLASS=X,NOTIFY=&SYSUID, 00002000
// MSGLEVEL=(1,1) 00003000
/*ROUTE PRINT LOCAL 00004000
//* 00005000
//STEP EXEC SAS 00010000
//SYSIN DD * 00040000
DATA; 00050000
FILENAME MY_FILE EMAIL 00060000
TO="HVIJAYAKUMAR@INAUTIX.COM" 00070000
FROM="HVIJAYAKUMAR@INAUTIX.COM" 00080000
SUBJECT="MAIL CODE" 00080100
ATTACH=("TSOHVIJ.SAS(MAIL1)" 00081000
NAME="MAIL CODE" 00081100
EXTENSION='TXT' 00082000
CONTENT_TYPE="TEXT/PLAIN"); 00083000
DATA _NULL_; 00100000
FILE MY_FILE; 00110000
PUT 'DESCRIPTION OF THE MAIL'; 00120000
RUN; 00130000
QUIT; 00140000
/* 00150000
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page