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?

BASUG is hosting free webinars Next up: Don Henderson presenting on using hash functions (not hash tables!) to segment data on June 12. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 784 views
  • 1 like
  • 5 in conversation