Help using Base SAS procedures

How to align the computed 'line' to the left

Reply
Contributor
Posts: 35

How to align the computed 'line' to the left

I am having trouble aligning the line to the left as a result of the group compute block.

my code:

compute before company/style={just=left};
line 'Company: ' +1 compcode $5.;
endcomp;

The output still shows the line in the center.

Could anyone help me?

Thanks a lot...
SAS Super FREQ
Posts: 8,781

Re: How to align the computed 'line' to the left

Hi:
style={just=left} will not work in all destinations. For example, it will probably work in HTML, RTF or PDF destinations, but will not work in the LISTING destination (the output window or listing window). It probably won't work for ODS CSV and I'm not sure whether it will work for TAGSETS.EXCELXP.

If you are using the LISTING destination and you want to start your string 'Company' at the far left, experiement with column pointer control:
[pre]
line @3 'Company' .... ;
[/pre]

You might have to change the @3 to a different number, but you should be able to get the string where you want it in the LISTING window. Other ODS destinations will ignore the @3 column pointer control and use the STYLE= override.

How to do what you want really depends on the ODS destination where you want to send the output.

cynthia
Contributor
Posts: 35

Re: How to align the computed 'line' to the left

> Hi:
> style={just=left} will not work in all
> destinations. For example, it will probably work in
> HTML, RTF or PDF destinations, but will not work in
> the LISTING destination (the output window or
> listing window). It probably won't work for ODS CSV
> and I'm not sure whether it will work for
> TAGSETS.EXCELXP.
>
> If you are using the LISTING destination and you want
> to start your string 'Company' at the far left,
> experiement with column pointer control:
> [pre]
> line @3 'Company' .... ;
> re]
>
> You might have to change the @3 to a different
> number, but you should be able to get the string
> where you want it in the LISTING window. Other ODS
> destinations will ignore the @3 column pointer
> control and use the STYLE= override.
>
> ow to do what you want really depends on the ODS
> destination where you want to send the output.
>
> ynthia


Thank you, Cynthia! I tried column pointer but it didn't work maybe because I have the system options of center. I was trying to have report in the center, but the first few lines of group info (not the heading) in the left most column. Now I changed the center to nocenter.
Ask a Question
Discussion stats
  • 2 replies
  • 118 views
  • 0 likes
  • 2 in conversation