IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How can i send the contents of a dataset through Email witho


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nandeshwar

New User


Joined: 11 Oct 2010
Posts: 45
Location: Delhi

PostPosted: Sat Nov 12, 2011 3:47 pm
Reply with quote

Hi All,

I want to send the content of my dataset as body of the mail. I know how to send to send mail and content of DS set as attachment. But I want to send the content in the body of the mail. Please let me know if this is possible.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Nov 12, 2011 4:18 pm
Reply with quote

Is this the same as you have posted on a different forum ?
Back to top
View user's profile Send private message
nandeshwar

New User


Joined: 11 Oct 2010
Posts: 45
Location: Delhi

PostPosted: Sat Nov 12, 2011 4:23 pm
Reply with quote

No I have posted this on any forum . Please clear my doubt
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Nov 12, 2011 4:29 pm
Reply with quote

It's just suspicious that the very same topic hasd been posted on another forum
Back to top
View user's profile Send private message
nandeshwar

New User


Joined: 11 Oct 2010
Posts: 45
Location: Delhi

PostPosted: Sat Nov 12, 2011 4:33 pm
Reply with quote

i guess this topic should have been posted in JCL forum only as I did. And my question is different from what others have asked . What I am looking for is " can we send the content of a output dataset as Body of the mail instead of sending it as a text/word/excel attachment " ?
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Nov 12, 2011 4:49 pm
Reply with quote

Yes, of course you can. Get on with it.

Oh. You want them to be able to read it at the other end? Ah.

Yes, it is still possible at least in general terms.

But what the heck is wrong with sending as an attachment? Every e-mail system in the world works with that (I might be overstating, but you get the general picture)?

Easiest way is to only have a text file that you want to send. Just stick the text in the body. Make sure you're not breaking any length rules (either reformat to 80-bytes, or check the appropriate RFC for what maximum is supported). Job done.

You have data?

Let's see. Text works. How about turning the data into text only? Then proceed as above. Oh, and get the peope at the other end to do the reverse.

Hang about, though. How do "attachments" work? Try to do some research on that? :-)

In the "old" days, before attachments, used to UUENCODE to send binary files and UUDECODE to receive.
Back to top
View user's profile Send private message
nandeshwar

New User


Joined: 11 Oct 2010
Posts: 45
Location: Delhi

PostPosted: Sat Nov 12, 2011 5:13 pm
Reply with quote

Bill I am Confused..but hanks for providing with a positive answer. I wil lwork on that .. thanks
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sat Nov 12, 2011 5:17 pm
Reply with quote

Quote:
I want to send the content of my dataset as body of the mail.

what a horrible approach ...

what if ...
the addressee wanted to save the <file> as a file on his/her PC,
to save an attachment is simpler than editing an email to keep only the needed/interesting data
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Nov 12, 2011 5:29 pm
Reply with quote

nandeshwar wrote:
Bill I am Confused..but hanks for providing with a positive answer. I wil lwork on that .. thanks


Not as confused as I am.

In a wildly humorous way, I was trying to ask what is wrong with using an attachment? Anything that you do to put "attachments" in the body of the text will end up looking to all the world as though it is an attachment, although probably not implemented as well as the tried-and-trusted-attachment-methods that have been used for many years and probably developed by teams of IT staff poring over RFCs and whatnot and doing busloads of testing across diverse systems, and which has been used uncounted scrillions of times over the past years, and millions more times just while I'm writing this.

What is your really, really, really good reason for not wanting to use an attachment?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sat Nov 12, 2011 5:41 pm
Reply with quote

Quote:
What is your really, really, really good reason for not wanting to use an attachment?



that' s requirement icon_wink.gif
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Nov 12, 2011 6:20 pm
Reply with quote

Your boss: "Oi, you, here's today's requirement".

Five minutes later.

"Excuse me, I feel that there are already several standard ways which would perfectly suit the business part of the requirement without doing what is suggested to me as the technical resolution, which requires extensive development and testing and can't hope to match the quality and usability of existing solutions."

"Just get on with it, it is what the client wants."

"Can we go back to the client and suggest the better approaches, see if he'll change his mind?"

"No, it's what he wants, and it would take too long anyway. If you want a technical alternative, see if you can get it done with a JCL or with Sort."

"But, really, we can't do it as well as doing it properly with what exists. We save hugely on development and testing and have a rock-solid-stable solution."

