CSV attachment with different fonts in the File

JES2/3, JCL, utilities.
Post Reply
Anithab
Registered Member
Posts: 44
Joined: Mon May 26, 2014 2:57 pm

CSV attachment with different fonts in the File

Post by Anithab »

Hi all,

Is it possible to send a mail with csv file as attachment having different fonts from Mainframe?

Like the Header line will be with different font size and the next like with different font size and bold ?
User avatar
Anuj Dhawan
Founder
Posts: 2801
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: CSV attachment with different fonts in the File

Post by Anuj Dhawan »

Hi,

This is an example of a job that sends a SMTP note with a HTML MIME extension, please amend it as per your choice and see if it works for you:

Code: Select all

//SENDNOTE EXEC PGM=IEBGENER
//SYSIN    DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUT2   DD SYSOUT=(A,SMTP)
//SYSUT1   DD *
helo MVSHOST
mail from:<abcd@abc.com>
rcpt to:<wxyz@xyz.com>
data
From:     abcd@abc.com
To:       wxyz@xyz.com
Subject:  Message with HTML MIME
MIME-Version: 1.0
Content-type: multipart/mixed;
              boundary="simple boundary"

You have received mail whose body is in the HTML Format.
--simple boundary
Content-type: text/html

<font face="Courier" size="+2" color=blue>
This is Courier font in blue</font>
<br><br>
<font face="Arial" size="+3" color=red>
This is the Arial font in red</font>

--simple boundary--
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1891
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: CSV attachment with different fonts in the File

Post by Robert Sample »

My understanding is that a csv file is plain-text (that is, no color, no font, no sizing) so what you are wanting to do is not possible, period. Excel may support HTML-style formatting but that would depend upon Excel.
User avatar
Anuj Dhawan
Founder
Posts: 2801
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: CSV attachment with different fonts in the File

Post by Anuj Dhawan »

Robert is correct -- my job will work on the "body of the email" and not on attachment. Sorry for the fast fingers... :oops:
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Anithab
Registered Member
Posts: 44
Joined: Mon May 26, 2014 2:57 pm

Re: CSV attachment with different fonts in the File

Post by Anithab »

Anuj,

Thanks for hinting that and the example :) I got a similar example from planetmvs..

Robert,

Thanks for your help. But if I wanted to attach the excel with different fonts from mainframe how do I need to approach that?

Any links or pointers will be helpful
User avatar
Anuj Dhawan
Founder
Posts: 2801
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: CSV attachment with different fonts in the File

Post by Anuj Dhawan »

If SAS can be your choice, have a look here. I've not explored it much but it sounds interesting:



Link to the file: http://support.sas.com/resources/papers ... 0-2011.pdf
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1891
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: CSV attachment with different fonts in the File

Post by Robert Sample »

The easiest way is if your site has one of the mainframe products that generate Excel formats. You would use that tool to create Excel files that can be transferred from the mainframe. If your site does not have such a tool, buying one would allow for such transfers. I have not researched prices, though most mainframe software runs tens to hundreds of thousands of US dollars (and the cost typically depends upon the size of the mainframe).

Another method would be to use SAS, as Anuj suggested. SAS can generate Excel files on the mainframe with little effort. If your site does not have SAS, though, it can be expensive to acquire.

The WORST way would be to write your own Excel file generator on the mainframe. Excel files are documented in a Microsoft publication that is now well over 1,000 pages and growing every release of Excel. Excel files are binary with variable length records (a bad situation for mainframe-to-PC transfers). A while back I estimated a good team of 4 programmers could probably develop an Excel file generator on the mainframe in about a year of analysis / coding / testing; that estimate may be low now since Microsoft keeps changing the documented formats.
Anithab
Registered Member
Posts: 44
Joined: Mon May 26, 2014 2:57 pm

Re: CSV attachment with different fonts in the File

Post by Anithab »

Thanks Rober and others in assisting me.t!!

The requirement was changed and We just had the mail with attachment as text file .
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “JCL - Job Control Language.”