Mail the contents of file



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

Mail the contents of file

Postby rajas.abcdefg » Thu Jul 09, 2009 9:26 pm

Hi All,

I had an requirement to mail the contents of file whose record length is of 120 characters. I need to have all the 120 characters in my mail.

To the best of my knowledge, I knew that only first 80 characters in a file can be mailed using JCL.

Is there a way to get this done. Please post in your suggestions.

Thanks in advance..

Thanks
Raj
rajas.abcdefg
 
Posts: 38
Joined: Thu Jul 09, 2009 8:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Mail the contents of file

 

Re: Mail the contents of file

Postby MrSpock » Thu Jul 09, 2009 9:35 pm

rajas.abcdefg wrote:To the best of my knowledge, I knew that only first 80 characters in a file can be mailed using JCL.


That's not true. You need to research the internet specifications for the SMTP protocol. The limit is 1024 characters per line.
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: Mail the contents of file

Postby rajas.abcdefg » Fri Jul 10, 2009 8:04 pm

I got the answer.
Now it is working fine. Thanks a ton.

But I had a problem in that.

In the output data set that I need to mail has valid data in the following format.
1. First 10 lines had valid data from column 6:20
2. After 5 lines had valid data from column 80:120, between lines had non required data which needs to be ignore. the data in this row needs to be splitted from col:95-120 into next line, as the mail needs to have the data in next line.
3.Once again some 10 lines needs to be ignored.

Could this is acheiveable. If so plz share ur idea
rajas.abcdefg
 
Posts: 38
Joined: Thu Jul 09, 2009 8:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Mail the contents of file

Postby dick scherrer » Sat Jul 11, 2009 1:17 am

Hello,

Reformat the data before mailing it. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Mail the contents of file

Postby rajas.abcdefg » Sun Jul 12, 2009 1:59 am

can I skip few lines in between ..will this be possible..
rajas.abcdefg
 
Posts: 38
Joined: Thu Jul 09, 2009 8:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Mail the contents of file

Postby BChat » Sun Jul 12, 2009 2:52 pm

Hi,
If you have any field (like rec type) to identify the line groups, you can use a sort to create your file to be mailed. Else write a pgm.
Anyway, you need to extract and build the file first

Thanks,
BChat
BChat
 
Posts: 19
Joined: Thu Jun 11, 2009 8:20 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Mail the contents of file

Postby dick scherrer » Mon Jul 13, 2009 12:21 am

Hello,

can I skip few lines in between ..will this be possible..
Certainly. . . You are in control of the process. All that remains is to decide how you want to implement. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Mail the contents of file

Postby rajas.abcdefg » Mon Jul 13, 2009 1:01 am

Hi Dick
Thanks a lot for the response :)

Can I have some sample JCL.Assuming the above mentioned conditions


Thanks
Raj
rajas.abcdefg
 
Posts: 38
Joined: Thu Jul 09, 2009 8:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Mail the contents of file

Postby rajas.abcdefg » Wed Nov 25, 2009 10:32 am

Hi,

Will it be possible to know whether a production job is under execution or is it completed or failed its execution by using a JCL, if it is still undr exceution then it has to mail the requestor saying it is under execution.
rajas.abcdefg
 
Posts: 38
Joined: Thu Jul 09, 2009 8:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Mail the contents of file

Postby dick scherrer » Wed Nov 25, 2009 10:45 am

Hello,

No. JCL really cannot do anything. . . All JCL does is execute programs - one way or another.

What you want to do is not a subject for beginners/students. Many quite qualified people would not be able to automate this quickly.

One way to do what you want is to write some rexx code, invoke sdsf, and determine if the named job is in the system or not. If it is in the system, is it running, is it completed (successful or failed), etc. What to do if there are multiples of the named job (lots of jobs run several times a day/hour).
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post