BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

I am creating the PDF file from data step. I have avarible with length of $154.
when i am try to write it in PDF, the records are splited as in below format. my code is below. I am not able to find my mistake. I am working in mainframe SAS 8.0. Please help on this.

ods pdf file=yyyy;
Data one;
set xxx;
put @1 zzz $char154.;
run;
ods pdf close;

Correct format:-
*****************fdgsdfgsdfg**************
Jan05 Feb05 Mar05

What I get:-

*****************fdgsdfgsdfg**************
Jan05
Feb05
Mar05

Thanks,
Selvi.
3 REPLIES 3
Cynthia_sas
SAS Super FREQ
Hi:
You have a few different issues that probably require you to contact Tech Support:
1) I remember that PDF output had to be created differently in SAS 8.0, SAS 8.1 and SAS 8.2 -- if I remember correctly, in SAS 8.0, you had to use ODS PRINTER to create a PostScript file and then you had to manually distill the postscript file into a PDF file using Adobe Distiller, (as described on page 6 of this SUGI paper):
http://www2.sas.com/proceedings/sugi25/25/btu/25p064.pdf

2) By SAS 8.2, the current ODS PDF syntax was production and you did not need a separate distiller step -- so it is really crucial for you to know EXACTLY which version of SAS you are running on the mainframe.

Next, there is a new syntax for working with DATA step programs and ODS. It is described in these papers:
http://support.sas.com/techsup/technote/ts664.html
http://www2.sas.com/proceedings/sugi23/Appdevel/p21.pdf
http://www.ats.ucla.edu/stat/sas/library/ods_work_for_you.pdf
http://www.ats.ucla.edu/stat/SAS/library/ods.pdf

The problem that you will run into is described in this Tech Support Note:
http://support.sas.com/techsup/unotes/SN/005/005486.html

Your sample program falls into the category (from the TS Note) of a program that is attempting to use DATA _NULL_ to create output, but is using an "old" FILE PRINT (thus bypassing ODS) instead of the "new" FILE PRINT ODS.

If you have access to SAS 8.2 on Windows, you might try running this sample program. It illustrates the difference between the "old" FILE PRINT and the "new" FILE PRINT ODS. (I added more data lines so the output would be longer.)
[pre]
data xxx;
infile datalines length=lg;
length zzz $154;
input zzz $varying. lg;
return;
datalines;
*****************fdgsdfgsdfg**************
Jan05 Feb05 Mar05
Twas brillig and the slithy toves
Did gyre and gimble in the wabe
All mimsy were the borogroves
And the mome raths outgrabe.
;
run;

ods pdf file='c:\temp\withODS.pdf';
title 'Really using ODS to create the output';
title2 'As a table';
data _null_;
set xxx;
file print ods;
put _ods_;
run;

proc print data=xxx label noobs
style(table)={rules=none frame=void cellspacing=0};
title2 'As a Table without lines';
var zzz /
style(header)={background=white};
label zzz='The Output';
run;
ods pdf close;

ods pdf file='c:\temp\withoutODS.pdf';
title 'Capturing the FILE PRINT output as a "block"';
title2 'Expect to see problems with this output';
data _null_;
set xxx;
file print;
put @1 zzz $char154.;
run;
ods pdf close;

[/pre]

For more help with FILE PRINT ODS or with your ODS, PDF and mainframe issues (particularly if you ARE running only SAS 8.0), then you really need to contact SAS Technical Support.

Good luck,
cynthia
deleted_user
Not applicable
Hi,

Please tell me the maximum range of PDF record length and how to create it. I am trying the create the linesize of 154. But the record is divided into two. 2nd part is coming in the next line. when i give the linesize=256 ps=60 orentation=landscape, again the pdf coming in same way(the reocrd is divied into two half).

I am working in mainframe. my logic is converting the mainframe file to PDF using the ODS PDF. the output of pdf is coming in table format. By using the below code i tried to ignore. but it appling for table alone. Outside of table the page look gray color. Please tell me how to remove the black in page. And also give me the complete material for OSD PDF and style. It will be helpful for me.

PROC TEMPLATE;
DEFINE STYLE STYLES.NOBORDER;
PARENT = STYLES.MINIMAL;
REPLACE OUTPUT /
RULES = NONE
BACKGROUND=WHITE
CELLSPACING = 0
BORDERWIDTH = 0;
END;


Thanks,
selvi.
Cynthia_sas
SAS Super FREQ
Hi:
At this point, you really need to contact Tech Support for more help. As I explained previously, the way that ODS works with the DATA step requires a retooling of your approach. That retooling could include a STYLE template and/or rewriting of your code to use FILE PRINT ODS logic.

For more information about how to contact Tech Support, refer to:
http://support.sas.com/techsup/contact/index.html

Good luck!
cynthia

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 825 views
  • 0 likes
  • 2 in conversation