06-21-2012 11:37 AM
I have a tricky one here - I have opened a track with SAS, but so far they say, 'You can't get there from here'.
I hope I can get one of you wizards to help me on this - or tell me conclusively that it can't be done and just give up.
I have a ODS PDF document that I am printing - it is a customer statement - and is created only with PUT statements
(just like the old days). I use N=PS and LINESIZE / PAGESIZE options and all the rest. Not a PROC to be seen.
The statement itself prints just fine. My problem is that I also need to print a bar code at 90 degrees along the right
margin of the page about 3 inches from the top of the page (this is used by the machines that stuff the statements into
envelopes). I have the bar code font and I am able to print the bar code on the statement - the problem is that I can't
get the bar code rotated so it prints correctly. The bar code is in 3of9 format
Any thoughts? I am using SAS 9.3 on a Windoze platform so ODS LAYOUT is an option, but I have no experience
whether this is possible or not. Or could II use a custom template?
Any help would be appreciated.
Thanks in advance.
06-21-2012 12:44 PM
I do not know of any custom template that would help you. ODS LAYOUT with PDF seems to be the way to go. And that means that your "older" FILE PRINT with PUT statements will have to change. As for rotating the bar code -- you may have to rotate the image outside of SAS, unless you can cause ODS LAYOUT to rotate it (which again, is a Tech Support question.)
If Tech Support said that you can't get there from here, I would tend to believe them.
06-21-2012 01:56 PM
If I had to get something in the mail this week I might be tempted to revert to another old method: sending it to the printer twice.
Print the PDF versions. Reload into printer and then use a mail merge in landscape to get the barcodes. But I realize that may not be practical for certain size jobs.
I might investigate finding a way to make a very skinny chart in the desired location that would result in only an Axis label being visible and have that label in the barcode font. The options on the AXIS statement may allow sufficient manipulation to produce a readable bar code. This does assume that the bar code is an available font.
08-02-2012 06:39 PM
You can use ODS LAYOUT along with the ODS PDF. Here is an example:
/*Assuming that you already have barcode saved in a folder*/
ods pdf startpage=never style=journal file="C:\FileName.PDF" notoc ;
ods region height=.5in width =.5in x=.5in y=.15in;
ODS PDF CLOSE;
/*You can print barcode with angle or text rotation option in GSLIDE as well. Something like below assuming that font barcode would work fine with GSLIDE*/
note move=(35,40) color=black font=simplex HEIGHT=4 j=right "BARCODE TEXT";
08-03-2012 07:15 AM
In order to use a font it has to be registered in the SAS Registry
One can use Proc FONTREG to this, see example below. The NOUPDATE option only shows what would happen, but the SAS Registry is not updated
To use it as suggested, find an example below:
08-12-2012 01:40 PM
I remember that there is a special situation with Title statements. If you use A=90 or A=-90 it will print the title on the side of the output, if the output is created in PROC GSLIDE. When using simple FILE PRINT and PUT statements that does not work.
So the question is, would it be feasible for you to create the output in PROC GSLIDE, using the necessary Note statements?
Here is an example of what I mean:
title a=-90 "Right side of output &number";
note "This is for &name";
note "Carrying number &number";
input name $ number;
As you see the characters on the side are rotated inward. With R=180 you can rotate them outward, but you have to keep in mind that the rotation is by character, not by string.