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

Error below

 

22: LINE and COLUMN cannot be determined.
NOTE 242-205: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN where the error has occurred.
ERROR 22-322: Syntax error, expecting one of the following: a name, ;, (, -, /, :.
200: LINE and COLUMN cannot be determined.
NOTE: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN where the error has occurred.
ERROR 200-322: The symbol is not recognized and will be ignored.
NOTE: Enter RUN; to continue or QUIT; to end the procedure.
NOTE: Statements not processed because of errors noted above.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE DATASETS used (Total process time):
real time 0.01 seconds
cpu time 0.02 seconds

 

 

full log below

 

The SAS System

1 ;*';*";*/;quit;run;
2 OPTIONS PAGENO=MIN;
3 %LET _CLIENTTASKLABEL='Program';
4 %LET _CLIENTPROCESSFLOWNAME='Process Flow';
5 %LET _CLIENTPROJECTPATH='';
6 %LET _CLIENTPROJECTPATHHOST='';
7 %LET _CLIENTPROJECTNAME='';
8 %LET _SASPROGRAMFILE='';
9 %LET _SASPROGRAMFILEHOST='';
10
11 ODS _ALL_ CLOSE;
12 OPTIONS DEV=PNG;
13 GOPTIONS XPIXELS=0 YPIXELS=0;
14 FILENAME EGHTML TEMP;
15 ODS HTML(ID=EGHTML) FILE=EGHTML
16 ENCODING='utf-8'
17 STYLE=HTMLBlue
18 STYLESHEET=(URL="file:///C:/Program%20Files/SASHOME/SASEnterpriseGuide/7.1/Styles/HTMLBlue.css")
19 NOGTITLE
20 NOGFOOTNOTE
21 GPATH=&sasworklocation
22 ;
NOTE: Writing HTML(EGHTML) Body file: EGHTML
23
24 GOPTIONS ACCESSIBLE;
25
26
27
28
29
382 /* macro to automate the month(s) data you want to pull */
383 %let m_end=-1;
384 %let m_beg=-1;
385
386


387 data _null_;
388 call symput("mon_beg",put(intnx('month', today(), &m_beg., 'end'), yymmn6.));
389 call symput("mon_end",put(intnx('month', today(), &m_end., 'end'), yymmn6.));
390 run;

NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

391 %put &mon_beg;
202204
392 %put &mon_end;
202204
393
394 %let drop_var =DTBIRTH ECNPRIMARY ECNSECOND RAN_NR RWRDGRPCD ssn ssn2 BRC5020 MTHFIRSTACT;
395
396 %let BUR_TAPS4=taps4wltshr taps4pyrt taps4hispnd1 taps4bnkspd taps4offspnd taps4spnd taps4rtlspnd taps4hilmt1 taps4avgbal ;
397 %let segvars2=yyyymm ACCT_TYPE PORTFOLIOSEG /* PRODORIG */ ASSOCCD Status SEG_MOB SEG_FICO Product_group ;
398 %let add_var=ACQCHANNEL ECNPRIMARY TAPS_CNT LOB ROYALTY PSB RARSHARE RAR Taps_value MCUNSECIND ;
399
400
401
402 %let ym=202201;
403
404 %let ym_p=202112;
405
406
407 %macro misscnt(var);
408 if &var. = . then &var._cnt=0; else &var._cnt=1;
409 %mend;
410
411
412 %let tpcnt=100; %let cpcnt=2;
413 %let var_n=13; /* number of matching variables */
414
415
416 %macro PSMatching(datatreatment=, datacontrol=, method=, numberofcontrols=, caliper=, numberofvar=,replacement=);
417 /* Create copies of the treated units if N > 1 */;
418 data _Treatment0(drop= i);
419 set Treatment;
420 do i= 1 to &numberofcontrols;
421 RandomNumber= ranuni(12345);
422 output;
423 end;
424 run;
425
426 /* Randomly sort both datasets */
427 proc sort data= _Treatment0 out= _Treatment(drop= RandomNumber);
428 by RandomNumber;
429 run;
430 data _Control0;
431 set Control;
432 RandomNumber= ranuni(45678);
433 run;
434 proc sort data= _Control0 out= _Control(drop= RandomNumber);
435 by RandomNumber;
436 run;
437 data Matched(keep = IdSelectedControl MatchedToTreatID BestDistance);
438 length %do i=1 %to &numberofvar; pscoreC&i 8 %end; ;
439 length idC 8;
440 /* Load Control dataset into the hash object */
441 if _N_= 1 then do;
442 declare hash h(dataset: "_Control", ordered: 'no');
443 declare hiter iter('h');
444 h.defineKey('idC');
445 %do i=1 %to &numberofvar;
446 h.defineData("pscoreC&i", 'idC');
447 %end;
448 h.defineDone();
449 %do i=1 %to &numberofvar;
450 call missing(idC, pscoreC&i);
451 %end;
452 end;
453 /* Open the treatment */
454 set _Treatment;
455 %if %upcase(&method) ~= RADIUS %then %do;
456 retain BestDistance 1;
457 %end;
458 /* Iterate over the hash */
459 rc= iter.first();
460 if (rc=0) then BestDistance= 99;
461 do while (rc = 0);
462 /* NN */
463 %if %upcase(&method) = NN %then %do;
464 %do i=1 %to &numberofvar;
465 ScoreDistance&i = (pscoreT&i - pscoreC&i)**2;
466 %end;
467 ScoreDistance=mean(of ScoreDistance1-ScoreDistance&numberofvar);
468 ScoreDistance=ScoreDistance**0.5;
469 if ScoreDistance < BestDistance and 0<=ScoreDistance<=0.3 then do;
470 BestDistance = ScoreDistance;
471 IdSelectedControl = idC;
472 MatchedToTreatID = idT;
473 end;
474 %end;
475
476 %if %upcase(&method) = NN or %upcase(&method) = CALIPER %then %do;
477 rc = iter.next();
478 /* Output the best control and remove it */
479 if (rc ~= 0) and BestDistance ~=99 then do;
480 output;
481 %if %upcase(&replacement) = NO %then %do;
482 rc1 = h.remove(key: IdSelectedControl);
483 %end;
484 end;
485 %end;
486 end;
487 run;
488 /* Delete temporary tables. Quote for debugging */
489 proc datasets;
490 delete _Frowngennum=all);
491 run;
492 %mend PSMatching;
493
494 %macro match(k);
495 %let Ncntrls = 1 ;
496 %let Nvars = &var_n.;
497 data Control (keep = ACCT_REF_NB &var) Treatment (keep = ACCT_REF_NB &var);
498 set prime_&ym._match_ed&k ;
499 if test=0 then output Control ;
500 else output Treatment ;
501 run;
502 data Control;
503 set Control ;
504 idC = ACCT_REF_NB ;
505 array score{*} &var;
506 %do i=1 %to &Nvars;
507 pscoreC&i = score(&i) ;
508 %end;
509 drop &var;
510 run;
511 data Treatment ;
512 set Treatment ;
513 idT = ACCT_REF_NB ;
514 array score{*} &var;
515 %do i=1 %to &Nvars;
516 pscoreT&i = score(&i) ;
517 %end;
518 drop &var;
519 run;
520 %PSMatching(datatreatment= Treatment, datacontrol= Cntrl, method= NN , numberofcontrols= &Ncntrls. , caliper= 0.0001, numberofvar=&Nvars.,
521 replacement= no );
522 data s_out&k;
523 set temp;
524 %if &k<&end %then %do;
525 if rnd2<&k/&end and rnd2>=(&k-1)/&end;
526 %end;
527 %else %do;
528 if rnd2>=(&k-1)/&end;
529 %end;
530 run;
531 proc sort data=s_out&k nodupkey; by acct_ref_nb; run;
532 proc sort data=Matched nodupkey out=control; by IdSelectedControl; run;
533 proc sort data=Matched nodupkey out=test; by MatchedToTreatID; run;
534 data s_out&k;
535 merge s_out&k(in=x)
536 test(in=y rename=(MatchedToTreatID=acct_ref_nb IdSelectedControl=arn_pair))
537 control(in=z rename=(IdSelectedControl=acct_ref_nb MatchedToTreatID=arn_pair));
538 by acct_ref_nb;
539 if y or z or test=1 ; ;
540 if index(match_grp,"Match")>0 and test=1 and not y then match_grp='No Match';
541 run;
542 proc freq; tables match_grp*test / missing; run;
543 proc sort data=s_out&k nodupkey; by acct_ref_nb; run;
544 %mend;
545
546
547
548
549 %macro main(ym,start,end, product);
550 data temp;
551 set datas.base_&ym. ;
552 if index(match_grp,"Match")>0 and segment="&product." ; /* Selecting eligible pop/ segment */
553
554 if (test=1 and rnd<=&tpcnt/100) or (test=0 and rnd<=&cpcnt/100); /* Selecting "test" and percentage of "control" */
555 rnd2=ranuni(&ym);
556 array miss{*} &var.;
557 do i=1 to dim(miss);
558 if miss(i)=. then miss(i)=0;
559 end;
560 drop i;
561 run;
562
563 proc means data=temp n nmiss min mean max;
564 class test;
565 var rnd2;
566 run;
567 proc freq; tables match_grp*test / missing; run;
568 proc freq; tables match_grp*test / missing; where test=1; run;
569
570
571 proc standard data=temp(where=(index(match_grp,"Match")>0)) MEAN=0 STD=1 out=s_out;
572 var &var;
573 run;
574 %let j=&start;
575 %do %while (&j<=&end);
576 data prime_&ym._match_ed&j(keep=acct_ref_nb test &var);
577 set s_out;
578 %if &j=&end %then %do;
579 if rnd2>=(&j-1)/&end;
580 %end;
581 %else %do;
582 if rnd2>=(&j-1)/&end and rnd2<&j/&end;
583 %end;
584 run;
585 %match(&j)
586 data datas.prime_&ym._match;
587 set s_out&j %if &j>&start %then %do; datas.prime_&ym._match %end; ;
588 run;
589
590 %let j=%eval(&j+1);
591 %end;
592
593 proc means data=datas.prime_&ym._match(where=(match_grp="&ym Match")) n nmiss min max MEDIAN mean VAR sum;
594 class test;
595 var &var. BestDistance;
596 output out=work.means ;
597 run;
598
599
600 data work.means2 ;
601 set work.means;
602 where _type_=1 and _stat_="MEAN";
603 run;
604
605 proc transpose data = work.means2 out= work.means3;
606 run;
607
608 data work.means3;
609 set work.means3;
610 rename col1=MP_Control;
611 rename col2=Test;
612 run;
613
614 data work.means4;
615 set work.means3 ;
616 format MP_Control Test var 8.1 var_per percent8.2;
617 var=MP_Control - Test;
618 var_per=var/Test;
619 run;
620
621 proc print data=work.means4; run;
622
623 data test;
624 set datas.prime_&ym._match;
625 if test=1 and match_grp="&ym Match";
626 keep arn_pair ;
627 run;
628 proc sort data=test nodupkey; by arn_pair; run;
629 proc sort data=datas.prime_&ym._match nodupkey; by acct_ref_nb; run;
630 data datas.prime_&ym._match;
631 merge
632 datas.prime_&ym._match(in=in1)
633 test(in=in2 rename=(arn_pair=acct_ref_nb));
634 by acct_ref_nb;
635 if in1;
636 run;
637 proc freq data=datas.prime_&ym._match;
638 tables match_grp*test / missing list;
639 run;
640 proc freq data=datas.prime_&ym._match;
641 tables match_grp*test / missing list;
642 where test=1;
643 run;
644
645
646 data datas.prime_&ym._match_&product.;
647 set datas.prime_&ym._match;
648 run;
649
650
651 %mend;
652
653 %main(&ym.,1,1,Points );

