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

I am new to SAS so perhaps it is a simple error.  I am using code and data that someone else wrote and worked on their system.  Data is being read in, but I get the error "Invalid object specified to bridge protocol engine."  It seems I may need to do a "hot fix"  but none of the fixes seemed to address this issue.  I am running Studio 3.81.  Thanks

Here is the code, and I have attached five of the sixteen input files (maximum allowed).

options ls=132; * nocenter; * nodate nonumber 80 ps=9999;
/*OITP Summary 110320_AN-INS1BLACK*/
%macro transit(CallN,Man,Ins,Col);
data d&CallN;  infile "c:\SAS_Data\OITP Summary 012621_&Man-&Ins&Col..csv" dlm=',' dsd truncover;
  MANUF="&Man";  length Layer1 Layer2 $ 5;  Layer1="&Ins";  Layer2="&Col";  if Layer2=' ' then Layer2='none';
* input (NO TYPE LAB COLOUR TEMP DRATE) ($) TIME_d (LAB_A MODEL CALIB RAMP TEMP_T FLOW_O FLOW_N) ($) WT1-WT5 OITP1-OITP5;
  input (NO TYPE LAB COLOUR TEMP DRATE) ($) TIME_d (LAB_A MODEL CALIB RAMP FLOW_O) ($) WT1-WT5 OITP1-OITP5;  chk=substr(NO,1,1);
  if 'A'<=chk<='R' then do;  chk2=substr(NO,6,1);  chk3=substr(NO,7,1);
    if '1'<=chk2<='5' then Chamber=chk2;  else if '1'<=chk3<='5' then Chamber=chk3;  end;
  else if '1'<=chk<='6' then Chamber=chk;  else delete;  if WT1=. then delete;
  keep MANUF Layer1 Layer2 TIME_d WT1-WT5 OITP1-OITP5 Chamber;
proc print uniform;  var MANUF Layer1 Layer2 Chamber TIME_d WT1-WT5 OITP1-OITP5;  title "&CallN Raw &Man-&Ins&Col Data";
data d&CallN;  set d&CallN;
  if TIME_d=0 then do Chamber='1','2','3','4','5';  output;  end;  else output;
data d&CallN;  set d&CallN;  keep MANUF Layer1 Layer2 TIME_d WT OITP Chamber rep;
  rep=1;  Wt=WT1;  OITP=OITP1;  output;
  rep=2;  Wt=WT2;  OITP=OITP2;  output;
  rep=3;  Wt=WT3;  OITP=OITP3;  output;
  rep=4;  Wt=WT4;  OITP=OITP4;  output;
  rep=5;  Wt=WT5;  OITP=OITP5;  output;
data d&CallN;  set d&CallN;  if wt>.;
proc print uniform;  var MANUF Layer1 Layer2 Chamber TIME_d rep WT OITP;  title "&CallN Transposed &Man-&Ins&Col Data";
%mend transit;

%transit(1,RB,J,);
%transit(2,RB,INS1,);
%transit(3,RB,INS2,);
%transit(4,RB,INS3,);
%transit(5,AN,J,);
%transit(6,AN,INS1,BLACK);
%transit(7,AN,INS1,PINK);
%transit(8,AN,INS2,BLACK);
%transit(9,AN,INS2,PINK);
%transit(10,BW,J,);
%transit(11,BW,INS1,);
%transit(12,BW,INS2,);
%transit(13,OK,INS1,);
%transit(14,OK,INS2,);
%transit(15,OK,INS3,);
%transit(16,OK,J,);
data all;  set d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16;  CHAM=0;  CHAM=Chamber;
  temp=(CHAM=1)*55 + (CHAM>1)*81;
  wet =(CHAM=2)    + (CHAM=4);
  GrHr =(CHAM>3)*20 + (CHAM<4)*69;  time_m=TIME_d/30;  Exp=time_m/2;  drop TIME_d Exp;
* time=Exp*2;  dose=round((GrHr=20)*Exp*23.2/8 + (GrHr=69)*Exp*80/8,.1);
proc corr;  title 'Basic Relationships for OITP and Read or Generated Variables';
proc univariate normal plot;  var OITP;  ID Wt;
proc glm;  class MANUF Layer1 Layer2 CHAM rep;
  model OITP = MANUF Layer1 Layer2 CHAM rep TEMP WET GRHR TIME_m DOSE wt;  title2 'Step 0. OITP Full Model';
proc glm;  class MANUF Layer1 Layer2 CHAM    ;
  model OITP = MANUF Layer1 Layer2 CHAM     TEMP WET GRHR TIME_m DOSE wt;  title2 'Step 1. OITP: Drop REP';
proc glm;  class MANUF Layer1 Layer2 CHAM    ;
  model OITP = MANUF Layer1 Layer2 CHAM     TEMP WET GRHR TIME_m DOSE   ;  title2 'Step 2. OITP: Drop REP, WT';
proc glm;  class MANUF Layer1 Layer2         ;
  model OITP = MANUF Layer1 Layer2          TEMP WET GRHR TIME_m DOSE   ;  title2 'Step 3. OITP: Drop REP, WT, CHAM';
proc glm;  class MANUF Layer1 Layer2         ;
  model OITP = MANUF Layer1 Layer2               WET GRHR TIME_m DOSE   ;  title2 'Step 4. OITP: Drop REP, WT, CHAM, TEMP';
proc glm;  class MANUF Layer1 Layer2         ;
  model OITP = MANUF Layer1 Layer2               WET      TIME_m DOSE   /noint solution;  title2 'Step 5. OITP: Drop REP, WT, CHAM, TEMP, GRHR';

endsas;*======================================================================================================;

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
AronN
Calcite | Level 5

I found a recommendation on the internet to remove "endsas" at the end of the code.  It works!

View solution in original post

1 REPLY 1
AronN
Calcite | Level 5

I found a recommendation on the internet to remove "endsas" at the end of the code.  It works!

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 1 reply
  • 1312 views
  • 0 likes
  • 1 in conversation