Page 1 of 1

Email Subject!!!

PostPosted: Thu Mar 29, 2012 7:28 am
by ibmmf4u
Hi,

Is there a way to include current or previous date in my Email subject??

Can someone please help me on this??

Re: Email Subject!!!

PostPosted: Thu Mar 29, 2012 12:04 pm
by BillyBoyo
Yes, Just type it yourself.

If that is not sufficient answer, gives us all the information we'd need to have some answer.

Re: Email Subject!!!

PostPosted: Thu Mar 29, 2012 6:59 pm
by ibmmf4u
Hi Bill,

Sorry about that. My requirement goes this way.

Everyday i will be sending out a status report of the job. I some how automated the mail, but can't able to with the subject of it.

I will be sending out the mail daily with yesterdays date.

After the automation i can't able to include the date in my subject. I just coded a static statement as subject in the control cards.

Now i want to include date in the subject as well.

Can you let me know if this is possible in achieving the same thru JCL

Thanks in advance!!

Re: Email Subject!!!

PostPosted: Thu Mar 29, 2012 7:04 pm
by BillyBoyo
Can you show us the JCL you are using so far?

Can you tell us which Sort product is installed at your site, and what version of it you have, please? They have numbers of date-manipulation functions which may be of use to you.

What are using as the source for your date? A business date/data date is best, it avoids problems re-running, or when you happen to run before/after midnight when normally you run after/before. If you use the system date, you have some extra annoyances with things like that.

Re: Email Subject!!!

PostPosted: Thu Mar 29, 2012 8:25 pm
by ibmmf4u
Hi Bill,

Thanks for the quick response.

Below pasted is the jcl that i have been using.

//JOBCARD JOB ( , ),'MAILPGM',CLASS=R,MSGCLASS=U,
//    NOTIFY=&SYSUID                                       
//SYMBOLS  EXEC PGM=EZACFSM1                               
//SYSOUT   DD DSN=USERID.TEST.CNTL(EMAIL2),DISP=SHR       
//SYSIN    DD *                                             
SUBJECT: DAILY STATUS REPORT OF THE JOBS  '&YYMMDD'       
/*
//STEP020 EXEC PGM=IEBGENER                         
//SYSUT1   DD DSN=USERID.TEST.CNTL(EMAIL),DISP=SHR
//         DD DSN=USERID.TEST.CNTL(EMAIL2),DISP=SHR
//SYSUT2   DD SYSOUT=(B,SMTP)                       
//SYSIN    DD DUMMY                                 
//SYSOUT   DD SYSOUT=*                             
//SYSPRINT DD SYSOUT=*                             
//                                                 
                                                         


where the USERID.TEST.CNTL(EMAIL) file contains:-
HELO XXYZZW1         
MAIL FROM:<userid@xyz.COM>
RCPT TO:<userid@xyz.COM>           
RCPT TO:<userid@xyz.COM>             
DATA                                 
FROM: <userid@xyz.COM>               
TO:   <userid@xyz.COM>               
TO:   <userid@xyz.COM>               


With the help of above i could able to get the current date but the subject line is missing in the mail and its appearing in the body of the message. Also i couldn't able to accomplish my above requirement of previous date .Some times we will normally be running the report after midnight after completion of few job's and we do need to put in previous date in the subject line.

We have syncsort 1.3.2.2R currently in our shop.I heard that we can't able to perform any date manipulations in this version of syncsort .

Please kindly let me know if there's a way in achieving my requirement.

Re: Email Subject!!!

PostPosted: Thu Mar 29, 2012 8:40 pm
by BillyBoyo
Your subject is appearing in the body because you have concatenated it to another dataset with the rest of the e-mail in it, and they will just be copied in sequence.

If you use the system date, you will always have a problem. 23:59 is "after midnight" in exactly the same way as 00:01 is. You can't even really "fake" it by choosing some cut-off point (like 10:00) as all that does is move the time which causes the problem, at best so it causes fewer problems. For re-runs, you are totally stuck when it comes to using the system date.

This is not a question for you to resolve yourself, but for you to "kick-it-up-the-line" - the spec-writer for instance, or your boss, or whatever.

With the source of the date resolved, to your organisation's satisfaction anyway, the rest should be less of a problem. Let us know about the date. See if your scheduler can provide a business/data date, if you have no other handy.