Hi, Thanks a lot in advance! I am running a proc netflow process to find the shortest path. I have a problem when I try to keep macro variable _ORNETFL after running proc netflow process. _ORNETFL is generated by proc netflow process automatically. The code I wrote is: %macro model(aa=,bb=);
data temp;
set _null_;
run;
data spath;
set _null_;
run;
proc netflow
shortpath
sourcenode=&aa
sinknode=&bb
ARCDATA=aircost
arcout=spath;
tail origin;
head dest;
run;
%put &_ORNETFL;
data a; set _null_;run;
data a; set a;
value1=&_ORNETFL;
run;
%mend; I call the macro as: %model(aa=BAAHE, bb=DDFG) The log file shows that: NOTE: Number of nodes= 777 . NOTE: Number of arcs= 5681 . NOTE: Number of iterations performed (neglecting any constraints)= 837 . NOTE: Of these, 836 were degenerate. WARNING: Flow conservation cannot be achieved at the following nodes. NOTE: The amounts after each node are the sum of flows through arcs directed toward that node, plus that nodes supply, minus the nodes demand, minus the sum of flows through arcs directed from the node. DDIA -1 BAAHE 1 ERROR: The problem is infeasible. At least one nodal flow conservation constraint cannot be satisfied. WARNING: The solution value reported next is associated with a solution that is not both feasible and optimal. NOTE: Shortest path= 95.131944444 . NOTE: The data set WORK.SPATH has 5681 observations and 14 variables. ERROR_STATUS=OK OPT_STATUS=STAGE_1 SHORTEST_PATH=95.131944444444 SOLUTION=INFEASIBLE NOTE: PROCEDURE NETFLOW used (Total process time): real time 0.05 seconds cpu time 0.02 seconds NOTE: The data set WORK.A has 0 observations and 0 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds NOTE: The SAS System stopped processing this step because of errors. WARNING: The data set WORK.A may be incomplete. When this step was stopped there were 0 observations and 8 variables. WARNING: Data set WORK.A was not replaced because this step was stopped. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.00 seconds NOTE: Line generated by the macro variable "_ORNETFL". 87 ERROR_STATUS=OK OPT_STATUS=STAGE_1 SHORTEST_PATH=95.131944444444 ---------- ------------- 22 22 ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, (, *, **, +, -, /, ;, <, <=, <>, =, >, ><, >=, AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR, [, ^=, {, |, ||, ~=. 87 ! ERROR_STATUS=OK OPT_STATUS=STAGE_1 SHORTEST_PATH=95.131944444444 87 ! SOLUTION=INFEASIBLE -------- 22 ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, *, **, +, -, /, ;, <, <=, <>, =, >, ><, >=, AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR, ^=, |, ||, ~=. I guess it is something wrong with data step: data a; set a;
value1=&_ORNETFL;
run; I will appreciate it very much if someone could help me out. Thanks again!
... View more