Programming the statistical procedures from SAS

Proc Traj Troubleshooting

Reply
Occasional Contributor
Posts: 6

Proc Traj Troubleshooting

I have installed and uninstalled proc traj and seem to have so many errors that I cannot even begin to troubleshoot. I am wondering if anyone is familiar with proc traj troubleshooting of any sort. 

 

Below I have posted my code and the log from when that code is run. 

 

data macrowork1;
set fillin;


proc traj data=macrowork1 OUT=OF OUTPLOT=OP OUTSTAT=OS OUTEST=OE ITDETAIL;
ID study_id;
VAR newweight1 - newweight12; INDEP newnumber1 - newnumber12;
MODEL CNORM; MIN -99.00000000; MAX 99.00000000; ngroups 4; order 1 1 1 1;
run;

%trajplot (OP, OS, 'gestational age vs. gestational weight', 'cnorm model', 'weight', 'week of pregnancy');
run;

 

ERRORS:

 

proc traj data=macrowork1 OUT=OF OUTPLOT=OP OUTSTAT=OS OUTEST=OE ITDETAIL;
----
22
76
NOTE: An external program, not a SAS procedure, is being executed.

ERROR 22-322: Syntax error, expecting one of the following: ;, AUDIT, CC, CLEANUP.
ERROR 76-322: Syntax error, statement will be ignored.
1182 ID study_id;
1183 VAR newweight1 - newweight12; INDEP newnumber1 - newnumber12;
1184 MODEL CNORM; MIN -99.00000000; MAX 99.00000000; ngroups 4; order 1 1 1 1;
1185 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE TRAJ used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

1186
1187 %trajplot (OP, OS, 'gestational age vs. gestational weight', 'cnorm model', 'weight', 'week
1187! of pregnancy');


ERROR: File WORK.OP.DATA does not exist.

NOTE: Statements not processed because of errors noted above.
NOTE: The data set WORK.CPREDTMP has 0 observations and 0 variables.
NOTE: PROCEDURE CONTENTS used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds

NOTE: The SAS System stopped processing this step because of errors.

NOTE: Numeric values have been converted to character values at the places given by:
(Line)Smiley SadColumn).
1818:139
NOTE: Variable name is uninitialized.
NOTE: There were 0 observations read from the data set WORK.CPREDTMP.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

 

NOTE: Deleting WORK.CPREDTMP (memtype=DATA).

NOTE: PROCEDURE DATASETS used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


ERROR: File WORK.OS.DATA does not exist.

NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

 

WARNING: The value for the ACROSS option must be greater than 0. The specified value will be
ignored.
ERROR: File WORK.OP.DATA does not exist.
NOTE 137-205: Line generated by the invoked macro "TRAJPLOT".
5 legend1 label=('Group Percents') value=(%unquote(&GpPcts)) across=&Cnt; proc
5 ! gplot data=&PlotFile; title1 &Title1; title2 &Title2; format t 12.2 avg1 12.2;
5 ! plot &aline &pline / overlay legend=legend1; label t=&Xlab;
-
22
ERROR 22-322: Syntax error, expecting one of the following: a name, (.

NOTE: Line generated by the invoked macro "TRAJPLOT".
5 legend1 label=('Group Percents') value=(%unquote(&GpPcts)) across=&Cnt; proc
5 ! gplot data=&PlotFile; title1 &Title1; title2 &Title2; format t 12.2 avg1 12.2;
5 ! plot &aline &pline / overlay legend=legend1; label t=&Xlab;
-
76
ERROR 76-322: Syntax error, statement will be ignored.

NOTE: The previous statement has been deleted.

WARNING: RUN statement ignored due to previous errors. Submit QUIT; to terminate the procedure.

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE GPLOT used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds

 run;

 

Super User
Posts: 23,778

Re: Proc Traj Troubleshooting

Posted in reply to arianajhnsn

I believe they provide some test code to see if it's working, do any of their main examples work?

 

https://www.andrew.cmu.edu/user/bjones/sas/strtxmpl2.sas

Occasional Contributor
Posts: 6

Re: Proc Traj Troubleshooting

Hi, Thanks for your reply. It must be an installing issue on my end, because SAS recognizes that I am running proc traj, but even on the testing code I get the exact same errors as in my code. 

 

 

Super User
Posts: 13,583

Re: Proc Traj Troubleshooting

Posted in reply to arianajhnsn

It will help to post the code that generates the first errors into a code box using the forum's {I} menu icon like this:

proc traj data=macrowork1 OUT=OF OUTPLOT=OP OUTSTAT=OS OUTEST=OE ITDETAIL;
----
22
76
NOTE: An external program, not a SAS procedure, is being executed.

ERROR 22-322: Syntax error, expecting one of the following: ;, AUDIT, CC, CLEANUP.
ERROR 76-322: Syntax error, statement will be ignored.
1182 ID study_id;

The reason: the code box will maintain formatting of the error message the position of the underline will show where one of the listed expected items should occur.

 

 

There is a long shot that if you copied the basic Proc Traj statement from an internet or word processor source that there is a "hidden" character that the compiler is picking up. If manually retyping the Proc statement removes the first error that could be what happened.

It appears that the other errors are all occurring because the first statement failed.

Ask a Question
Discussion stats
  • 3 replies
  • 144 views
  • 0 likes
  • 3 in conversation