spufi to email formatting

william giannelli

spufi to email formatting

We have a spufi query job that sends the output to email.

But the formatting of the columns do not line up.

Might there be any spufi output formatting options I could use to correct this?

thanks

Bill

Peter Conlin

spufi to email formatting
(in response to william giannelli)
Could your e-mail be using a variable width font?

From Google:

A monospaced font, also called a fixed-pitch, fixed-width, or non-proportional font, is a font whose letters and characters each occupy the same amount of horizontal space. [...] Examples of monospaced fontsinclude Courier, Courier New, Lucida Console, Monaco, and Consolas.

You might be able to determine by checking the e-mail properties/headers, or simply cut & paste a SPUFI output screen into your mail package & send it to yourself.

N.b. I generally switch the e-mail type from plain-text to html or rtf, select the output lines & change it to courier new. If your batch SPUFI specifies the font, change it there, or look at Postel's RFC for SMTP.
________________________________________
From: william giannelli [[login to unmask email]
Sent: Wednesday, March 13, 2019 6:44 AM
To: [login to unmask email]
Subject: [DB2-L] - spufi to email formatting

We have a spufi query job that sends the output to email.

But the formatting of the columns do not line up.

Might there be any spufi output formatting options I could use to correct this?

thanks

Bill

-----End Original Message-----

Javier Estrada Benavides

RE: spufi to email formatting
(in response to Peter Conlin)

Hey once again

    Might not be the answer you're looking for, but I'm a fan of using Spark to do the whole process. Here's how I like to do it (in the same program)...

- Connect and execute the query

- Transform the resulting RDD into a pandas dataframe

- Format it nicely

- If it applies, spit it out in a pretty looking chart

    - If your plotting library can do that, create a jpeg image and include it in the body of the email

    - If you want to look fancier, create an html template to put everything together, then at the end of the email body include a link to the page you just automatically generated

** The result is a guaranteed happy manager :)

 

Regards,

Javier Estrada Benavides, Czech Republic / Mexico

IBM Champion for Analytics

IBM Certified System Administrator - Db2 12 for z/OS

IBM Db2 12 DBA for z/OS - 2018 (the ugly brown badge from IBM Open Badge Program)

IBM Certified System Administrator - DB2 11 for z/OS

IBM Certified Database Administrator - DB2 11 DBA for z/OS

william giannelli

RE: spufi to email formatting
(in response to Javier Estrada Benavides)

Thank you both for your responses and help!

Let me explain further what my situation is.

My site is transitioning off of SMTP because IBM is stopping support. My site is not moving to its replacement CSSMTP. I do not know why. So our z/OS support team wrote their own rexx program that passes messages and attachments to email.  However this mainframe program does not accept or pass along any outlook / email formatting parameters. I was hoping to somehow format my SPUFI output on the mainframe in a way that outlook would accept cleanly and not skew the column alignment.

I hope that makes sense.

thanks!

Bill

Peter Conlin

RE: spufi to email formatting
(in response to william giannelli)

Hi Bill,

This works for me.

As SMTP is going away for you, you'd need to change the output destination & the HELO operand.

/*ROUTE PUNCH IBIMVS.SMTP
//MONO EXEC PGM=IEBGENER,REGION=0M
//SYSIN DD DUMMY
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSUT1 DD DATA,DLM='%%'
HELO IBIMVS
MAIL FROM:<[login to unmask email]>
RCPT TO:<[login to unmask email]>
DATA
From:<[login to unmask email]>
To:<[login to unmask email]>
Subject: test html/mono font
MIME-Version: 1.0
Content-Type: text/html
Content-Disposition: inline
<html>
<body>
<pre style="font: monospace">
test 00000000 11111111 AAAAAAAA IIIIIIII @@@@@@@@ ||||||||
test 11111111 00000000 IIIIIIII AAAAAAAA |||||||| @@@@@@@@
.
%%
//SYSPRINT DD SYSOUT=*
pete conlin

p.s. you can use either the /*ROUTE PUNCH node.smtpserver
or the ,SMTP) operand in the SYSUT2 DDname, using both is overkill, but works too.
Good luck.

william giannelli

RE: spufi to email formatting
(in response to Peter Conlin)

Hello Peter,

Thank you for your response! Yes we were using those formatting commands. But now the problem is this new in-house rexx program treats those commands as text and they are not reformatting the email message.

thanks

Bill

Philip Sevetson

spufi to email formatting
(in response to william giannelli)
William,

I think I have a solution to your REXX problem. Or, you could write things out to a tempfile and send it with a later IEBGENER step. If you want to compare REXX, connect with me offline and let’s compare code.

****

Peter,

A couple of years ago, I failed completely at formatting email originating on z/OS. Your supplied text resolved my problem today. Thank you very much. If you have an archetypal version of that, I think you should put it up in the IDUG Code Place.

****

--Phil Sevetson

psevetson at fisa dash opa nyc gov (you know where to put the periods)



From: william giannelli [mailto:[login to unmask email]
Sent: Wednesday, March 27, 2019 1:35 PM
To: [login to unmask email]
Subject: [DB2-L] - RE: spufi to email formatting


Hello Peter,

Thank you for your response! Yes we were using those formatting commands. But now the problem is this new in-house rexx program treats those commands as text and they are not reformatting the email message.

thanks

Bill

-----End Original Message-----
**This e-mail, including any attachments, may be confidential, privileged, or otherwise legally protected. It is intended only for the addressee. If you received this e-mail in error or from someone who was not authorized to send it to you, do not disseminate, copy, or otherwise use this e-mail or its attachments. Please notify the sender immediately by reply e-mail and delete the e-mail from your system.**

william giannelli

RE: spufi to email formatting
(in response to Philip Sevetson)

Hi Philip,

I emailed you thru my work email with the rexx code we use for sending emails.

thanks

Bill