Page 1 of 2

Mail the contents of file

PostPosted: Thu Jul 09, 2009 9:26 pm
by rajas.abcdefg
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

Re: Mail the contents of file

PostPosted: Thu Jul 09, 2009 9:35 pm
by MrSpock
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.

Re: Mail the contents of file

PostPosted: Fri Jul 10, 2009 8:04 pm
by rajas.abcdefg
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

Re: Mail the contents of file

PostPosted: Sat Jul 11, 2009 1:17 am
by dick scherrer
Hello,

Reformat the data before mailing it. . .

Re: Mail the contents of file

PostPosted: Sun Jul 12, 2009 1:59 am
by rajas.abcdefg
can I skip few lines in between ..will this be possible..

Re: Mail the contents of file

PostPosted: Sun Jul 12, 2009 2:52 pm
by BChat
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

Re: Mail the contents of file

PostPosted: Mon Jul 13, 2009 12:21 am
by dick scherrer
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. . .

Re: Mail the contents of file

PostPosted: Mon Jul 13, 2009 1:01 am
by rajas.abcdefg
Hi Dick
Thanks a lot for the response :)

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


Thanks
Raj

Re: Mail the contents of file

PostPosted: Wed Nov 25, 2009 10:32 am
by rajas.abcdefg
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.

Re: Mail the contents of file

PostPosted: Wed Nov 25, 2009 10:45 am
by dick scherrer
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).