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

Mailing PS dataset - Improper Alignment in outlook


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

New User


Joined: 31 Dec 2014
Posts: 3
Location: India

PostPosted: Mon Jan 05, 2015 1:28 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Mon Jan 05, 2015 2:55 pm
Reply with quote

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
View user's profile Send private message
David Robinson

Active User


Joined: 21 Dec 2011
Posts: 199
Location: UK

PostPosted: Mon Jan 05, 2015 2:58 pm
Reply with quote

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
View user's profile Send private message
Anitha Mohan

New User


Joined: 31 Dec 2014
Posts: 3
Location: India

PostPosted: Mon Jan 05, 2015 3:14 pm
Reply with quote

@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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Mon Jan 05, 2015 3:17 pm
Reply with quote

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
View user's profile Send private message
Anitha Mohan

New User


Joined: 31 Dec 2014
Posts: 3
Location: India

PostPosted: Mon Jan 05, 2015 4:34 pm
Reply with quote

@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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Mon Jan 05, 2015 5:59 pm
Reply with quote

No, they are not the same data. Columns 1 - 3 have different data between capture2 and capture1.
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: Tue Jan 06, 2015 4:28 am
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Tue Jan 06, 2015 6:43 pm
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Tue Jan 06, 2015 7:13 pm
Reply with quote

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
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 580
Location: London

PostPosted: Thu Jan 08, 2015 1:02 am
Reply with quote

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
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

 


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