View previous topic :: View next topic
|
Author |
Message |
Anitha Mohan
New User
Joined: 31 Dec 2014 Posts: 3 Location: India
|
|
|
|
Hi,
I need to send the data in my PS file through mail. Below given the data in the file.
FB file ; LRECL - 80
I transmitted the file successfully using XMIT JCL statement. When I access and open the mail in normal web browser, it looks fine.
But in the outlook, the alignment seems to be improper like below.
Is there any way to correct this, thereby the alignment will be proper when view through outlook?
Thanks in advance. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
please do not post attachments - a simple cut and paste using the code tags is sufficient (and easier).
You have shown 2 different files/datasets so maybe there is a difference between the 2 source datasets? |
|
Back to top |
|
|
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
There are a number of issues getting columns to align in an e-mail, although in your case the data is clearly different in each example (e.g.; the number of dashes under EMPLY_NAME) so it's difficult to be sure what the problem is.
Some ideas that you may want to investigate -
1) Specify the use of a fixed font rather than a proportional one.
2) Use x'05' as a tab character to align the start of a column.
3) I have also seen duplicate spaces (x'40') getting supressed. I have used x'41' to overcome this. |
|
Back to top |
|
|
Anitha Mohan
New User
Joined: 31 Dec 2014 Posts: 3 Location: India
|
|
|
|
@Nic Clouston: It is a single file. I have just shown the improper alignment in the Capture2.
My alignment looks good in the MF file as well as web mail. When I view through outlook, it was not proper. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hello,
Could you show us the same input data in mainframe and output in outlook.
Copy paste it. The 2 data you posted above are misleading. |
|
Back to top |
|
|
Anitha Mohan
New User
Joined: 31 Dec 2014 Posts: 3 Location: India
|
|
|
|
@David : I have tried all your ideas. Nothing works out.
but in my case, the hyphen takes up much less space than any other character. That is one of the reason for the improper alignment.
Could you please help on how to apply the fixed font here?
Thanks!! |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
No, they are not the same data. Columns 1 - 3 have different data between capture2 and capture1. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
The way the data appears in a mail client, such as Outlook, depends ENTIRELY upon the mail client -- nothing you do on the mainframe really has much impact. You need to research the mail client options to determine a solution. SMTP, for example, sends pure text with no formatting possible so if your mainframe is sending the email via SMTP, then any solution you derive would have to be mail client-based. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hello,
You could format your PS file as a HTML document and make outlook format it with monospace format. It is not technically XMITIP solution. It uses SMTP.
The following assumptions are made
1. You have ICETOOL
2. Your SMTP SYSOUT is (B,SMTP)
Input PS file:
Code: |
Command ===>
****** ***************************** Top of Data **
000001 HELLO THIS IS SPARTAA
000002 ALL YOUR BAZEZ BELONG TO UZ
****** **************************** Bottom of Data |
Output outlook email:
Code: |
HELLO THIS IS SPARTAA
ALL YOUR BAZEZ BELONG TO UZ |
The code:
Code: |
//STEP0010 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//HEADER DD *
HELO LPAR
MAIL FROM:<VASANTHZ@TROLLLAND.COM> <- From email address
RCPT TO:<VASANTHZ@SOMEEMAIL.COM> <- To email address
DATA
FROM: VASANTHZ@TROLLLAND.COM <- From email
TO: VASANTHZ@TROLLLAND.COM <- To email
SUBJECT: THIS IS A PROPER FORMATTED EMAIL
MIME-VERSION: 1.0;
CONTENT-TYPE: TEXT/HTML
<html>
<body>
<pre style="font: monospace">
/*
//BODY DD DSN=YOUR.PS.REPORT.FILE,DISP=SHR <- The PS file you are sending as email
//TRAILER DD *
</pre>
</body>
</html>
/*
//TEMP DD DSN=&&TEMP1,DISP=(MOD,PASS),SPACE=(TRK,(9,2)),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
//MAILOUT DD SYSOUT=(B,SMTP) <- Your SMTP output SYSOUT
//TOOLIN DD *
COPY FROM(HEADER) TO(TEMP)
COPY FROM(BODY) TO(TEMP)
COPY FROM(TRAILER) TO(TEMP)
COPY FROM(TEMP) TO(MAILOUT)
/* |
Hope it helps.
Vasanth.S |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Slimmer version of the above code using IEBGENER, Both versions work fine :-)
Code: |
//EMAIL EXEC PGM=IEBGENER
//SYSUT1 DD *
HELO LPAR
MAIL FROM:<VASANTHZ@TROLLLAND.COM> <- From email address
RCPT TO:<VASANTHZ@SOMEEMAIL.COM> <- To email address
DATA
FROM: VASANTHZ@TROLLLAND.COM <- From email
TO: VASANTHZ@TROLLLAND.COM <- To email
SUBJECT: THIS IS A TEST EMAIL
MIME-VERSION: 1.0;
CONTENT-TYPE: TEXT/HTML
<html>
<body>
<pre style="font: monospace">
/*
// DD DSN=YOUR.PS.REPORT.FILE,DISP=SHR <- The PS file you are sending as email
// DD *
</pre>
</body>
</html>
/*
//SYSUT2 DD SYSOUT=(B,SMTP) <- Your SMTP output SYSOUT
//SYSIN DD DUMMY
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=* |
|
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 580 Location: London
|
|
|
|
I don't know how you can do it from your job, but if you select the text and change the format in Outlook to Courier New it will align properly. |
|
Back to top |
|
|
|