"Just get on with it."

At which point you go to the non-technical person who is responsible for the development (more senior than your boss) and have a "chat".

Half an hour later: "The client has changed his mind, he wants you to come up with some better suggestions, any chance of that?"
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Sat Nov 12, 2011 7:49 pm
Reply with quote

You said it in another post; querents post, "My requirement is to shoot myself, which way do I put the bullets in the magazine?"

(And who do we nominate as saying, "Terminology is important; you don't put bullets in the magazine, you put cartridges in it"? icon_lol.gif )
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sat Nov 12, 2011 8:26 pm
Reply with quote

Quote:
But I want to send the content in the body of the mail. Please let me know if this is possible.
This is a really, really, really HORRIBLE idea. The formatting will not be what you see on the mainframe since most mail systems use a proportional font.

If, despite the collected wisdom of people with YEARS more experience than you have telling you NOT to do this, you decide you have to do this -- why not search this forum? We've answered a large number of questions about FTP over the years and I'm pretty sure I remember one or two doing what you want to do.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sat Nov 12, 2011 8:57 pm
Reply with quote

Akatsukami wrote:
(And who do we nominate as saying, "Terminology is important; you don't put bullets in the magazine, you put cartridges in it"? icon_lol.gif )


But I've already tried the cartridges, it doesn't work. I even tried the standard tape reels. But the holes are too small, they look about the size of bullets so I'm right, correct me if I'm wrong. It is my requirement, please help me. Thanks for any solutions. I'm waiting.
Back to top
View user's profile Send private message
nandeshwar

New User


Joined: 11 Oct 2010
Posts: 45
Location: Delhi

PostPosted: Sun Nov 13, 2011 12:25 am
Reply with quote

enrico-sorichetti wrote:
Quote:
I want to send the content of my dataset as body of the mail.

what a horrible approach ...

what if ...
the addressee wanted to save the <file> as a file on his/her PC,
to save an attachment is simpler than editing an email to keep only the needed/interesting data


I don't understand what is so horrible in it ? Saw even moderators giving same reaction.. The reason I want it to send in the mail body and not as attachment is my requirement as stated by
enrico-sorichetti wrote:
Quote:
What is your really, really, really good reason for not wanting to use an attachment?



that' s requirement icon_wink.gif


my requirement is that I need a job to monitor some stream of jobs and send an alert msg .I dont need the msg to be saved as it will change ll the time . Hope this cn let someone to come up with helping me...
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sun Nov 13, 2011 12:49 am
Reply with quote

I was just betting that when asking why, we would be given a stupid reply.
looks like I just won icon_cool.gif

since we are on a professional forum we feel right to give proper advice,
if on the other side You are willing to accept only answers You like
maybe a paid consultant will, for a proper fee, tell what You want to hear.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Sun Nov 13, 2011 12:56 am
Reply with quote

nandeshwar wrote:
my requirement is that I need a job to monitor some stream of jobs and send an alert msg .I dont need the msg to be saved as it will change ll the time . Hope this cn let someone to come up with helping me...

Oh, you mean that those cheap bosses of yours won't spring for a proper scheduler! Well, I hope that you can soon free yourself from those Scrooges and get a position in a real data center.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sun Nov 13, 2011 1:05 am
Reply with quote

Ok, now we might be able to get further.

Usually the thing that monitors a stream of jobs might be some Schduling software. Do you have any of that?

You say you don't want to "save" the message, but you also talk of putting a dataset in the body. Are you actually saying you want to put some text in a dataset and then send that as an e-mail with the content of the dataset as the text message?

Code:

//ddname  DD *
some-needed-for-mail-if-that-is-neceesary
//        DD DSN=yourdsn
//        DD *
any-other-stuff-needed-to-finish-off-e-mail


You say that you already know how to do an e-mail with an attachment, so you must be able to do an e-mail without an attachment.

Isn't the trickier part doing the "monitoring" if you are not using a scheduler? Or are you happy with that bit?
Back to top
View user's profile Send private message
nandeshwar

New User


Joined: 11 Oct 2010
Posts: 45
Location: Delhi

PostPosted: Sun Nov 13, 2011 2:26 am
Reply with quote

enrico-sorichetti wrote:
I was just betting that when asking why, we would be given a stupid reply.
looks like I just won icon_cool.gif

