BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Saifulinfs
Fluorite | Level 6

Saifulinfs_0-1669834267411.png

When I run the macro after compilation it shows this error messages. Anybody with experience of using, could yo help me figure out this. This is the link of the Professor Frank Harrel's psplinet macro: https://biostat.app.vumc.org/wiki/pub/Main/SasMacros/survrisk.txt

1 ACCEPTED SOLUTION

Accepted Solutions
Quentin
Super User

There are multiple macro definitions in that file.  I would compile all of them.  Probably the easiest thing to do would be to paste all the code from that file into your program editor and submit it.

 

Unfortunately it looks like toward the end of the file there are some data _null_ steps that are not part of a macro definition that use the window statement.  You may want to delete this section that starts with:

 /****************************************************************/
 /*                                                              */
 /*    NAME: SAMSIZA.SAS                                         */
 /*   TITLE: POWER/SAMPLE SIZE CALCULATION FOR ONE WAY ANOVA     */
 /*  AUTHOR: F. Harrell                                          */
 /*    DATE: 22 July 1987                                        */
 /*    NOTE: This program cannot be run in batch mode.           */
 /*          The program requires the SECSOLVE macro.            */
 /*                                                              */
 /****************************************************************/

But most of this file is macro definitions.

 

The problem is you didn't compile some of the helper macros.

 

View solution in original post

4 REPLIES 4
Quentin
Super User

Did you run all the code in the file?

 

The first error message shown is a call to %DSHIDE which does not resolve, suggesting the macro was not compiled. But looking in the .txt file, the definition is there.  So I would start by making sure you run all the code in the .txt file as there are multiple macros definitions in the file.  Then try again with a macro call.

 

 

Saifulinfs
Fluorite | Level 6
Yes, i did compile all that is available starting from %macro psplinet (...).... until the end %mend. and then I ran my macro.

Do you mean to compile all that is available even before the %macro pslinet?
Quentin
Super User

There are multiple macro definitions in that file.  I would compile all of them.  Probably the easiest thing to do would be to paste all the code from that file into your program editor and submit it.

 

Unfortunately it looks like toward the end of the file there are some data _null_ steps that are not part of a macro definition that use the window statement.  You may want to delete this section that starts with:

 /****************************************************************/
 /*                                                              */
 /*    NAME: SAMSIZA.SAS                                         */
 /*   TITLE: POWER/SAMPLE SIZE CALCULATION FOR ONE WAY ANOVA     */
 /*  AUTHOR: F. Harrell                                          */
 /*    DATE: 22 July 1987                                        */
 /*    NOTE: This program cannot be run in batch mode.           */
 /*          The program requires the SECSOLVE macro.            */
 /*                                                              */
 /****************************************************************/

But most of this file is macro definitions.

 

The problem is you didn't compile some of the helper macros.

 

Saifulinfs
Fluorite | Level 6

thank you, it worked. I copied everything on the page and pasted and compiled directly in program editor.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 4 replies
  • 1532 views
  • 1 like
  • 2 in conversation