BookmarkSubscribeRSS Feed
4 REPLIES 4
fja
Lapis Lazuli | Level 10 fja
Lapis Lazuli | Level 10
Could I ask you to be more specific, please?
--fja
PaigeMiller
Diamond | Level 26

@Gauri123-56 wrote:
If record doesn't exist then save it in excel file

Yes, much more explanation is needed. In particular, you are saying if something doesn't exist then save it ... you can't save something that doesn't exist. That requires a very clearly worded statement of what you want.

--
Paige Miller
ballardw
Super User

How do you intend to search for "if the record exists"? Are you going to supply a specific value for a named variable? Multiple variables? Do you know the names of the variables before hand? Actual values?

 

What exactly is an "input file"? What format are the files? Where to do the input files reside? Do you expect to read the input file into a SAS data set?

 

What exactly is the output supposed to look like? A list of record definitions? All of the data?

How many "input files" are we talking about? Is the name of the input file supposed to be part of the output?

 

Just a few of the details that need to be addressed.

Quentin
Super User

In addition to defining more of the question, as others have mentioned, it's very helpful if you will share the code you have tried, and describe the problems with it (errors, not desired results, etc.)  As general advice, most folks recommend starting with working SAS code (DATA steps and procs) before trying to write a macro (which will generate the SAS code).  Do you have SAS code that works like you want?

The Boston Area SAS Users Group is hosting free webinars!
Next webinar will be in January 2025. Until then, check out our archives: https://www.basug.org/videos. And be sure to subscribe to our our email list.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 4 replies
  • 1045 views
  • 1 like
  • 5 in conversation