NOTE: There were 12224754 observations read from the data set DATAS.BASE_202201.
NOTE: The data set WORK.TEMP has 91320 observations and 37 variables.
NOTE: Compressing data set WORK.TEMP decreased size by 34.50 percent.
Compressed is 169 pages; un-compressed would require 258 pages.
NOTE: DATA statement used (Total process time):
real time 16.43 seconds
cpu time 8.63 seconds


NOTE: There were 91320 observations read from the data set WORK.TEMP.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.05 seconds
cpu time 0.06 seconds

NOTE: There were 91320 observations read from the data set WORK.TEMP.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.05 seconds
cpu time 0.06 seconds

NOTE: There were 3534 observations read from the data set WORK.TEMP.
WHERE test=1;
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.05 seconds
cpu time 0.05 seconds


NOTE: The data set WORK.S_OUT has 91320 observations and 37 variables.
NOTE: Compressing data set WORK.S_OUT decreased size by 23.26 percent.
Compressed is 198 pages; un-compressed would require 258 pages.
NOTE: PROCEDURE STANDARD used (Total process time):
real time 0.28 seconds
cpu time 0.27 seconds


NOTE: There were 91320 observations read from the data set WORK.S_OUT.
NOTE: The data set WORK.PRIME_202201_MATCH_ED1 has 91320 observations and 15 variables.
NOTE: Compressing data set WORK.PRIME_202201_MATCH_ED1 increased size by 11.90 percent.
Compressed is 94 pages; un-compressed would require 84 pages.
NOTE: DATA statement used (Total process time):
real time 0.09 seconds
cpu time 0.10 seconds


