The SAS Output Delivery System and reporting techniques

difference 9.1 and 9.2

Reply
Regular Contributor
Posts: 229

difference 9.1 and 9.2

hello, this compute block works on 9.2 but generates errors on 9.1

compute dpHold ;
if dpHold eq '' then
dpHold = ExecBy;
if upcase(dpHold) IN ('DEVINP','ENGINP') then
call define (_row_,'STYLE','style={color=#CD5916}');
else if upcase(dpHold) IN ('CUST','PROINP','EXPINP') then
call define (_row_,'STYLE','style={color=#ED1941}');
endcomp;

ERROR:

ERROR 180-322: Statement is not valid or it is used out of proper order.
ERROR 180-322: Statement is not valid or it is used out of proper order.
ERROR 180-322: Statement is not valid or it is used out of proper order.
ERROR 180-322: Statement is not valid or it is used out of proper order.
ERROR 180-322: Statement is not valid or it is used out of proper order.
NOTE: The above message was for the following by-group:
LOT_ID=AL100418
ERROR 180-322: Statement is not valid or it is used out of proper order.
ERROR 180-322: Statement is not valid or it is used out of proper order.
NOTE: The above message was for the following by-group:
LOT_ID=AL100436
ERROR 180-322: Statement is not valid or it is used out of proper
SAS Super FREQ
Posts: 8,740

Re: difference 9.1 and 9.2

