ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > PublicDomainVic

Change File Name. Then change it back to what it was.

<< < (2/3) > >>

nkormanik:
Good suggestion @Ath.  Unfortunately I don't see that SAS will allow ambiguity with the dataset it's acting on.

Here's partial code:


--- ---proc summary data=sas_1.combined;
var
i_50501_Z
i_50502_Z
i_50503_Z
i_50504_Z
i_50505_Z
i_50508_Z
;
output out=sas_1.combined_temp (drop= _:) p80= /autoname;
run;

The .combined part refers to the dataset being acted upon.  I don't believe I can use a wildcard there.

I would need to change dataset filenames.  Or change script.

nkormanik:
Seriously, you folks need to deal with shenanigans and efficiently organizing projects all the time.  Otherwise, your butts would be full of bites.

To my knowledge, all that effort and skill never gets talked about.

Ath:
I'm pretty sure you can rework that SAS script to accept a filename in a variable (never used or interpreted SAS script, but did a quick google search on it), so executing the script while passing the filename(s) should be really doable.
This is only to avoid getting stuck with a 'one trick pony' tool ;D
And adjusting the script will improve someone's skills, if not yours :P

publicdomain:
Hi Nick, please confirm this the procedure you want coded for "Route #2":

List all subfolders inside "E:\00\":

E:\00\*

For each subdirectory copy each sole file to "C:\SAS_1\", using fixed name:

E:\00\AAPL\aapl_combined.sas7bdat → C:\SAS_1\combined.sas7bdat

Run external script.

After script finishes, copy the resulting file back:

C:\SAS_1\combined.sas7bdat → E:\00\AAPL\aapl_combined.sas7bdat

Repeat until all listed subfolders are processed.


The solutions above are "proper" yet as I'm amid closing the month of releases, this straightforward proggie is okay. Some times you just want the quick solution! If that's the case, a traditional .exe with GUI from me.

Please confirm :)

Cheers!

nkormanik:
I'm pretty sure you can rework that SAS script to accept a filename in a variable (never used or interpreted SAS script, but did a quick google search on it), so executing the script while passing the filename(s) should be really doable.
This is only to avoid getting stuck with a 'one trick pony' tool ;D
And adjusting the script will improve someone's skills, if not yours :P
-Ath (February 26, 2022, 10:13 AM)
--- End quote ---

You are exactly right, @Ath.  My life as a complete amateur in programming is 'one trick pony.'  Move along day to day here at the computer until some hurdle comes up, and then attempt to find the solution to get over that hurdle.

I suppose that's one of the main differences between non-programmers and programmers.  You folks build a large steady base, and have and know a plethora of tools, and versatility to use them appropriately.

You are indeed correct that there exist tools in SAS to accomplish passing filenames.  I've been having a discussion regarding this on the SAS forums.  Hate wasting your time, but here's the link:


Macro code to iterate through list

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version