BookmarkSubscribeRSS Feed
janetS
Calcite | Level 5
Hi -

How can I scan through all my programs and identify which programs use a certain field?

Janet
3 REPLIES 3
LinusH
Tourmaline | Level 20
If your programs is not generated by DI Studio, the easiest would probably to use OS tools, such as the search facility i Windows Explorer, or in UNIX various shell commands.

/Linus
Data never sleeps
data_null__
Jade | Level 19
I use ULTRA EDIT it has a nice "Find in files" feature. I've been using it quite a bit lately.

You can also use SAS to search. I used FIND but there are other functions if you need more sofisticated searching.

[pre]
filename FT33F001 'b*.sas ';
options notes=0;
data _null_;
length Filename $128;
infile FT33F001 filename=filename eov=eov;
input@;
if _n_ eq 1 or eov then do;
line = 0;
eov = 0;
put;
put 'NEW FILE: ' Filename=;
end;
line + 1;
if find(_infile_,'summary','i') then do;
put +10 line=;
list;
end;
run;
options notes=1;
[/pre]
chang_y_chung_hotmail_com
Obsidian | Level 7
@janetS: I am not sure if the source text scanning would be sufficient. Variable lists, arrays and other variable naming shortcuts let us code without explicitly mentioning individual variable names. I would refine what I mean by "using a variable", and then proceed more cautiously.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1193 views
  • 0 likes
  • 4 in conversation