NOTE: There were 91320 observations read from the data set WORK.PRIME_202201_MATCH_ED1.
NOTE: The data set WORK.CONTROL has 87786 observations and 14 variables.
NOTE: Compressing data set WORK.CONTROL increased size by 15.79 percent.
Compressed is 88 pages; un-compressed would require 76 pages.
NOTE: The data set WORK.TREATMENT has 3534 observations and 14 variables.
NOTE: Compressing data set WORK.TREATMENT increased size by 25.00 percent.
Compressed is 5 pages; un-compressed would require 4 pages.
NOTE: DATA statement used (Total process time):
real time 0.05 seconds
cpu time 0.05 seconds


NOTE: There were 87786 observations read from the data set WORK.CONTROL.
NOTE: The data set WORK.CONTROL has 87786 observations and 15 variables.
NOTE: Compressing data set WORK.CONTROL increased size by 17.28 percent.
Compressed is 95 pages; un-compressed would require 81 pages.
NOTE: DATA statement used (Total process time):
real time 0.07 seconds
cpu time 0.07 seconds


NOTE: There were 3534 observations read from the data set WORK.TREATMENT.
NOTE: The data set WORK.TREATMENT has 3534 observations and 15 variables.
NOTE: Compressing data set WORK.TREATMENT increased size by 25.00 percent.
Compressed is 5 pages; un-compressed would require 4 pages.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