Hi:
Actually, the error is coming for a BY group, so it's possible that the error is not in the COMPUTE block. If you are trying to use a BY variable in a COMPUTE block, then it MUST be in your COLUMN statement. I can't think of anything else. You might try changing the color to CXCD5916 (with CX instead of #) -- but I think HTML color names also worked in SAS 9.1.

I no longer have SAS 9.1 to test on. You might want to open a track with Tech Support as they could look at your data and ALL your code and test on SAS 9.1.

cynthia
Regular Contributor
Posts: 229

Re: difference 9.1 and 9.2

i doubt this

this runs without errors, when i uncomment i get these errors..
my by variable is an other variable

compute dpHold ;
if dpHold eq "" then
dpHold = ExecBy;
/*
if upcase(dpHold) eq 'DEVINP' then
call define (_row_,"STYLE","style={color=#CD5916}");

else if upcase(dpHold) IN ("CUST","PROINP","EXPINP") then
call define (_row_,"STYLE","style={color=#ED1941}");
*/
endcomp;
SAS Super FREQ
Posts: 8,740

Re: difference 9.1 and 9.2

Hi:
I thought it as an unlilkely reason, but worth mentioning, since you didn't show all your code and since the error message explicitly mentioned the BY group.

Still the same recommendation, though --if the code works on 9.2, but not on 9.1, then you need to open a track with Tech Support.

cynthia
Regular Contributor
Posts: 229

Re: difference 9.1 and 9.2

this is my full code:


ods html file=_webout (title="Prio Lot Report") stylesheet=(URL="http://imecwww.imec.be/~osp/fab300/test/ImecStyle.css");
ods listing close;
ods escapechar='^';
/* title */
/*ods text="Prio Lot Report";*/
options nobyline;
proc report data=prio_table nowd style(report) = [rules=groups cellspacing=0pt];
/* Each variable you want to display or to highlight has to be in the column section */
column Lot_ID Ent_State OperSeq OpersAway Facility Operation ToolAndState OperParValue nrWafers oCycleTime
ExecBy OperOwner dpHold Holdnote ProcessEngineer Holdcode BatchEngineer Route Datim DaysOper oper24 oper48 Program Priority PriorityReason TimeCritical;
/* Start Defining Columns */
define Lot_id / display noprint;
define Ent_State / display noprint ;
define OperSeq / display 'Seq';
define OpersAway / display 'Away' ;
define Facility / display noprint;
define Operation / display;
define ToolAndState / display 'Tool';
define OperParValue / display ;
define nrWafers / display 'Wafers';
define oCycleTime/ display;
define ExecBy/ display noprint;
define OperOwner / display ;
define DpHold / display ;
define HoldNote / noprint ;
define ProcessEngineer / noprint ;
define HoldCode / noprint ;
define BatchEngineer / noprint ;
define Route / noprint ;
define Datim / display noprint ;
define DaysOper / display noprint ;
define oper24 / display noprint ;
define oper48 / display noprint ;
define priority / noprint;
define program / noprint;
define TimeCritical / noprint;
define PriorityReason / noprint;
/* Byvariable */
by lot_id;
/* Text before each table */
compute before _page_ / style={just=l};
text1 = 'Lot_Id: ' || '^{style[url="http://wiksas.imec.be:8080/SASStoredProcess/do?_program=/Samples/SP_ShortTermScheduleFast&lotnumber='|| strip(Lot_Id) || '"]' || strip(Lot_Id) || '}(' || strip(Priority) || ") Facility:" || strip(Facility) || "" ;
text2 = "Priority Reason:" || strip(PriorityReason) ;
text3 = "Holdcode: " || strip(Holdcode) || " Holdnote: " || strip(Holdnote) || "" ;
text4 = "Route: " || strip(route) || " ProcessEngineer: " || strip(ProcessEngineer) || " BatchEngineer: " || strip(BatchEngineer) || "" ;
text5= "Days At Operation: " || strip(put(DaysOper,6.2)) || " Arrival Date: "|| strip(put(Datim,datetime21.)) || "" ;
text6= "Program:" || strip(Program) || "" ;
text7= "Operations Last 24hrs: " || strip(put(oper24,6.2)) || " Last 48hrs: " || strip(put(oper48,6.2)) || "" ;
line text1 $;
line text2 $;
line text3 $;
line text4 $;
line text5 $;
line text6 $;
line text7 $;
endcomp;
/* Defining rules for variables */
/*
compute ToolAndState;
if upcase(ENT_STATE) eq ('RESERVED') then
call define (_col_,'STYLE','style={color=#143F90}');
if upcase(ENT_STATE) IN ('EQFAIL','IDLE_ERROR') then
call define (_col_,'STYLE','style={color=#ED1941}');
if upcase(ENT_STATE) in ('SPC_TEST','SET_UP') then
call define (_col_,'STYLE','style={color=#0089CE}');
if upcase(ENT_STATE) eq 'IN_REPAIR' then
call define (_col_,'STYLE','style={color=#00A84F}');
endcomp;
*/

compute dpHold ;
if dpHold eq "" then
dpHold = ExecBy;
/*
if upcase(dpHold) eq 'DEVINP' then
call define (_row_,"STYLE","style={color=#CD5916}");

else if upcase(dpHold) IN ("CUST","PROINP","EXPINP") then
call define (_row_,"STYLE","style={color=#ED1941}");
*/
endcomp;

/*
compute Operation ;
if substr(Operation,1,3) in ('701','702','703') then
call define (_row_,'STYLE','style={color=#ED1941}');
if substr(Operation,1,3) in ('701','702','703') then
call define (_row_,'STYLE','style={color=#ED1941}');
endcomp;
*/
run;
ods html close;
Regular Contributor
Posts: 229

Re: difference 9.1 and 9.2

it seems that when i'm changing the style attribute from color to background, it works. But my user wants only text colored, any help?

EDIT: foreground color works :-) Message was edited by: Filipvdr
SAS Super FREQ
Posts: 8,740

Re: difference 9.1 and 9.2

Oh, sigh, I should have thought of that! On 9.1, COLOR was not implemented yet, but FOREGROUND was. You can figure out which attributes are the 9.1 attributes, by checking here --
http://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/a002972093.htm

generally the "alias" was the attribute name used in 9.1 -- for example:
9.2 / 9.1
COLOR / FOREGROUND
FONTSIZE / FONT_SIZE

cynthia
Ask a Question
Discussion stats
  • 6 replies
  • 230 views
  • 0 likes
  • 2 in conversation