MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Need to send an email based on content in sysprint in sdsf

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
tvssv
Beginner


Joined: 11 Mar 2009
Posts: 58
Topics: 25

PostPosted: Sun Oct 11, 2020 4:16 am    Post subject: Need to send an email based on content in sysprint in sdsf Reply with quote

Hi,

I have the below code.

Code:

//step1 EXEC PGM=program name,REGION=2M                                   
//*                                                                   
//input1 DD   DSN=input file 1,DISP=SHR     
//input2 DD   DSN=input file 2,DISP=SHR               
//output DD   DSN=output dataset,DISP=(,CATLG),     
//             RECFM=FB,LRECL=200,STORCLAS=SCPRIME,                   
//             DATACLAS=LARGE                                         
//*                                                                   
//SYSOUT   DD   SYSOUT=*                                               
//SYSPRINT DD   SYSOUT=*                                               
//PLIDUMP  DD   SYSOUT=*                                               
//*                                                                             


Ouput in the SYSPRINT will be

Code:

EC_TABLE SIZE =                32                                     
INVALID TAG =                     HB                   
INVALID RECORD NUMBER     =                       15087       
RECORDS MATCHED & MODIFIED =                  0       
TOTAL RECORDS PROCESSED  =                       159160       
VALID RECORDS             =                              159159       
INVALID RECORDS          =                                   1       


My requirement is, if INVALID RECORDS is greater than 0, I need to send an email with the contents in SYSPRINT (All the above mentioned lines).

Is it possible with JCL to read the SYSPRINT contents and sending an email. Please help.

Thanks.
_________________
Thanks
TVSSV
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Sun Oct 11, 2020 10:18 am    Post subject: Reply with quote

tvssv,

If you have the option of changing the source program then

    1. Change the program that writes invalid records to set a Return code > 0
    2. Route the sysprint to a dataset
    3. Use the Return code and send the email

or if you canNOT change the source program then


    1. Route the sysprint to a dataset
    2. Use SORT/program to check if the invalid records > 0 and set Return code
    3. Use the Return code and send the email

_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group