NOTE: There were 3534 observations read from the data set WORK.TREATMENT.
NOTE: The data set WORK._TREATMENT0 has 3534 observations and 16 variables.
NOTE: Compressing data set WORK._TREATMENT0 increased size by 50.00 percent.
Compressed is 6 pages; un-compressed would require 4 pages.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


NOTE: There were 3534 observations read from the data set WORK._TREATMENT0.
NOTE: The data set WORK._TREATMENT has 3534 observations and 15 variables.
NOTE: Compressing data set WORK._TREATMENT increased size by 25.00 percent.
Compressed is 5 pages; un-compressed would require 4 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.00 seconds
cpu time 0.02 seconds


NOTE: There were 87786 observations read from the data set WORK.CONTROL.
NOTE: The data set WORK._CONTROL0 has 87786 observations and 16 variables.
NOTE: Compressing data set WORK._CONTROL0 increased size by 16.28 percent.
Compressed is 100 pages; un-compressed would require 86 pages.
NOTE: DATA statement used (Total process time):
real time 0.07 seconds
cpu time 0.06 seconds


NOTE: There were 87786 observations read from the data set WORK._CONTROL0.
NOTE: The data set WORK._CONTROL has 87786 observations and 15 variables.
NOTE: Compressing data set WORK._CONTROL increased size by 17.28 percent.
Compressed is 95 pages; un-compressed would require 81 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.09 seconds
cpu time 0.09 seconds


NOTE: Compression was disabled for data set WORK.MATCHED because compression overhead would increase the size of the data set.
NOTE: There were 87786 observations read from the data set WORK._CONTROL.
NOTE: There were 3534 observations read from the data set WORK._TREATMENT.
NOTE: The data set WORK.MATCHED has 3387 observations and 3 variables.
NOTE: DATA statement used (Total process time):
real time 1:46.83
cpu time 1:46.56

