Hello,
Suppose I have a Syntax code that creates a graph and sends it to html output file. The code is: * Chart Builder. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=count WorstTrend MISSING= LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: count=col(source(s), name("count")) DATA: WorstTrend=col(source(s), name("WorstTrend")) GUIDE: axis(dim(1), label("count")) GUIDE: axis(dim(2), label("WorstTrend")) ELEMENT: line(position(count*WorstTrend), missing.wings()) END GPL. OMS SELECT CHARTS /DESTINATION FORMAT=HTML IMAGES=YES IMAGEFORMAT=JPG CHARTSIZE=50 IMAGEROOT=julydata OUTFILE=C:/Documents and Settings/Desktop/Temp/julydata.htm. SPSS returns the following warning/error: Warnings Subcommand Destination. Unknown keyword or subcommand: :. This command is not executed. Subcommand OMS. Unknown keyword or subcommand: DOCUMENTS. Command OMS. The subcommand Destination is repeated. Subcommand OMS. Unknown keyword or subcommand: TEMP. Subcommand OMS. Unknown keyword or subcommand: JULYDATA.HTM. Does anybody know what's wrong with this code? Thanks in advance. Philip |
I don't know much about GPL, but I'm reasonably sure the END GPL command needs to be on a separate line -- although if the Chart Builder generated the syntax it should be valid.
Once you solve the syntax error issue, you still won't get what you want with your example syntax, because you need to specify the OMS request prior to the commands that generate the output that you want. The proper order would be: OMS GGRAPH BEGIN GPL END GPL OMSEND 1. END GPL needs to be on a separate line. 2. Althought fixing #1 may remove the syntax error -----Original Message----- From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Philip Papush Sent: Wednesday, October 25, 2006 9:42 AM To: [hidden email] Subject: OMS Problem Hello, Suppose I have a Syntax code that creates a graph and sends it to html output file. The code is: * Chart Builder. GGRAPH /GRAPHDATASET NAME="graphdataset" VARIABLES=count WorstTrend MISSING= LISTWISE REPORTMISSING=NO /GRAPHSPEC SOURCE=INLINE. BEGIN GPL SOURCE: s=userSource(id("graphdataset")) DATA: count=col(source(s), name("count")) DATA: WorstTrend=col(source(s), name("WorstTrend")) GUIDE: axis(dim(1), label("count")) GUIDE: axis(dim(2), label("WorstTrend")) ELEMENT: line(position(count*WorstTrend), missing.wings()) END GPL. OMS SELECT CHARTS /DESTINATION FORMAT=HTML IMAGES=YES IMAGEFORMAT=JPG CHARTSIZE=50 IMAGEROOT='julydata' OUTFILE='C:/Documents and Settings/Desktop/Temp/julydata.htm'. SPSS returns the following warning/error: Warnings Subcommand Destination. Unknown keyword or subcommand: :. This command is not executed. Subcommand OMS. Unknown keyword or subcommand: DOCUMENTS. Command OMS. The subcommand Destination is repeated. Subcommand OMS. Unknown keyword or subcommand: TEMP. Subcommand OMS. Unknown keyword or subcommand: JULYDATA.HTM'. Does anybody know what's wrong with this code? Thanks in advance. Philip |
In reply to this post by Philip Papush
Thank you. It works now.
Philip |
Free forum by Nabble | Edit this page |