since we are on a professional forum we feel right to give proper advice,
if on the other side You are willing to accept only answers You like
maybe a paid consultant will, for a proper fee, tell what You want to hear.



I would have expected the moderators to be more helpful rather than mocking .. If u want me to solve it on my own then thanks a lot anyways ... and for the upper message .. I guess you people are not getting the point .. I want to send the content of my dataset to mail body instead of send as an attachment ...
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Sun Nov 13, 2011 2:49 am
Reply with quote

nandeshwar wrote:
[...]If u want me to solve it on my own then thanks a lot anyways ... and for the upper message .. I guess you people are not getting the point .. I want to send the content of my dataset to mail body instead of send as an attachment ...


Of course we want you to solve it on your own. If you can't get the whole thing, then at least the majority, if not the majority, at least something. In the process of attempting that, you will learn and it will stick (or you won't learn, it won't stick, but you'll know after that that you are faking it).

If that appears brutal, mocking or whatever, it goes with the territory.

You start off by saying you want to send a dataset in the body of an e-mail not as an attachment. Along the way you give a little bit of a bimble about monitoring jobs, with something obscure about not wanting to save messages as they change all the time. Now you're just back to square one: I want to send the content of my dataset to mail body instead of send as an attachment.

You haven't expanded upon what you mean, so presumably you refuse to. With what you have just repeated, your requirement just seems idiotic. Simply repeating it boldly, makes it seem more idiotic.

Your choice. Either make a far better job of describing exactly what the problem is, not starting with what you feel the solution is, as that is just getting in the way, just stop typing when you want to type what you've already typed without providing any enlightenment. Or you just do it on your own. With what you have said, that what we have provided already is about as good as it gets.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sun Nov 13, 2011 3:18 am
Reply with quote

Use CA-7, or Tivoli, or Zeke, or whatever job scheduling software your site already has. They are already designed to monitor jobs and at least two of them can send emails already. In other words, what you want to do has already been done by commercial software. And you don't want to do this especially since what you want to do can be extremely complex and may require very advanced programming.

Part of our job as moderators is to prevent people from re-inventing the wheel. Most sites do not pay people to re-invent wheels, they pay people to develop (or maintain) applications.
Back to top
View user's profile Send private message
JPVRoff

New User


Joined: 06 Oct 2009
Posts: 41
Location: Melbourne, Australia

PostPosted: Mon Nov 14, 2011 6:01 am
Reply with quote

nandeshwar wrote:
.. I guess you people are not getting the point .. I want to send the content of my dataset to mail body instead of send as an attachment ...


nandeshwar,

I'd be interested in knowing the reason for wanting to send an email with the contents of a dataset in the body of an email. For site security that hasn't thought outside the box, this is one method of sending credit card (and other banking details) and looking to bypass the normal email checking procedures that comes with email. This, of course, is due to email checking does not generally check stuff written in EBCDIC in the body of an email.

Just a thought, as this sort of stuff comes up where I work.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Mon Nov 14, 2011 8:38 pm
Reply with quote

This is why people hate me...

The "dataset" is probably just a short message saying that job such-and-such abended.

The email is either going to a support person, or possibly a text message address to end up on a phone/handheld.

Just do what Bill shows above, and concatenate the dataset with the other parts of the message.

I do this all the time. In my case, we have a message going out to a bunch of us that tells us how many records are being sent to a vendor. The message line is something like " 9,123 records sent" and it's generated by a DFSORT step.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Mon Nov 14, 2011 11:13 pm
Reply with quote

re: attachment vs. email body debate

I think it depends on the content of the message as to whether I would want it as an attachment or not. Based on the usage described, it seems to me that the receiver of the email would get a simple message somewhat like:
Quote:
Job BILLING(J1245) ended with RC=16.


In that situation, I would prefer to get the email only rather than to have to perform a second manual process to see the short message in an attachment.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Nov 14, 2011 11:27 pm
Reply with quote

Quote:
re: attachment vs. email body debate


we wouldn' t be here wasting time if the TS had been more clear when describing the requirement...

since the TS kept/keeps talking about a DATASET and not about a few liner message, temporarily stored as a dataset
I think that we are right in advising on using an attachment rather then inlining the <thing>

bad communication is the minimum comment
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
Search our Forums:

Back to Top