22: LINE and COLUMN cannot be determined.
NOTE 242-205: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN where the error has occurred.
ERROR 22-322: Syntax error, expecting one of the following: a name, ;, (, -, /, :.
200: LINE and COLUMN cannot be determined.
NOTE: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN where the error has occurred.
ERROR 200-322: The symbol is not recognized and will be ignored.
NOTE: Enter RUN; to continue or QUIT; to end the procedure.
NOTE: Statements not processed because of errors noted above.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE DATASETS used (Total process time):
real time 0.01 seconds
cpu time 0.02 seconds


NOTE: There were 91320 observations read from the data set WORK.TEMP.
NOTE: The data set WORK.S_OUT1 has 91320 observations and 37 variables.
NOTE: Compressing data set WORK.S_OUT1 decreased size by 34.50 percent.
Compressed is 169 pages; un-compressed would require 258 pages.
NOTE: DATA statement used (Total process time):
real time 0.15 seconds
cpu time 0.16 seconds


NOTE: There were 91320 observations read from the data set WORK.S_OUT1.
NOTE: 0 observations with duplicate key values were deleted.
NOTE: The data set WORK.S_OUT1 has 91320 observations and 37 variables.
NOTE: Compressing data set WORK.S_OUT1 decreased size by 34.50 percent.
Compressed is 169 pages; un-compressed would require 258 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.19 seconds
cpu time 0.18 seconds


NOTE: Compression was disabled for data set WORK.CONTROL because compression overhead would increase the size of the data set.
NOTE: There were 3387 observations read from the data set WORK.MATCHED.
NOTE: 0 observations with duplicate key values were deleted.
NOTE: The data set WORK.CONTROL has 3387 observations and 3 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds


NOTE: Compression was disabled for data set WORK.TEST because compression overhead would increase the size of the data set.
NOTE: There were 3387 observations read from the data set WORK.MATCHED.
NOTE: 0 observations with duplicate key values were deleted.
NOTE: The data set WORK.TEST has 3387 observations and 3 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds


NOTE: There were 91320 observations read from the data set WORK.S_OUT1.
NOTE: There were 3387 observations read from the data set WORK.TEST.
NOTE: There were 3387 observations read from the data set WORK.CONTROL.
NOTE: The data set WORK.S_OUT1 has 6921 observations and 39 variables.
NOTE: Compressing data set WORK.S_OUT1 decreased size by 28.57 percent.
Compressed is 15 pages; un-compressed would require 21 pages.
NOTE: DATA statement used (Total process time):
real time 0.07 seconds
cpu time 0.07 seconds

NOTE: There were 6921 observations read from the data set WORK.S_OUT1.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.00 seconds
cpu time 0.02 seconds


NOTE: There were 6921 observations read from the data set WORK.S_OUT1.
NOTE: 0 observations with duplicate key values were deleted.
NOTE: The data set WORK.S_OUT1 has 6921 observations and 39 variables.
NOTE: Compressing data set WORK.S_OUT1 decreased size by 28.57 percent.
Compressed is 15 pages; un-compressed would require 21 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds


NOTE: There were 6921 observations read from the data set WORK.S_OUT1.
NOTE: The data set DATAS.PRIME_202201_MATCH has 6921 observations and 39 variables.
NOTE: Compressing data set DATAS.PRIME_202201_MATCH decreased size by 28.57 percent.
Compressed is 15 pages; un-compressed would require 21 pages.
NOTE: DATA statement used (Total process time):
real time 0.15 seconds
cpu time 0.03 seconds


NOTE: There were 6774 observations read from the data set DATAS.PRIME_202201_MATCH.
WHERE match_grp='202201 Match';
NOTE: The data set WORK.MEANS has 15 observations and 18 variables.
NOTE: Compressing data set WORK.MEANS increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.07 seconds
cpu time 0.05 seconds


NOTE: There were 2 observations read from the data set WORK.MEANS.
WHERE (_type_=1) and (_stat_='MEAN');
NOTE: The data set WORK.MEANS2 has 2 observations and 18 variables.
NOTE: Compressing data set WORK.MEANS2 increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


NOTE: There were 2 observations read from the data set WORK.MEANS2.
NOTE: The data set WORK.MEANS3 has 17 observations and 3 variables.
NOTE: Compressing data set WORK.MEANS3 increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: PROCEDURE TRANSPOSE used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds

NOTE: There were 17 observations read from the data set WORK.MEANS3.
NOTE: The data set WORK.MEANS3 has 17 observations and 3 variables.
NOTE: Compressing data set WORK.MEANS3 increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


NOTE: There were 17 observations read from the data set WORK.MEANS3.
NOTE: The data set WORK.MEANS4 has 17 observations and 5 variables.
NOTE: Compressing data set WORK.MEANS4 increased size by 100.00 percent.
Compressed is 2 pages; un-compressed would require 1 pages.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


NOTE: There were 17 observations read from the data set WORK.MEANS4.
NOTE: At least one W.D format was too small for the number to be printed. The decimal may be shifted by the "BEST" format.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds


NOTE: Compression was disabled for data set WORK.TEST because compression overhead would increase the size of the data set.
NOTE: There were 6921 observations read from the data set DATAS.PRIME_202201_MATCH.
NOTE: The data set WORK.TEST has 3387 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.05 seconds
cpu time 0.00 seconds


NOTE: There were 3387 observations read from the data set WORK.TEST.
NOTE: 0 observations with duplicate key values were deleted.
NOTE: The data set WORK.TEST has 3387 observations and 1 variables.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


NOTE: There were 6921 observations read from the data set DATAS.PRIME_202201_MATCH.
NOTE: 0 observations with duplicate key values were deleted.
NOTE: The data set DATAS.PRIME_202201_MATCH has 6921 observations and 39 variables.
NOTE: Compressing data set DATAS.PRIME_202201_MATCH decreased size by 28.57 percent.
Compressed is 15 pages; un-compressed would require 21 pages.
NOTE: PROCEDURE SORT used (Total process time):
real time 0.18 seconds
cpu time 0.04 seconds


NOTE: There were 6921 observations read from the data set DATAS.PRIME_202201_MATCH.
NOTE: There were 3387 observations read from the data set WORK.TEST.
NOTE: The data set DATAS.PRIME_202201_MATCH has 6921 observations and 39 variables.
NOTE: Compressing data set DATAS.PRIME_202201_MATCH decreased size by 28.57 percent.
Compressed is 15 pages; un-compressed would require 21 pages.
NOTE: DATA statement used (Total process time):
real time 0.24 seconds
cpu time 0.02 seconds


NOTE: There were 6921 observations read from the data set DATAS.PRIME_202201_MATCH.
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.03 seconds
cpu time 0.02 seconds


NOTE: There were 3534 observations read from the data set DATAS.PRIME_202201_MATCH.
WHERE test=1;
NOTE: PROCEDURE FREQ used (Total process time):
real time 0.02 seconds
cpu time 0.01 seconds


NOTE: There were 6921 observations read from the data set DATAS.PRIME_202201_MATCH.
NOTE: The data set DATAS.PRIME_202201_MATCH_POINTS has 6921 observations and 39 variables.
NOTE: Compressing data set DATAS.PRIME_202201_MATCH_POINTS decreased size by 28.57 percent.
Compressed is 15 pages; un-compressed would require 21 pages.
NOTE: DATA statement used (Total process time):
real time 0.17 seconds
cpu time 0.03 seconds

654
655
656 GOPTIONS NOACCESSIBLE;
657 %LET _CLIENTTASKLABEL=;
658 %LET _CLIENTPROCESSFLOWNAME=;
659 %LET _CLIENTPROJECTPATH=;
660 %LET _CLIENTPROJECTPATHHOST=;
661 %LET _CLIENTPROJECTNAME=;
662 %LET _SASPROGRAMFILE=;
663 %LET _SASPROGRAMFILEHOST=;
664
665 ;*';*";*/;quit;run;
666 ODS _ALL_ CLOSE;
667
668
669 QUIT; RUN;
670

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Your actual error is the

ERROR 22-322: Syntax error, expecting one of the following: a name, ;, (, -, /, :.

 

Because that means something is wrong and likely the cause of the Line and Column.

 

Suggestion:

Set Options MPRINT before executing the macro code. Then the Error messages will appear in better proximity to the syntax error and can start looking for the missing item.

 

Note that the Options MPRINT SYMBOLGEN and MLOGIC are the first tools for debugging macro syntax issues.

 

Generic suggestions: Post code and log in text boxes opened on the forum using the </> icon above the message window. This will prevent the forum from reformatting text which makes some things extremely hard to read and woull keep the diagnostic characters, such as typically appear with a 22-322 error, appear in relationship to the text.

 

This small macro:

407 %macro misscnt(var);
408 if &var. = . then &var._cnt=0; else &var._cnt=1;
409 %mend;

would be better off using

if missing(&var.) then &var._cnt=0;

You may think all of your variables are numeric but you may be surprised and spend time running down the errors associated when &var. is character. The missing function doesn't care about the variable type and will yield the correct comparison.

 

You have a number of macro variables that are not used in any of the code shown except for the %LET. Since they have no bearing on the problem (hopefully) including them just makes finding actual problems harder.

 

If this bit of code is setting lengths for numeric variables it is unnecessary as 8 is the default for numeric variables.

438 length %do i=1 %to &numberofvar; pscoreC&i 8 %end; ;
439 length idC 8;

Note the text box also makes a useful tool to separate code under discussion from actual question / answers about the code.

 

Suggest that you look closely at this for syntax. I suspect a parentheses problem if not also a missing / and I am not familiar with _frowngenum as an option for Delete. Gennum yes.

489 proc datasets;
490 delete _Frowngennum=all);
491 run;

View solution in original post

3 REPLIES 3
ballardw
Super User

Your actual error is the

ERROR 22-322: Syntax error, expecting one of the following: a name, ;, (, -, /, :.

 

Because that means something is wrong and likely the cause of the Line and Column.

 

Suggestion:

Set Options MPRINT before executing the macro code. Then the Error messages will appear in better proximity to the syntax error and can start looking for the missing item.

 

Note that the Options MPRINT SYMBOLGEN and MLOGIC are the first tools for debugging macro syntax issues.

 

Generic suggestions: Post code and log in text boxes opened on the forum using the </> icon above the message window. This will prevent the forum from reformatting text which makes some things extremely hard to read and woull keep the diagnostic characters, such as typically appear with a 22-322 error, appear in relationship to the text.

 

This small macro:

407 %macro misscnt(var);
408 if &var. = . then &var._cnt=0; else &var._cnt=1;
409 %mend;

would be better off using

if missing(&var.) then &var._cnt=0;

You may think all of your variables are numeric but you may be surprised and spend time running down the errors associated when &var. is character. The missing function doesn't care about the variable type and will yield the correct comparison.

 

You have a number of macro variables that are not used in any of the code shown except for the %LET. Since they have no bearing on the problem (hopefully) including them just makes finding actual problems harder.

 

If this bit of code is setting lengths for numeric variables it is unnecessary as 8 is the default for numeric variables.

438 length %do i=1 %to &numberofvar; pscoreC&i 8 %end; ;
439 length idC 8;

Note the text box also makes a useful tool to separate code under discussion from actual question / answers about the code.

 

Suggest that you look closely at this for syntax. I suspect a parentheses problem if not also a missing / and I am not familiar with _frowngenum as an option for Delete. Gennum yes.

489 proc datasets;
490 delete _Frowngennum=all);
491 run;
superking
Calcite | Level 5

Mprint works perfectly,

the problem was these line of codes, and it was due to formatting 😞 became frown

 

 

489 proc datasets;
490 delete _Frowngennum=all);
491 run;

 

DrAbhijeetSafai
Lapis Lazuli | Level 10

Somehow a similar problem just got solved for me. An ending bracket ")" was given extra in one of the calls to a macro and after removing that the problem got solved for me. 

 

Thanking you,

Yours sincerely,

 

- Dr. Abhijeet Safai

Dr. Abhijeet Safai
Certified Base and Clinical SAS Programmer
Associate Data Analyst
Actu-Real

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 3 replies
  • 8526 views
  • 0 likes
  • 3 in conversation