Subscribe Bookmark RSS Feed

William Baum's JCL routine for scraping html pages

LNitz

Occasional Contributor

Joined:

Feb 16, 2017

I have been testing Mr. Baum's routine, but get an error code I do not understand.  I believe I rendered his code segment correctly, with my file names and the target URL added.  Here is the code and the result:

Code:

dir=pick directory("C:\Users\lnitz\Documents\TextAnalysis", show files (0));
ObjectName = Open(“https://slate.com/business/2017/09/london-declines-to-renew-uber-license.html",
HTML Table(#))<< Set Name(“TableName2”) << Save(dir||“FileName2.jmp”);

 

Error Message:

Unexpected "TableName2". Perhaps there is a missing "," or ")".
Trying to parse arguments of function "Open".
Line 3 Column 28: HTML Table(#))<< Set Name(“►TableName2”) << Save(di

 

I am at a loss--almost always demos from SAS and JMP presentations run!

1 ACCEPTED SOLUTION

Accepted Solutions
Justin_Chilton

Joined:

Aug 27, 2015

Solution

I am getting a different error because the URL you provided does not contain any HTML tables. However, the problem could stem from your script using non-traditional quotation marks.

Try changing this:

“TableName2”

To this:

"TableName2"

Notice there is a slight difference in the look of the quotation marks, which could cause JMP issues when parsing your code.

Justin
1 REPLY
Justin_Chilton

Joined:

Aug 27, 2015

Solution

I am getting a different error because the URL you provided does not contain any HTML tables. However, the problem could stem from your script using non-traditional quotation marks.

Try changing this:

“TableName2”

To this:

"TableName2"

Notice there is a slight difference in the look of the quotation marks, which could cause JMP issues when parsing your code.

Justin