SAS macro to import different type of file

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

SAS macro to import different type of file

Write a macro to import different type of files. Let’s say we have files that are tab delimited text files as well as csv files. (“Sample.csv” and “Scores.txt”)

 


Accepted Solutions
Solution
Wednesday
Super Contributor
Posts: 405

Re: SAS macro to import different type of file

Homework?

 

Have a look a proc import - not may preferred way to read text files - write one for each file type, compare the differences, create a macro with parameters.

View solution in original post


All Replies
Solution
Wednesday
Super Contributor
Posts: 405

Re: SAS macro to import different type of file

Homework?

 

Have a look a proc import - not may preferred way to read text files - write one for each file type, compare the differences, create a macro with parameters.

Highlighted
New Contributor
Posts: 4

Re: SAS macro to import different type of file

Posted in reply to andreas_lds

Required help to convert the below SAS codes into macros.


a) proc gchart data=HTWT; vbar gender/sumvar=weight; Title "Average weight by Gender";
run;
b) proc plot data=HTWT; Title "Scatter plot"; plot &height*&weight;
run;
(Hint: Define two different macros.) 

Super User
Posts: 21,447

Re: SAS macro to import different type of file

@pallab You should use PROC SGPLOT not GCHART or PLOT these days. The graphics quality is much better.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 85 views
  • 0 likes
  • 3 in conversation