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.

 

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.

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.

 

 

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.
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.

 

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.
Saifulinfs
Fluorite | Level 6

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

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