Hi,
Could someone help me with the position of the .txt columns output
This is how my current .txt output file is produced:
As you can see order date starting @7 and ending at @17 position, but i want it be moved one position right: i.e., order date starting at 8 and ending at 18.
I have used below code, could someone help me with it:
ods listing file = "&sas_drv.:/SASFILES/Daily.txt";
ods escapechar='^';
options nodate nonumber orientation=landscape ps=max;
proc report data=throughput_final nowd split='~' noheader headskip ls=142;
column order_date order_code product_code qty delivery_method;
define order_date/display "Date" spacing=2;
define 'order_code'n/display "Order_code" left spacing=2;
define product_code/display "Product Code" left spacing=2;
define qty/analysis "Qty" spacing=2;
define delivery_method/display "Delivery Method" spacing=2;
run;
Thanks
vnreddy
There is nothing in that code that is saying to start the first column at the 7th character on the line.
Probably you are seeing the output in the 7th column because you are using the CENTER option and it happens to be that 6 spaces is then number that centers that report on the line for the given value of LINESIZE option you have set.
You could play with the LINESIZE option of the width of the report.
But why not just turn off the centering? Either change the system option or add the NOCENTER option to the PROC REPORT statement.
There is nothing in that code that is saying to start the first column at the 7th character on the line.
Probably you are seeing the output in the 7th column because you are using the CENTER option and it happens to be that 6 spaces is then number that centers that report on the line for the given value of LINESIZE option you have set.
You could play with the LINESIZE option of the width of the report.
But why not just turn off the centering? Either change the system option or add the NOCENTER option to the PROC REPORT statement.
Hi,
nocenter and spacing solved the issue. Thank you for the help
ods listing file = "&sas_drv.:/SASFILES/Daily.txt";
ods escapechar='^';
options nodate nonumber nocenter orientation=landscape ps=max;
proc report data=throughput_final nowd split='~' noheader headskip ls=142;
column order_date order_code product_code qty delivery_method;
define order_date/display "Date" spacing=7;
define 'order_code'n/display "Order_code" left spacing=2;
define product_code/display "Product Code" left spacing=2;
define qty/analysis "Qty" spacing=2;
define delivery_method/display "Delivery Method" spacing=2;
run;
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.
Ready to level-up your skills? Choose your own adventure.