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.

 

The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.

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.

 

 

The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.
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.

 

The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.
Saifulinfs
Fluorite | Level 6

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

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 941 views
  • 1 like
  • 2 in conversation