The SAS Output Delivery System and reporting techniques

sending pdf file from z/os?

Reply
Frequent Contributor
Frequent Contributor
Posts: 81

sending pdf file from z/os?

Hi Dear,
I have created a pdf file from the mainfram, then I am trying to sent as attachment as pdf file, but I couldn't. Can any one please help me out. I am able to send as text file but not able to send a pdf file. Here is my JCL.For security reason, I change the mailserver ip address and email name. Thank you for help in advance.

Thanks

Inpu
//RST EXEC SAS,
// OPTIONS='EMAILHOST=qq.9.22.10',OUT=ICOUT
//DATA1 DD DSN=SB900.GIPRIC.VQ959.PDFTESTX,
// DISP=SHR
//SASLIST DD SYSOUT=A
//SASLOG DD SYSOUT=A
//SYSIN DD *
FILENAME TEMP EMAIL 'ANTON.roger@vista.COM'
SUBJECT='TESTING MAIL INTERFACE'
TYPE='TEXT/PLAIN'
ATTACH=("VQRRR.DUPSAS.VQ959.PDFTESTX" NAME='TEST REPORT'
EXTENSION='PDF');
DATA _NULL_;
FILE TEMP;
PUT 'THIS IS TESTING';
RUN;
SAS Super FREQ
Posts: 8,739

Re: sending pdf file from z/os?

Hi:
You might check out the documentation or companion for your operating system. This document has some e-mail examples:
http://support.sas.com/rnd/base/ods/templateFAQ/MVSODS3.pdf

Perhaps Tech Support can be of more help, if this doesn't resolve your problems.

cynthia
Super Contributor
Super Contributor
Posts: 3,174

Re: sending pdf file from z/os?

It is unclear from your post - exactly what problem are you experiencing? Also, how are you generating the PDF document on the z/OS mainframe system? Is the problem / error with opening the attachment when received by your EMAIL client, or possibly the EMAIL is not being received at all? And what SAS version are you running?

Scott Barry
SBBWorks, Inc.
Frequent Contributor
Frequent Contributor
Posts: 81

Re: sending pdf file from z/os?

Hi
when I Ftp this fileI(VQ959.VQ3.PDFTESTX) as pdf with binary format , I am able to view from adobe reader, but when I email the file(JCL and SAS coding attached) to my Lotus notes email application and open it , then it pop up the following message.

Adobe Reader couldn't open "VQ3.PDFTEST.PDF" because it either not a supported file type or because the file has been damaged(for example , it was sent as an email attachment and wasn't correctly decoded).

Since I was not able to open from lotus notes, I saved in my c drive, and then I try to open it , and I got the same error message.

Please note that my
Mainfram SAS is version 8.2

I need this help big time,

My JCL for creating PDF file is follows

//*--------------------------------------------------------------------
//SCRATCH2 EXEC PGM=RESTART,
// PARM='VQ959.VQ3.PDFTESTX'
//*--------------------------------------------------------------------
//*********************************************************************
//STEP1 EXEC SAS
//PDFTEST DD DSN=VQ959.VQ3.PDFTESTX,
// DISP=(NEW,CATLG,DELETE),UNIT=PUBLIC,
// DCB=(RECFM=VB,LRECL=259,BLKSIZE=27998),
// SPACE=(TRK,(5,5),RLSE)
//SYSIN DD DATA,DLM=##
***************************************
OPTIONS ERRORABEND MISSING=' ' ;

DATA MASTER;
INPUT @1 REC $CHAR30.;
CARDS;
aaaaaaaaaaaaaaaaaa
bbbbbbbbbbbbbbbbbb
cccccccccccccccccc
dddddddddddddddddd
eeeeeeeeeeeeeeeeee
;
RUN;

OPTIONS ORIENTATION=LANDSCAPE;
OPTIONS PAPERSIZE=LEGAL;
OPTIONS LS=138;
OPTIONS NODATE NONUMBER ;


ODS LISTING CLOSE;
ODS PDF FILE=PDFTEST;
PROC PRINT DATA=MASTER;
FORMAT REC $CHAR30.;
RUN;
ODS PDF CLOSE;
ODS LISTING;

ENDSAS;
##


My jcl for email is as follows

//********************************************
//RST EXEC SAS,
// OPTIONS='EMAILHOST=11.0.72.99',OUT=ICOUT
//DATA1 DD DSN=VQ959.VQ3.PDFTESTX,
// DISP=SHR
//SASLIST DD SYSOUT=A
//SASLOG DD SYSOUT=A
//SYSIN DD *
FILENAME TEMP EMAIL 'ANTON@ROGERS.COM'
SUBJECT='TESTING MAIL INTERFACE'
TYPE='TEXT/PLAIN'
ATTACH=("VQ959.VQ3.PDFTESTX"
EXTENSION='PDF');
DATA _NULL_;
FILE TEMP;
PUT 'THIS IS TESTING';
RUN;
Super Contributor
Super Contributor
Posts: 3,174

Re: sending pdf file from z/os?

I ran your code in SAS 9.1.3 SP4 and it worked -- I was able to open the EMAIL attachment with no problem. So, you may want to consider SAS HOTFIX maint to address known PDF related problems on z/OS with SAS 8.2, or look at upgrading to a more current (and supported) SAS version.

Scott Barry
SBBWorks, Inc.
N/A
Posts: 0

Re: sending pdf file from z/os?

PDF files are not text files, but you have coded ‘TYPE=TEXT/PLAIN’. Try ‘TYPE=APPLICATION/PDF’.
Frequent Contributor
Frequent Contributor
Posts: 81

Re: sending pdf file from z/os?

Hi Bobmorley,
I tried by putting TYPE='APPLICATION/PDF' but it doesn't work,


Thanks

Inp
N/A
Posts: 0

Re: sending pdf file from z/os?

I’ve just checked my working code, and you want the original TYPE=’TEXT/PLAIN’ on the FILENAME statement itself and the suggested TYPE=APPLICATION/PDF’ goes inside the ATTACH.

Thinking about this, you want the body of the email as text but the attachment has different characteristics.
Frequent Contributor
Frequent Contributor
Posts: 81

Re: sending pdf file from z/os?

Hi Bobmorley2,
Thank you so much. When I put type=application /pdf inside the attachement , it didn't work, but when I put CT=APPLICATION/PDF it work fine. Finally you get me thorough. Thanks so much Bobmorley2 and other people who try to help me for this issue.


Thanks again guys.

regards

Inp
Ask a Question
Discussion stats
  • 8 replies
  • 1087 views
  • 0 likes
  • 4 in conversation