Email Subject!!!



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Email Subject!!!

Postby ibmmf4u » Thu Mar 29, 2012 7:28 am

Hi,

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

Can someone please help me on this??
ibmmf4u
 
Posts: 65
Joined: Wed Dec 14, 2011 10:26 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Email Subject!!!

 

Re: Email Subject!!!

Postby BillyBoyo » Thu Mar 29, 2012 12:04 pm

Yes, Just type it yourself.

If that is not sufficient answer, gives us all the information we'd need to have some answer.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Email Subject!!!

Postby ibmmf4u » Thu Mar 29, 2012 6:59 pm

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!!
ibmmf4u
 
Posts: 65
Joined: Wed Dec 14, 2011 10:26 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Email Subject!!!

Postby BillyBoyo » Thu Mar 29, 2012 7:04 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Email Subject!!!

Postby ibmmf4u » Thu Mar 29, 2012 8:25 pm

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.
ibmmf4u
 
Posts: 65
Joined: Wed Dec 14, 2011 10:26 pm
Has thanked: 0 time
Been thanked: 1 time

Re: Email Subject!!!

Postby BillyBoyo » Thu Mar 29, 2012 8:40 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post