Please assist or point me to some good examples for working with OS commands and converting those results into usable SAS dataset results.
What I am trying to do is work with SAS and the OS commands to review changes in programs and data over time which works as expected to this point. What I am expecting is a SAS dataset for each time that contains results from changes found by the OS command output results contains information. the information is used after this process but currently I am saving the SAS log as text and working with that.
This is the macro produces and an example of the output from a SAS log after the macro has been called included under the macro below.
%macro changed_sas;
data _null_;
infile oscmd;
input;
put _infile_;
run;
%mend changed_sas;
***** C:\TEST\CREATE.SAS
  74:
  75: %let Month1 = 200001;
  76: %let MonthN = 201803;
  77: %let update = D;
  78:
***** D:\TEST\CREATE.SAS
  74:
  75: %let Month1 = 200001;
  76: %let MonthN = 201712;
  77: %let update = N;
  78:
*****
thank you everyone
I needed to replace _null_ with a name and then put statement needed to be replaced with myvar.
data test;
infile oscmd;
input;
myvar= _infile_;
run;
And what information should end up in the dataset?
What I am expecting is the results in a SAS dataset's based on SAS calling OSCMD and getting output resulted from the DOS command such as FC, DIR ... As an example. I know that GIT works, but what I am looking for is analyzable SAS datasets that are results which are due to changes in SAS programs and SAS datasets, underplaying depended documents related to policies and such over a long time period that involves many changes to each program area under evaluation.
thank you everyone
I needed to replace _null_ with a name and then put statement needed to be replaced with myvar.
data test;
infile oscmd;
input;
myvar= _infile_;
run;
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.