Hi,
The message in the log you have shared:
WARNING: Apparent invocation of macro SURVEYGENMOD not resolved.
implies the macro has not been defined. Just to rule out the obvious, did you copy the definition of the macro from page 16 onwards in the link you shared, and submit that macro definition in SAS first, before trying to invoke it?
Thanks & kind regards,
Amir.
Thanks so much for your help, Amir!
I'm new to these, so I didn't know I had to do that. So I copied the code starting on page 16 through the end of the documentation and ran that. On page 16 it has the macro code for the model first, so I tried to run that at the top of the code and then I tried to run it at the bottom of the long code, and then I tried to run it as two separate codes, with the long code first and then the model code second. If I run the long code on its own I don't get any errors (just the values are blank). If I run the model code before and after the long code I get dozens of errors, many new errors are in the code with my model, and there are also errors throughout the long macro code from the documentation.
I really appreciate your help!!!
All my best,
Liz
Hi,
No problem, happy to help if I can, although I doubt I will be able to go through all of the PDF you shared.
Ideally it is most useful to have a sample of data (in the form of a data step) plus the code you are using, so that we can easily replicate and attempt to diagnose the issue. I had trouble following the details of everything you tried running, so as an attempt to help share what we cannot see, I would suggest the following:
1) Start a new SAS session.
2) Submit the macro definition of surveygenmod from page 16 onwards (including %mend on the last page) in the PDF you shared. This should just tell SAS what surveygenmod should do if it is invoked, it doesn't actually invoke it at this stage.
3) Check all of the log. If there are no warnings or error messages then continue to the next step, otherwise please share the warnings and error messages using the Insert Code icon "</>" when posting, and then see if anyone is able to assist.
4) If the log had no issues then submit the following for diagnostics for the upcoming step:
options mprint symbolgen mlogic;
5) If the log had no issues then attempt to invoke (submit) %surveygenmod with the values you wanted to use with it.
6) Check all of the log again. If there are no warnings or error messages then continue to the next step, otherwise please share the warnings and error messages using the Insert Code icon "</>" when posting, and then see if anyone is able to assist.
7) Check your results and advise accordingly. If they are not what you expect then I would expect we will require sample data in the form of a data step.
Thanks & kind regards,
Amir.
Thanks so much for all of your help!!
I was able to get the macro to run (that was my issue not running the first part of the code on page 16). However, I got errors when I entered my own information into the macro code. I decided to go with a different approach instead of trying to use a zip model. Thanks again for your help!
Cheers,
Liz
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
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.
Ready to level-up your skills? Choose your own adventure.