Prev: Bulk load to oracle
Next: ODS OUTPUT
From: jaheuk on 4 Jan 2010 09:02 dear all, I would like to print PROD_CL with a LINE statement in the coloured zone. DATA TEST; LENGTH CNTRY PROD_CL PROD $20. DEV $3. blank $5. AUM_Y NNM_D NNM_CM NNM_YTD AUM 4. ; LABEL CNTRY='COUNTRY' PROD_CL='PRODUCT CLASS' PROD='PRODUCT' AUM_Y='AUM/31-12' NNM_D='NNM/DAY' NNM_CM='NNM/MONTH' NNM_YTD='NNM/YTD' AUM='AUM' DEV='DEV'; INFILE CARDS DLM='#' MISSOVER ; INPUT CNTRY $ PROD_CL $ PROD $ AUM_Y NNM_D NNM_CM NNM_YTD AUM DEV blank $; DATALINES; BELGIUM#TERM ACCOUNTS#2 IN 1 ACCOUNTS#200000#5000#6000#80000#300000#EUR# BELGIUM#TERM ACCOUNTS#ACCOUNTS > 1Y#-100000#1000#3000#80000#150000#EUR# BELGIUM#DEPOSIT ACCOUNTS#SPAARPLUS#500#60#600#800#300#EUR# BELGIUM#DEPOSIT ACCOUNTS#I- INVEST#200000#5000#6000#-80000#300000#EUR# ; RUN; proc sort; by cntry;run; PROC FORMAT ; VALUE TLIGHT LOW-0 = "RED" 0-HIGH= "BLACK"; RUN; filename aa 'c:\temp\test.html' ; ODS LISTING CLOSE; ODS HTML BODY=aa STYLE=SASWEB ; OPTIONS LS=256 PS=1000 MISSING='' NODATE PAGENO=1 NOCENTER ; TITLE; proc report data=test nowd headline headskip out=rep style(report)={background=white cellspacing=0 rules=groups bordercolor=black borderwidth=1 frame=box} style(header) ={background=VLIGB foreground=black font_face=arial font_size=10pt} style(lines)={font_weight=bold foreground=blue just=L}; column prod_cl prod AUM_Y NNM_D NNM_CM NNM_YTD AUM ; define prod_cl / group noprint ; define prod / group ; define aum_y / analysis f=commax15. STYLE={FOREGROUND=TLIGHT.}; define nnm_d / analysis f=commax15. STYLE={FOREGROUND=TLIGHT.}; define nnm_cm / analysis f=commax15. STYLE={FOREGROUND=TLIGHT.}; define nnm_ytd / analysis f=commax15. STYLE={FOREGROUND=TLIGHT.}; define aum / analysis f=commax15. STYLE={FOREGROUND=TLIGHT.}; break after prod_cl / summarize ; compute after prod_cl ; CALL DEFINE(_ROW_,'STYLE','STYLE={BACKGROUND=BISQUE FONT_WEIGHT=BOLD}'); endcomp; quit; ODS HTML CLOSE ; ods listing ; HOWEVER, with every LINE statement on all kinds of places i get error: LINE statements must appear between COMPUTE and ENDCOMP statements GreetZ, Herman
From: Ya Huang on 5 Jan 2010 11:28 I ran your code below without error after I get rid of the line break of this statement: CALL DEFINE(_ROW_,'STYLE','STYLE={BACKGROUND=BISQUE FONT_WEIGHT=BOLD}'); If it is broken up as two lines like this, CALL DEFINE(_ROW_,'STYLE','STYLE={BACKGROUND=BISQUE FONT_WEIGHT=BOLD}'); I will get error as: ERROR 22-322: Syntax error, expecting one of the following: ACTIVELINKCOLOR, BACKGROUNDCOLOR, BACKGROUNDIMAGE, BORDERBOTTOMCOLOR, BORDERCOLOR, BORDERCOLORDARK, BORDERCOLORLIGHT, BORDERLEFTCOLOR, BORDERRIGHTCOLOR, BORDERTOPCOLOR, COLOR, CONTRASTCOLOR, ENDCOLOR, FONTFAMILY, FONTWEIGHT, LINKCOLOR, LISTSTYLEIMAGE, NEUTRALCOLOR, POSTIMAGE, PREIMAGE, STARTCOLOR, VISITEDLINKCOLOR. ERROR 76-322: Syntax error, statement will be ignored. It's strange to see that SAS don't tolerant the line break for this case, it usually do. BTW, I used v9.2 on xp. On Mon, 4 Jan 2010 06:02:40 -0800, jaheuk <hejacobs(a)GMAIL.COM> wrote: >dear all, >I would like to print PROD_CL with a LINE statement in the coloured >zone. > >DATA TEST; > LENGTH CNTRY PROD_CL PROD $20. DEV $3. blank $5. > AUM_Y NNM_D NNM_CM NNM_YTD AUM 4. ; > LABEL CNTRY='COUNTRY' PROD_CL='PRODUCT CLASS' PROD='PRODUCT' > AUM_Y='AUM/31-12' NNM_D='NNM/DAY' NNM_CM='NNM/MONTH' >NNM_YTD='NNM/YTD' AUM='AUM' DEV='DEV'; > INFILE CARDS DLM='#' MISSOVER ; > INPUT CNTRY $ PROD_CL $ PROD $ AUM_Y NNM_D NNM_CM NNM_YTD AUM DEV >blank $; >DATALINES; >BELGIUM#TERM ACCOUNTS#2 IN 1 >ACCOUNTS#200000#5000#6000#80000#300000#EUR# >BELGIUM#TERM ACCOUNTS#ACCOUNTS > >1Y#-100000#1000#3000#80000#150000#EUR# >BELGIUM#DEPOSIT ACCOUNTS#SPAARPLUS#500#60#600#800#300#EUR# >BELGIUM#DEPOSIT ACCOUNTS#I- >INVEST#200000#5000#6000#-80000#300000#EUR# >; >RUN; >proc sort; by cntry;run; >PROC FORMAT ; > VALUE TLIGHT > LOW-0 = "RED" > 0-HIGH= "BLACK"; >RUN; >filename aa 'c:\temp\test.html' ; >ODS LISTING CLOSE; >ODS HTML BODY=aa STYLE=SASWEB ; >OPTIONS LS=256 PS=1000 MISSING='' NODATE PAGENO=1 NOCENTER ; >TITLE; >proc report data=test nowd headline headskip out=rep >style(report)={background=white cellspacing=0 rules=groups >bordercolor=black borderwidth=1 frame=box} >style(header) ={background=VLIGB >foreground=black >font_face=arial font_size=10pt} >style(lines)={font_weight=bold foreground=blue just=L}; >column prod_cl prod AUM_Y NNM_D NNM_CM NNM_YTD AUM ; >define prod_cl / group noprint ; >define prod / group ; >define aum_y / analysis f=commax15. STYLE={FOREGROUND=TLIGHT.}; >define nnm_d / analysis f=commax15. STYLE={FOREGROUND=TLIGHT.}; >define nnm_cm / analysis f=commax15. STYLE={FOREGROUND=TLIGHT.}; >define nnm_ytd / analysis f=commax15. STYLE={FOREGROUND=TLIGHT.}; >define aum / analysis f=commax15. STYLE={FOREGROUND=TLIGHT.}; >break after prod_cl / summarize ; >compute after prod_cl ; > CALL DEFINE(_ROW_,'STYLE','STYLE={BACKGROUND=BISQUE >FONT_WEIGHT=BOLD}'); >endcomp; >quit; >ODS HTML CLOSE ; >ods listing ; > > >HOWEVER, with every LINE statement on all kinds of places i get >error: LINE statements must appear between COMPUTE and ENDCOMP >statements > >GreetZ, >Herman
From: Tom Abernathy on 5 Jan 2010 13:06 SAS parser will sometimes treat a linebreak as not there, perhaps because it is a quoted string? So it might be interpretting this as one option with two equal signs and thus an invalid syntax. BACKGROUND=BISQUEFONT_WEIGTH=BOLD On Jan 5, 11:28 am, ya.hu...(a)AMYLIN.COM (Ya Huang) wrote: > I ran your code below without error after I > get rid of the line break of this statement: > > CALL DEFINE(_ROW_,'STYLE','STYLE={BACKGROUND=BISQUE FONT_WEIGHT=BOLD}'); > > If it is broken up as two lines like this, > > CALL DEFINE(_ROW_,'STYLE','STYLE={BACKGROUND=BISQUE > FONT_WEIGHT=BOLD}'); > > I will get error as: > > ERROR 22-322: Syntax error, expecting one of the following: > ACTIVELINKCOLOR, BACKGROUNDCOLOR, BACKGROUNDIMAGE, BORDERBOTTOMCOLOR, > BORDERCOLOR, BORDERCOLORDARK, BORDERCOLORLIGHT, BORDERLEFTCOLOR, > BORDERRIGHTCOLOR, BORDERTOPCOLOR, COLOR, CONTRASTCOLOR, > ENDCOLOR, FONTFAMILY, FONTWEIGHT, LINKCOLOR, LISTSTYLEIMAGE, > NEUTRALCOLOR, POSTIMAGE, PREIMAGE, STARTCOLOR, VISITEDLINKCOLOR. > ERROR 76-322: Syntax error, statement will be ignored. > > It's strange to see that SAS don't tolerant the line break for > this case, it usually do. > > BTW, I used v9.2 on xp. > > >
From: jaheuk on 9 Jan 2010 03:48 HI GUYS, the code i put here is correct i have NO problem with that!!! IF the lines are broken it is because of this newsgroup ;-) my QUESTION is HOW TO program the LINE STATEMENTS so that PROD_CL is printed IN coloured zone??? Where ever i put LINE @10 prod_cl $30. i get ERROR : > >error: LINE statements must appear between COMPUTE and ENDCOMP statements GR, Herman On 5 jan, 17:28, ya.hu...(a)AMYLIN.COM (Ya Huang) wrote: > I ran your code below without error after I > get rid of the line break of this statement: > > CALL DEFINE(_ROW_,'STYLE','STYLE={BACKGROUND=BISQUE FONT_WEIGHT=BOLD}'); > > If it is broken up as two lines like this, > > CALL DEFINE(_ROW_,'STYLE','STYLE={BACKGROUND=BISQUE > FONT_WEIGHT=BOLD}'); > > I will get error as: > > ERROR 22-322: Syntax error, expecting one of the following: > ACTIVELINKCOLOR, BACKGROUNDCOLOR, BACKGROUNDIMAGE, BORDERBOTTOMCOLOR, > BORDERCOLOR, BORDERCOLORDARK, BORDERCOLORLIGHT, BORDERLEFTCOLOR, > BORDERRIGHTCOLOR, BORDERTOPCOLOR, COLOR, CONTRASTCOLOR, > ENDCOLOR, FONTFAMILY, FONTWEIGHT, LINKCOLOR, LISTSTYLEIMAGE, > NEUTRALCOLOR, POSTIMAGE, PREIMAGE, STARTCOLOR, VISITEDLINKCOLOR. > ERROR 76-322: Syntax error, statement will be ignored. > > It's strange to see that SAS don't tolerant the line break for > this case, it usually do. > > BTW, I used v9.2 on xp. > > > > On Mon, 4 Jan 2010 06:02:40 -0800,jaheuk<hejac...(a)GMAIL.COM> wrote: > >dear all, > >I would like to print PROD_CL with a LINE statement in the coloured > >zone. > > >DATA TEST; > > LENGTH CNTRY PROD_CL PROD $20. DEV $3. blank $5. > > AUM_Y NNM_D NNM_CM NNM_YTD AUM 4. ; > > LABEL CNTRY='COUNTRY' PROD_CL='PRODUCT CLASS' PROD='PRODUCT' > > AUM_Y='AUM/31-12' NNM_D='NNM/DAY' NNM_CM='NNM/MONTH' > >NNM_YTD='NNM/YTD' AUM='AUM' DEV='DEV'; > > INFILE CARDS DLM='#' MISSOVER ; > > INPUT CNTRY $ PROD_CL $ PROD $ AUM_Y NNM_D NNM_CM NNM_YTD AUM DEV > >blank $; > >DATALINES; > >BELGIUM#TERM ACCOUNTS#2 IN 1 > >ACCOUNTS#200000#5000#6000#80000#300000#EUR# > >BELGIUM#TERM ACCOUNTS#ACCOUNTS > > >1Y#-100000#1000#3000#80000#150000#EUR# > >BELGIUM#DEPOSIT ACCOUNTS#SPAARPLUS#500#60#600#800#300#EUR# > >BELGIUM#DEPOSIT ACCOUNTS#I- > >INVEST#200000#5000#6000#-80000#300000#EUR# > >; > >RUN; > >proc sort; by cntry;run; > >PROC FORMAT ; > > VALUE TLIGHT > > LOW-0 = "RED" > > 0-HIGH= "BLACK"; > >RUN; > >filename aa 'c:\temp\test.html' ; > >ODS LISTING CLOSE; > >ODS HTML BODY=aa STYLE=SASWEB ; > >OPTIONS LS=256 PS=1000 MISSING='' NODATE PAGENO=1 NOCENTER ; > >TITLE; > >proc report data=test nowd headline headskip out=rep > >style(report)={background=white cellspacing=0 rules=groups > >bordercolor=black borderwidth=1 frame=box} > >style(header) ={background=VLIGB > >foreground=black > >font_face=arial font_size=10pt} > >style(lines)={font_weight=bold foreground=blue just=L}; > >column prod_cl prod AUM_Y NNM_D NNM_CM NNM_YTD AUM ; > >define prod_cl / group noprint ; > >define prod / group ; > >define aum_y / analysis f=commax15. STYLE={FOREGROUND=TLIGHT.}; > >define nnm_d / analysis f=commax15. STYLE={FOREGROUND=TLIGHT.}; > >define nnm_cm / analysis f=commax15. STYLE={FOREGROUND=TLIGHT.}; > >define nnm_ytd / analysis f=commax15. STYLE={FOREGROUND=TLIGHT.}; > >define aum / analysis f=commax15. STYLE={FOREGROUND=TLIGHT.}; > >break after prod_cl / summarize ; > >compute after prod_cl ; > > CALL DEFINE(_ROW_,'STYLE','STYLE={BACKGROUND=BISQUE > >FONT_WEIGHT=BOLD}'); > >endcomp; > >quit; > >ODS HTML CLOSE ; > >ods listing ; > > >HOWEVER, with every LINE statement on all kinds of places i get > >error: LINE statements must appear between COMPUTE and ENDCOMP > >statements > > >GreetZ, > >Herman- Tekst uit oorspronkelijk bericht niet weergeven - > > - Tekst uit oorspronkelijk bericht weergeven -
From: data _null_; on 9 Jan 2010 09:25 On Jan 9, 2:48 am, jaheuk <hejac...(a)gmail.com> wrote: > HI GUYS, > the code i put here is correct i have NO problem with that!!! > IF the lines are broken it is because of this newsgroup ;-) > > my QUESTION is HOW TO program the LINE STATEMENTS so that PROD_CL is > printed IN coloured zone??? > Where ever i put LINE @10 prod_cl $30. > i get ERROR : > >error: LINE statements must appear between COMPUTE > and ENDCOMP statements > > GR, > Herman > > On 5 jan, 17:28, ya.hu...(a)AMYLIN.COM (Ya Huang) wrote: > > > > > I ran your code below without error after I > > get rid of the line break of this statement: > > > CALL DEFINE(_ROW_,'STYLE','STYLE={BACKGROUND=BISQUE FONT_WEIGHT=BOLD}'); > > > If it is broken up as two lines like this, > > > CALL DEFINE(_ROW_,'STYLE','STYLE={BACKGROUND=BISQUE > > FONT_WEIGHT=BOLD}'); > > > I will get error as: > > > ERROR 22-322: Syntax error, expecting one of the following: > > ACTIVELINKCOLOR, BACKGROUNDCOLOR, BACKGROUNDIMAGE, BORDERBOTTOMCOLOR, > > BORDERCOLOR, BORDERCOLORDARK, BORDERCOLORLIGHT, BORDERLEFTCOLOR, > > BORDERRIGHTCOLOR, BORDERTOPCOLOR, COLOR, CONTRASTCOLOR, > > ENDCOLOR, FONTFAMILY, FONTWEIGHT, LINKCOLOR, LISTSTYLEIMAGE, > > NEUTRALCOLOR, POSTIMAGE, PREIMAGE, STARTCOLOR, VISITEDLINKCOLOR. > > ERROR 76-322: Syntax error, statement will be ignored. > > > It's strange to see that SAS don't tolerant the line break for > > this case, it usually do. > > > BTW, I used v9.2 on xp. > > > On Mon, 4 Jan 2010 06:02:40 -0800,jaheuk<hejac...(a)GMAIL.COM> wrote: > > >dear all, > > >I would like to print PROD_CL with a LINE statement in the coloured > > >zone. > > > >DATA TEST; > > > LENGTH CNTRY PROD_CL PROD $20. DEV $3. blank $5. > > > AUM_Y NNM_D NNM_CM NNM_YTD AUM 4. ; > > > LABEL CNTRY='COUNTRY' PROD_CL='PRODUCT CLASS' PROD='PRODUCT' > > > AUM_Y='AUM/31-12' NNM_D='NNM/DAY' NNM_CM='NNM/MONTH' > > >NNM_YTD='NNM/YTD' AUM='AUM' DEV='DEV'; > > > INFILE CARDS DLM='#' MISSOVER ; > > > INPUT CNTRY $ PROD_CL $ PROD $ AUM_Y NNM_D NNM_CM NNM_YTD AUM DEV > > >blank $; > > >DATALINES; > > >BELGIUM#TERM ACCOUNTS#2 IN 1 > > >ACCOUNTS#200000#5000#6000#80000#300000#EUR# > > >BELGIUM#TERM ACCOUNTS#ACCOUNTS > > > >1Y#-100000#1000#3000#80000#150000#EUR# > > >BELGIUM#DEPOSIT ACCOUNTS#SPAARPLUS#500#60#600#800#300#EUR# > > >BELGIUM#DEPOSIT ACCOUNTS#I- > > >INVEST#200000#5000#6000#-80000#300000#EUR# > > >; > > >RUN; > > >proc sort; by cntry;run; > > >PROC FORMAT ; > > > VALUE TLIGHT > > > LOW-0 = "RED" > > > 0-HIGH= "BLACK"; > > >RUN; > > >filename aa 'c:\temp\test.html' ; > > >ODS LISTING CLOSE; > > >ODS HTML BODY=aa STYLE=SASWEB ; > > >OPTIONS LS=256 PS=1000 MISSING='' NODATE PAGENO=1 NOCENTER ; > > >TITLE; > > >proc report data=test nowd headline headskip out=rep > > >style(report)={background=white cellspacing=0 rules=groups > > >bordercolor=black borderwidth=1 frame=box} > > >style(header) ={background=VLIGB > > >foreground=black > > >font_face=arial font_size=10pt} > > >style(lines)={font_weight=bold foreground=blue just=L}; > > >column prod_cl prod AUM_Y NNM_D NNM_CM NNM_YTD AUM ; > > >define prod_cl / group noprint ; > > >define prod / group ; > > >define aum_y / analysis f=commax15. STYLE={FOREGROUND=TLIGHT.}; > > >define nnm_d / analysis f=commax15. STYLE={FOREGROUND=TLIGHT.}; > > >define nnm_cm / analysis f=commax15. STYLE={FOREGROUND=TLIGHT.}; > > >define nnm_ytd / analysis f=commax15. STYLE={FOREGROUND=TLIGHT.}; > > >define aum / analysis f=commax15. STYLE={FOREGROUND=TLIGHT.}; > > >break after prod_cl / summarize ; > > >compute after prod_cl ; > > > CALL DEFINE(_ROW_,'STYLE','STYLE={BACKGROUND=BISQUE > > >FONT_WEIGHT=BOLD}'); > > >endcomp; > > >quit; > > >ODS HTML CLOSE ; > > >ods listing ; > > > >HOWEVER, with every LINE statement on all kinds of places i get > > >error: LINE statements must appear between COMPUTE and ENDCOMP > > >statements > > > >GreetZ, > > >Herman- Tekst uit oorspronkelijk bericht niet weergeven - > > > - Tekst uit oorspronkelijk bericht weergeven -- Hide quoted text - > > - Show quoted text - If I understand correctly you can accomplish that task with this.... compute before prod_cl; saveprod_cl = prod_cl; endcomp; compute after prod_cl ; CALL DEFINE(_ROW_,'STYLE','STYLE={BACKGROUND=BISQUE FONT_WEIGHT=BOLD}'); prod = saveprod_cl; endcomp;
|
Pages: 1 Prev: Bulk load to oracle Next: ODS OUTPUT |