* Programme : DIALOG.PRG * Voor de invoer van gegevens van het ISI Web of Science * December 1986 (DIALOG); December 1997 voor CD-ROM aangepast; * June 2000, aangepast voor ISI Web; * New version, September 2003 ** Internal generation of files; April 2006 * All rights reserved, Loet Leydesdorff, Wetenschapsdynamica ** CR field; 17 Dec. 2006 ** SC and ID fields; 24 Feb. 2008 ** SC fields changed to WC at WoS5, August 2011 ** This version is for Harbour Procedure Main() clear all clear * set largefile on * set exclusive on TEXT The data are from ISI's Web-of-Science in the format "Save to File". The program assumes a file with this input and the name "data.txt". Note that the default file name of WoS is "savedrecs.txt", etc. Please, rename the file(s) into a single file "data.txt". The output is the organization of all information in files which allow for relational database management (e.g., MS Access) or separate analysis as spreadsheets. These files are in the dBASE-format. Specifically, this routine generates RPYS.DBF if the cited references are also downloaded. When opened in Excel, RPYS.DBF can be used for "Referenced Publication Year Spectography" by drawing a scatterplot. In Excel: 1. File > Open > ... ; 2. Ctrl-A; 3. Insert > Scatter > Scatter with Smooth Lines; (Turn markers off); 4. Adjust the x-axis to an appropriate time scale. Without sufficient diskspace an error is generated and the routine stops. The routine overwrites files from previous runs. Save them elsewhere! ENDTEXT Wait "Any key >" * delete file data.txt * run crlfdata.txt if .not. file("data.txt") v1 = " " clear screen do while .t. @ 10,10 Say " There is no file data.txt" @ 11,10 Say " Retry? (Y/N) " get v1 read if v1 = "n" .or. v1 = "N" clear all return endif if file("data.txt") exit endif enddo endif clear @ 12,1 SAY "Processing. Please wait." set console off ** replace soft carriage returns with hard ones infile = fopen("data.txt") delete file data2.txt outfile = fcreate("data2.txt") v3 = 0 do while .t. buffer = space(100) v1 = fread(infile, @buffer, 100) buffer = strtran(buffer, chr(255),"") && opening characters ISI file buffer = strtran(buffer, chr(254),"") && opening characters ISI file if substr(buffer,100,1) = chr(13) buffer = substr(buffer,1,99) endif buffer = strtran(buffer, chr(10), chr(13)+chr(10)) buffer = strtran(buffer, chr(13)+chr(13),chr(13)) if .not. chr(10)$buffer && long cs field in WoS 4 buffer = buffer + "|||" + chr(13) + chr(10) + space(3) endif if v1 < 100 v2 = len(trim(buffer)) fwrite(outfile, buffer, v2) exit else fwrite(outfile, buffer) endif enddo fclose(infile) fclose(outfile) DO GENERATE @ 13,1 SAY "Processing. Please wait." select 1 use data delete all pack append from data2.txt sdf * delete for trim(DATA) < " " * pack go top replace all fieldn with substr(data,1,3) && adaptation to Flagship, Jan 2011 replace all data with substr(data,4) go top * do core clear all set exclusive on select 2 use core delete all pack select 1 use data go top number = 1 locate for "PT"$fieldn skip do while .not. eof() store " " to lav store " " to dtv store " " to snv store " " to puv store " " to dtv store " " to snv store " " to puv store " " to tcv store " " to bpv store " " to epv store " " to pgv store " " to j9v store " " to pyv store " " to pdv store " " to vlv store " " to isv store " " to utv store " " to rpv store " " to scv store " " to idv store " " to dev store " " to nrefv && March 6, 2010 do while .not. fieldn = "PT " .and. .not. eof() do case case fieldn="LA " store data to lav case fieldn="DT " store data to dtv case fieldn="SN " store data to snv case fieldn="PU " store data to puv case fieldn="TC " store data to tcv case fieldn="BP " store data to bpv case fieldn="EP " store data to epv case fieldn="PG " store data to pgv case fieldn="J9 " store data to j9v case fieldn="PY " store data to pyv case fieldn="PD " store data to pdv case fieldn="VL " store data to vlv case fieldn="IS " store data to isv case fieldn="UT " store data to utv case fieldn="RP " store data to rpv case fieldn="DE " store data to dev case fieldn="NR " store data to nrefv endcase skip enddo select 2 append blank replace la with substr(lav,1,10), dt with substr(dtv,1,50), py with substr(pyv,1,10), sn with substr(snv,1,15), pu with substr(puv,1,50) replace tc with val(tcv), bp with substr(bpv,1,10), ep with substr(epv,1,10), pg with substr(pgv,1,3), j9 with substr(j9v,1,40) replace pd with substr(pdv,1,10), vl with substr(vlv,1,10), is with substr(isv,1,5), ut with substr(utv,1,30), rp with substr(rpv,1,254), de with substr(dev,1,254) replace nr with "n" + ltrim(trim(str(number))), nref with val(ltrim(trim(nrefv))) select 1 if fieldn = "PT " number = number + 1 skip else exit endif enddo * return clear memory * do ti.prg * Programme : DIALOG.PRG, versie ISI Web, juni 2000 * routine * voor de invoer van TI-, AU- & JN- gegevens uit DIALOG /CD-ROM * All rights reserved, Loet Leydesdorff, Wetenschapsdynamica clear all clear @ 14,1 SAY "Processing. Please wait." set exclusive on select 1 use data * het TI-veld select 2 use core select 3 use au delete all pack select 4 use af delete all pack select 5 use em delete all pack select 1 locate for "PT"$fieldn skip select 2 store nr to vnr select 1 do while .not. eof() store " " to tiv store " " to auv store " " to sov do case case FIELDN="PT " select 2 skip store nr to vnr select 1 skip case FIELDN="TI " store data to tiv select 2 replace ti with substr(tiv,1,254) select 1 skip do while FIELDN=" " .and. .not. eof() store data to datav2 select 2 tiv=trim(tiv) store (tiv+" "+datav2) to tiv replace ti with substr(tiv,1,254) select 1 skip enddo case FIELDN="SC " && copy of ti-field store data to tiv select 2 replace sc with substr(tiv,1,254) select 1 skip do while FIELDN=" " .and. .not. eof() store data to datav2 select 2 tiv=trim(tiv) store (tiv+" "+datav2) to tiv replace sc with substr(tiv,1,254) select 1 skip enddo case FIELDN="WC " && copy of ti-field && Changes WC and SC in WoS5, August 2011 store data to tiv select 2 replace wc with substr(tiv,1,254) select 1 skip do while FIELDN=" " .and. .not. eof() store data to datav2 select 2 tiv=trim(tiv) store (tiv+" "+datav2) to tiv replace wc with substr(tiv,1,254) select 1 skip enddo case FIELDN="ID " && copy of ti-field store data to tiv select 2 replace id with substr(tiv,1,254) select 1 skip do while FIELDN=" " .and. .not. eof() store data to datav2 select 2 tiv=trim(tiv) store (tiv+" "+datav2) to tiv replace id with substr(tiv,1,254) select 1 skip enddo case FIELDN="FU " && copy of ti-field store data to tiv select 2 replace fu with substr(tiv,1,254) select 1 skip do while FIELDN=" " .and. .not. eof() store data to datav2 select 2 tiv=trim(tiv) store (tiv+" "+datav2) to tiv replace fu with substr(tiv,1,254) select 1 skip enddo case FIELDN="FX " && copy of ti-field store data to tiv select 2 replace fx with substr(tiv,1,254) select 1 skip do while FIELDN=" " .and. .not. eof() store data to datav2 select 2 tiv=trim(tiv) store (tiv+" "+datav2) to tiv replace fx with substr(tiv,1,254) select 1 skip enddo case FIELDN="AB " store data to tiv select 2 replace ab with tiv select 1 skip do while FIELDN=" " .and. .not. eof() store data to datav2 select 2 tiv=trim(tiv) store (tiv+" "+datav2) to tiv replace ab with tiv select 1 skip enddo case fieldn="AU " n = 1 store trim(data) to auv select 3 append blank replace au with substr(auv,1,80), nr with substr(vnr,1,8), aunr with n select 1 skip do while FIELDN=" " .and. .not. eof() store trim(data) to auv n = n + 1 select 3 append blank replace au with substr(auv,1,80), nr with substr(vnr,1,8), aunr with n select 1 skip enddo case fieldn="AF " n = 1 store trim(data) to auv select 4 append blank replace au with substr(auv,1,80), nr with substr(vnr,1,8), aunr with n select 1 skip do while FIELDN=" " .and. .not. eof() store trim(data) to auv n = n + 1 select 4 append blank replace au with substr(auv,1,80), nr with substr(vnr,1,8), aunr with n select 1 skip enddo case fieldn="EM " n = 1 store trim(data) to auv select 5 append blank replace au with substr(auv,1,80), nr with substr(vnr,1,8), aunr with n select 1 skip do while FIELDN=" " .and. .not. eof() store trim(data) to auv n = n + 1 select 5 append blank replace au with substr(auv,1,80), nr with substr(vnr,1,8), aunr with n select 1 skip enddo case fieldn="SO " store data to sov select 2 replace so with sov select 1 skip do while FIELDN=" " .and. .not. eof() store data to datav2 select 2 sov=trim(sov) store trim(sov+" "+datav2) to sov replace so with substr(sov,1,154) select 1 skip enddo otherwise skip endcase enddo select 4 index on au to au clear all * return clear memory * do cs.prg * Programme : CS.PRG als onderdeel van DIALOG.PRG * ISI Web-of-Science versie, juni 2000 * Routine voor de invoer van CS- gegevens uit DIALOG format CD-ROM * All rights reserved, Loet Leydesdorff, Wetenschapsdynamica clear all clear set exclusive on select 1 use data select 2 use core * het CS-veld select 5 use cs delete all pack select 3 use csau delete all pack select 8 use af index on au to au8 select 9 use au index on upper(au) to au9 select 1 locate for "PT "$fieldn select 2 store nr to vnr select 1 skip h1 = 0 do while .not. eof() store " " to datav do case case "PT "$fieldn select 2 skip n = 0 h1 = 0 store nr to vnr select 1 skip case "C1 "$fieldn n = 1 store trim(data) to datav if "["$datav h1 = 1 if "|||"$data && reconstruct string skip do while "|||"$data .and. fieldn == " " .and. .not. eof() datav = datav + trim(data) skip enddo if .not. "["$data .and. fieldn == " " && remainder of the string datav = datav + trim(data) endif datav = strtran(datav,"|||","") endif store substr(datav,1,at("]",datav)-1) to vcsau if ";"$vcsau do csau with vcsau, vnr, n endif datav = substr(datav,at("]",datav)+1) datav = ltrim(trim(datav)) else if "|||"$datav skip datav = datav + trim(data) datav = strtran(datav,"|||","") endif endif select 5 append blank replace cs with ltrim(datav), csnr with n, nr with vnr select 1 if .not. "RP "$fieldn skip endif ** end of first address do while FIELDN = " " .and. .not. eof() n = n + 1 datav = trim(data) if "["$datav if "|||"$data && reconstruct string skip do while "|||"$data .and. fieldn == " " .and. .not. eof() datav = datav + trim(data) skip enddo if .not. "["$data .and. fieldn == " " && remainder of the string datav = datav + trim(data) endif datav = strtran(datav,"|||","") endif store substr(datav,1,at("]",datav)-1) to vcsau if ";"$vcsau do csau with vcsau, vnr, n endif datav = substr(datav,at("]",datav)+1) datav = ltrim(trim(datav)) else if "|||"$data skip datav = datav + trim(data) datav = strtran(datav,"|||","") endif endif select 5 append blank replace cs with ltrim(datav), csnr with n, nr with vnr select 1 if .not. "RP "$fieldn skip endif enddo case "RP "$fieldn datav = trim(data) skip do while fieldn = " " .and. .not. eof() if substr(datav,len(datav)-2,3)= "|||" datav = datav + trim(data) else datav = datav + " " + trim(data) endif skip enddo datav = strtran(datav,"|||","") if ")"$datav store substr(datav,at(")",datav)+3) to datav endif *** sometimes the country-name is duplicated in the RP field (30 July 2011) vcountry = ltrim(substr(datav,rat(",",datav)+1)) vcountry2 = substr(datav,rat(",",datav)-len(vcountry),len(vcountry)) if vcountry == vcountry2 .and. .not. "LUXEMB"$upper(vcountry) datav = trim(substr(datav,1,rat(",",datav)-(len(vcountry)+1))) + " " + vcountry endif **** if trim(datav) > " " select 5 append blank replace cs with datav,csnr with 999, nr with vnr select 1 endif * skip otherwise select 1 skip endcase select 1 enddo select 5 replace all country with ltrim(substr(cs,rat(",",cs)+1)) go top do while .not. eof() store trim(country) to vcountry && Change on Sep. 30, 2011; additional period in cs fields if substr(vcountry,len(vcountry),1) = "." vcountry = substr(vcountry,1,len(vcountry)-1) replace country with vcountry endif store trim(cs) to vcs if substr(vcs,len(vcs),1) = "." vcs = substr(vcs,1,len(vcs)-1) replace cs with vcs endif if "USA"$country replace country with "USA" endif if substr(country,3,1) = " " .and. val(substr(country,4,5)) > 0 replace country with "USA" endif skip enddo ** remove false RP addresses index on nr to nr go top do while .not. eof() if csnr = 999 skip loop endif store nr to vnr vcs = substr(cs,1,rat(",",cs)-1) vcs = substr(vcs,rat(",",vcs)+1) store trim(country) to vcountry skip store recno() to vrecno if nr == vnr do while nr == vnr .and. .not. eof() if csnr = 999 .and. vcs$cs .and. trim(country) == vcountry delete endif skip enddo endif goto vrecno enddo pack clear memory close data * do cr.prg * Programme : CR.PRG als onderdeel van DIALOG.PRG * ISI Web-of-Science versie, Juni 2000 * Routine voor de invoer van CS- gegevens uit DIALOG format CD-ROM * All rights reserved, Loet Leydesdorff, Wetenschapsdynamica clear all clear set exclusive on select 1 use data select 2 use core * het CR-veld select 6 use cr delete all pack select 1 locate for "PT "$fieldn select 2 store nr to vnr select 1 skip do while .not. eof() store " " to datav store " " to datav3 do case case "PT "$fieldn select 2 skip store nr to vnr select 1 case "CR "$fieldn store trim(data) to datav if "|||"$datav && long CR fields; 21 July 2013 skip datav = datav + trim(data) datav = strtran(datav,"|||","") endif *** introduction DOI, September 2009 store " " to vdoi if ", DOI"$datav if rat(", DOI",datav) = len(datav)-4 skip datav = datav + " " + ltrim(trim(data)) endif vdoi = substr(datav,at(", DOI",datav)+2) datav = substr(datav,1,at(", DOI",datav)-1) endif *** select 6 append blank if at(",",datav) > 0 datav2 = substr(datav,at(",",datav)+2) datav3 = "" && for the case that there is no author mentioned; e.g., editorials in Nature. if substr(datav,1,2)="19" .or. substr(datav,1,2)="20" if at(",",datav2) > 0 datav3 = substr(datav2,1,at(",",datav2)-1) else datav3 = datav2 endif endif if at(",",datav2) > 0 datav2 = substr(datav2,at(",",datav2)+2) if at(",",datav2) > 0 datav2 = substr(datav2,1,at(",",datav2)-1) endif else datav2 = " " endif else datav2 = " " endif if datav3 > " " datav2 = datav3 endif ** correction 18Dec 2006 for newspapers datav2 = trim(datav2) if val(substr(datav2,-4)) > 0 if val(datav2) > 0 datav2 = "PATENT" && correction 12 Dec.09 else datav2 = substr(datav2,1,len(datav2)-4) datav2 = trim(datav2) endif endif replace cr with substr(datav,1,90), journalcr with substr(datav2,1,40), nr with vnr, doi with substr(vdoi,1,90) vdoi = " " select 1 skip do while FIELDN=" " .and. .not. eof() store trim(data) to datav if "|||"$datav && long CR-field ; 21 July 2013 skip datav = datav + trim(data) datav = strtran(datav,"|||","") endif *** introduction DOI, September 2009 if ", DOI"$datav if rat(", DOI",datav) = len(datav)-4 skip datav = datav + " " + ltrim(trim(data)) endif vdoi = substr(datav,at(", DOI",datav)+2) datav = substr(datav,1,at(", DOI",datav)-1) endif *** select 6 append blank if at(",",datav) > 0 datav2 = substr(datav,at(",",datav)+2) datav3 = "" if substr(datav,1,2)="19" .or. substr(datav,1,2)="20" if at(",",datav2) > 0 datav3 = substr(datav2,1,at(",",datav2)-1) else datav3 = datav2 endif endif if at(",",datav2) > 0 datav2 = substr(datav2,at(",",datav2)+2) if at(",",datav2) >0 datav2 = substr(datav2,1,at(",",datav2)-1) endif else datav2 = " " endif endif if datav3 > " " datav2 = datav3 endif ** correction 18Dec 2006 for newspapers datav2 = trim(datav2) if val(substr(datav2,-4)) > 0 if val(datav2) > 0 datav2 = "PATENT" && correction 12 Dec.09 else datav2 = substr(datav2,1,len(datav2)-4) datav2 = trim(datav2) endif endif replace cr with substr(datav,1,90), journalcr with substr(datav2,1,40), nr with vnr, doi with substr(vdoi,1,90) vdoi = " " select 1 skip enddo skip -1 endcase if .not. eof() skip endif enddo close data use cr && 23 June 2009; Almila Salah *** extension with rpys, 21 July 2013 * set filter to ", V"$cr .and. ", P"$cr go top do while .not. eof() if at(" ",journalcr) > 0 replace journalcr with substr(journalcr,1,at(" ",journalcr)) endif *** extension with rpys, 21 July 2013 if at(",",cr) > 0 vrau = substr(cr,1,at(",",cr)-1) replace rau with vrau vrpy = substr(cr,at(",",cr)+2,4) vrpy = val(vrpy) if vrpy > 0 replace rpy with vrpy endif endif skip enddo close data ** Make de.dbf select 1 use au delete file de.dbf copy stru to de use de select 2 use core do while .not. eof() store nr to vnr store de to vde vaunr = 0 if trim(de) > " " .and. .not. ";"$vde store nr to vnr vaunr = 1 store trim(de) to vde select 1 append blank replace nr with substr(vnr,1,8), au with substr(vde,1,80), aunr with vaunr select 2 endif if trim(de) > " " .and. ";"$vde do while ";"$vde vaunr = vaunr + 1 vde1 = substr(vde,1,at(";",vde)-1) vde = substr(vde,at(";",vde)+2) select 1 append blank replace nr with substr(vnr,1,8), au with substr(vde1,1,80), aunr with vaunr select 2 enddo if trim(vde) > " " vaunr = vaunr + 1 select 1 append blank replace nr with substr(vnr,1,8), au with substr(vde,1,80), aunr with vaunr endif select 2 endif skip enddo ** Make id.dbf select 1 use au delete file id.dbf copy stru to id use id select 2 use core do while .not. eof() store nr to vnr store id to vde vaunr = 0 if trim(id) > " " .and. .not. ";"$vde store nr to vnr vaunr = 1 store trim(id) to vde select 1 append blank replace nr with substr(vnr,1,8), au with substr(vde,1,80), aunr with vaunr select 2 endif if trim(id) > " " .and. ";"$vde do while ";"$vde vaunr = vaunr + 1 vde1 = substr(vde,1,at(";",vde)-1) vde = substr(vde,at(";",vde)+2) select 1 append blank replace nr with substr(vnr,1,8), au with substr(vde1,1,80), aunr with vaunr select 2 enddo if trim(vde) > " " vaunr = vaunr + 1 select 1 append blank replace nr with substr(vnr,1,8), au with substr(vde,1,880), aunr with vaunr endif select 2 endif skip enddo ** Make wc.dbf select 1 use au delete file sc.dbf delete file temp.dbf copy stru extended to temp use temp goto 2 replace field_name with "WC" replace field_len with 60 skip replace field_name with "WCNR" create wc from temp select 2 use core do while .not. eof() store nr to vnr store wc to vde vaunr = 0 if trim(wc) > " " .and. .not. ";"$vde store nr to vnr vaunr = 1 store trim(wc) to vde select 1 append blank replace nr with substr(vnr,1,8), wc with substr(vde,1,60), wcnr with vaunr select 2 endif if trim(wc) > " " .and. ";"$vde do while ";"$vde vaunr = vaunr + 1 vde1 = substr(vde,1,at(";",vde)-1) vde = substr(vde,at(";",vde)+2) select 1 append blank replace nr with substr(vnr,1,8), wc with substr(vde1,1,60), wcnr with vaunr select 2 enddo if trim(vde) > " " vaunr = vaunr + 1 select 1 append blank replace nr with substr(vnr,1,8), wc with substr(vde,1,60), wcnr with vaunr endif select 2 endif skip enddo ** eor * delete file data.dbf delete file *.ntx ** export abstracts close data use core go top delete file temp.txt set printer to temp.txt set print on do while .not. eof() store ab to vab if trim(vab) > " " ? nr+ "| "+ trim(vab) endif skip enddo set print off set printer to infile = fopen("temp.txt") delete file abstract.txt outfile = fcreate("abstract.txt") count = 0 do while .t. buffer = space(512) v1 = fread(infile, @buffer, 512) if count = 0 buffer = substr(buffer,3) v2 = len(trim(buffer)) fwrite(outfile, buffer,v2) count = count + 1 loop endif if v1 < 512 v2 = len(trim(buffer)) fwrite(outfile, buffer, v2) exit else fwrite(outfile, buffer) endif enddo fclose(infile) fclose(outfile) ** relation with leeronderzoek (full text); gebruik van abstracts; Nov. 2009 * use core * go top * n = 1 * do while .not. eof() * store ab to vab * if trim(vab) < " " * skip * loop * endif * vnr = ltrim(str(n)) * v1 = "text" + ltrim(vnr) + ".txt" * set alternate to &v1 * set alternate on * store ab to vab * if trim(vab) > " " * ? trim(vab) * endif * n = n + 1 * skip * set alternate off * set alternate to * enddo clear all do SC09 && overlay project with Ismael Rafols; 2 Dec09 return **** procedure GENERATE ** Generate.prg; subroutine of isi.wos delete file temp.dbf create temp append blank replace field_name with "data" replace field_type with "c" replace field_len with 210 && the buffer is set at 100 append blank replace field_name with "fieldn" && Flagship cannot read different fields from text file using SDF; Jan. 2011 replace field_type with "c" replace field_len with 3 delete file data.dbf create data from temp use temp delete all pack append blank replace field_name with "nr" replace field_type with "c" replace field_len with 8 append blank replace field_name with "au" replace field_type with "c" replace field_len with 80 append blank replace field_name with "aunr" replace field_type with "n" replace field_len with 4 delete file au.dbf create au from temp delete file af.dbf create af from temp delete file em.dbf create em from temp use temp delete all pack append blank replace field_name with "nr" replace field_type with "c" replace field_len with 8 append blank replace field_name with "csnr" replace field_type with "n" replace field_len with 6 append blank replace field_name with "cs" replace field_type with "c" replace field_len with 254 append blank replace field_name with "country" replace field_type with "c" replace field_len with 80 delete file cs.dbf create cs from temp use temp delete all pack append blank replace field_name with "nr" replace field_type with "c" replace field_len with 8 append blank replace field_name with "cr" replace field_type with "c" replace field_len with 254 append blank replace field_name with "rau" replace field_type with "c" replace field_len with 254 append blank replace field_name with "rpy" replace field_type with "n" replace field_len with 5 append blank replace field_name with "journalcr" replace field_type with "c" replace field_len with 40 append blank replace field_name with "doi" replace field_type with "c" replace field_len with 90 delete file cr.dbf create cr from temp use temp delete all pack append blank replace field_name with "nr" replace field_type with "c" replace field_len with 8 append blank replace field_name with "ti" replace field_type with "c" replace field_len with 254 append blank replace field_name with "so" replace field_type with "c" replace field_len with 154 append blank replace field_name with "la" replace field_type with "c" replace field_len with 10 append blank replace field_name with "dt" replace field_type with "c" replace field_len with 50 && Flagship, 22 Jan. 2011 append blank replace field_name with "ab" replace field_type with "m" && Flagship, 22 Jan. 2011 append blank replace field_name with "sn" replace field_type with "c" replace field_len with 15 append blank replace field_name with "pu" replace field_type with "c" replace field_len with 50 && Flagship, 22 Jan. 2011 append blank replace field_name with "tc" replace field_type with "n" replace field_len with 6 append blank replace field_name with "bp" replace field_type with "c" replace field_len with 10 append blank replace field_name with "ep" replace field_type with "c" replace field_len with 10 append blank replace field_name with "pg" replace field_type with "c" replace field_len with 3 append blank replace field_name with "j9" replace field_type with "c" replace field_len with 40 append blank replace field_name with "py" replace field_type with "c" replace field_len with 10 append blank replace field_name with "pd" replace field_type with "c" replace field_len with 10 append blank replace field_name with "vl" replace field_type with "c" replace field_len with 10 append blank replace field_name with "is" replace field_type with "c" replace field_len with 5 append blank replace field_name with "ut" replace field_type with "c" replace field_len with 30 append blank replace field_name with "rp" replace field_type with "c" replace field_len with 254 append blank replace field_name with "de" replace field_type with "c" replace field_len with 254 append blank replace field_name with "nref" replace field_type with "n" replace field_len with 5 append blank replace field_name with "wc" replace field_type with "c" replace field_len with 254 append blank replace field_name with "sc" replace field_type with "c" replace field_len with 254 append blank replace field_name with "id" replace field_type with "c" replace field_len with 254 append blank replace field_name with "fu" replace field_type with "c" replace field_len with 254 && Flagship, 22 Jan. 2011 append blank replace field_name with "fx" replace field_type with "c" replace field_len with 254 append blank && PubMed, Nov11 replace field_name with "pmid" replace field_type with "c" replace field_len with 20 delete file core.dbf create core from temp use temp delete all pack append blank replace field_name with "nr" replace field_type with "c" replace field_len with 8 append blank replace field_name with "afnr" replace field_type with "n" replace field_len with 6 append blank replace field_name with "csnr" replace field_type with "n" replace field_len with 6 delete file csau create csau from temp delete file temp.dbf clear all return ***** Procedure CSAU select 3 use csau select 8 vcsau = substr(vcsau,2) + ";" do while ";"$vcsau vau = ltrim(substr(vcsau,1,at(";",vcsau)-1)) vcsau = substr(vcsau,at(";",vcsau)+1) seek vau if .not. found() select 9 vau = upper(trim(vau)) vau = substr(vau,1,at(", ",vau)+3) seek vau endif do while trim(au) == trim(vau) .and. .not. eof() if trim(nr) == trim(vnr) store aunr to vaunr select 3 append blank replace csnr with n, afnr with vaunr, nr with vnr endif select 8 skip enddo enddo select 5 return **** Procedure SC09 && overlay project with Ismael Rafols; 2 Dec09 select 1 && updated for 222 categories on 6 Nov10 delete file temp.dbf && updated for 224 WoS 5 categories on 5 Feb 12. create temp append blank replace field_name with "sc" replace field_len with 60 replace field_type with "c" append blank replace field_name with "number" replace field_len with 6 replace field_type with "n" delete file wc10 create wc10 from temp n = 1 do while n <= 224 append blank n = n + 1 enddo go top ** WC 2010 replace sc with "ACOUSTICS" skip replace sc with "AGRICULTURAL ECONOMICS & POLICY" skip replace sc with "AGRICULTURAL ENGINEERING" skip replace sc with "AGRICULTURE, DAIRY & ANIMAL SCIENCE" skip replace sc with "AGRICULTURE, MULTIDISCIPLINARY" skip replace sc with "AGRONOMY" skip replace sc with "ALLERGY" skip replace sc with "ANATOMY & MORPHOLOGY" skip replace sc with "ANDROLOGY" skip replace sc with "ANESTHESIOLOGY" skip replace sc with "ANTHROPOLOGY" skip replace sc with "AREA STUDIES" skip replace sc with "ASTRONOMY & ASTROPHYSICS" skip replace sc with "AUTOMATION & CONTROL SYSTEMS" skip replace sc with "BEHAVIORAL SCIENCES" skip replace sc with "BIOCHEMICAL RESEARCH METHODS" skip replace sc with "BIOCHEMISTRY & MOLECULAR BIOLOGY" skip replace sc with "BIODIVERSITY CONSERVATION" skip replace sc with "BIOLOGY" skip replace sc with "BIOPHYSICS" skip replace sc with "BIOTECHNOLOGY & APPLIED MICROBIOLOGY" skip replace sc with "BUSINESS" skip replace sc with "BUSINESS, FINANCE" skip replace sc with "CARDIAC & CARDIOVASCULAR SYSTEMS" skip replace sc with "CELL & TISSUE ENGINEERING" skip replace sc with "CELL BIOLOGY" skip replace sc with "CHEMISTRY, ANALYTICAL" skip replace sc with "CHEMISTRY, APPLIED" skip replace sc with "CHEMISTRY, INORGANIC & NUCLEAR" skip replace sc with "CHEMISTRY, MEDICINAL" skip replace sc with "CHEMISTRY, MULTIDISCIPLINARY" skip replace sc with "CHEMISTRY, ORGANIC" skip replace sc with "CHEMISTRY, PHYSICAL" skip replace sc with "CLINICAL NEUROLOGY" skip replace sc with "COMMUNICATION" skip replace sc with "COMPUTER SCIENCE, ARTIFICIAL INTELLIGENCE" skip replace sc with "COMPUTER SCIENCE, CYBERNETICS" skip replace sc with "COMPUTER SCIENCE, HARDWARE & ARCHITECTURE" skip replace sc with "COMPUTER SCIENCE, INFORMATION SYSTEMS" skip replace sc with "COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS" skip replace sc with "COMPUTER SCIENCE, SOFTWARE ENGINEERING" skip replace sc with "COMPUTER SCIENCE, THEORY & METHODS" skip replace sc with "CONSTRUCTION & BUILDING TECHNOLOGY" skip replace sc with "CRIMINOLOGY & PENOLOGY" skip replace sc with "CRITICAL CARE MEDICINE" skip replace sc with "CRYSTALLOGRAPHY" skip replace sc with "CULTURAL STUDIES" skip replace sc with "DEMOGRAPHY" skip replace sc with "DENTISTRY, ORAL SURGERY & MEDICINE" skip replace sc with "DERMATOLOGY" skip replace sc with "DEVELOPMENTAL BIOLOGY" skip replace sc with "ECOLOGY" skip replace sc with "ECONOMICS" skip replace sc with "EDUCATION & EDUCATIONAL RESEARCH" skip replace sc with "EDUCATION, SCIENTIFIC DISCIPLINES" skip replace sc with "EDUCATION, SPECIAL" skip replace sc with "ELECTROCHEMISTRY" skip replace sc with "EMERGENCY MEDICINE" skip replace sc with "ENDOCRINOLOGY & METABOLISM" skip replace sc with "ENERGY & FUELS" skip replace sc with "ENGINEERING, AEROSPACE" skip replace sc with "ENGINEERING, BIOMEDICAL" skip replace sc with "ENGINEERING, CHEMICAL" skip replace sc with "ENGINEERING, CIVIL" skip replace sc with "ENGINEERING, ELECTRICAL & ELECTRONIC" skip replace sc with "ENGINEERING, ENVIRONMENTAL" skip replace sc with "ENGINEERING, GEOLOGICAL" skip replace sc with "ENGINEERING, INDUSTRIAL" skip replace sc with "ENGINEERING, MANUFACTURING" skip replace sc with "ENGINEERING, MARINE" skip replace sc with "ENGINEERING, MECHANICAL" skip replace sc with "ENGINEERING, MULTIDISCIPLINARY" skip replace sc with "ENGINEERING, OCEAN" skip replace sc with "ENGINEERING, PETROLEUM" skip replace sc with "ENTOMOLOGY" skip replace sc with "ENVIRONMENTAL SCIENCES" skip replace sc with "ENVIRONMENTAL STUDIES" skip replace sc with "ERGONOMICS" skip replace sc with "ETHICS" skip replace sc with "ETHNIC STUDIES" skip replace sc with "EVOLUTIONARY BIOLOGY" skip replace sc with "FAMILY STUDIES" skip replace sc with "FISHERIES" skip replace sc with "FOOD SCIENCE & TECHNOLOGY" skip replace sc with "FORESTRY" skip replace sc with "GASTROENTEROLOGY & HEPATOLOGY" skip replace sc with "GENETICS & HEREDITY" skip replace sc with "GEOCHEMISTRY & GEOPHYSICS" skip replace sc with "GEOGRAPHY" skip replace sc with "GEOGRAPHY, PHYSICAL" skip replace sc with "GEOLOGY" skip replace sc with "GEOSCIENCES, MULTIDISCIPLINARY" skip replace sc with "GERIATRICS & GERONTOLOGY" skip replace sc with "GERONTOLOGY" skip replace sc with "HEALTH CARE SCIENCES & SERVICES" skip replace sc with "HEALTH POLICY & SERVICES" skip replace sc with "HEMATOLOGY" skip replace sc with "HISTORY" skip replace sc with "HISTORY & PHILOSOPHY OF SCIENCE" skip replace sc with "HISTORY OF SOCIAL SCIENCES" skip replace sc with "HORTICULTURE" skip replace sc with "HOSPITALITY, LEISURE, SPORT & TOURISM" skip replace sc with "IMAGING SCIENCE & PHOTOGRAPHIC TECHNOLOGY" skip replace sc with "IMMUNOLOGY" skip replace sc with "INDUSTRIAL RELATIONS & LABOR" skip replace sc with "INFECTIOUS DISEASES" skip replace sc with "INFORMATION SCIENCE & LIBRARY SCIENCE" skip replace sc with "INSTRUMENTS & INSTRUMENTATION" skip replace sc with "INTEGRATIVE & COMPLEMENTARY MEDICINE" skip replace sc with "INTERNATIONAL RELATIONS" skip replace sc with "LAW" skip replace sc with "LIMNOLOGY" skip replace sc with "LINGUISTICS" skip replace sc with "MANAGEMENT" skip replace sc with "MARINE & FRESHWATER BIOLOGY" skip replace sc with "MATERIALS SCIENCE, BIOMATERIALS" skip replace sc with "MATERIALS SCIENCE, CERAMICS" skip replace sc with "MATERIALS SCIENCE, CHARACTERIZATION & TESTING" skip replace sc with "MATERIALS SCIENCE, COATINGS & FILMS" skip replace sc with "MATERIALS SCIENCE, COMPOSITES" skip replace sc with "MATERIALS SCIENCE, MULTIDISCIPLINARY" skip replace sc with "MATERIALS SCIENCE, PAPER & WOOD" skip replace sc with "MATERIALS SCIENCE, TEXTILES" skip replace sc with "MATHEMATICAL & COMPUTATIONAL BIOLOGY" skip replace sc with "MATHEMATICS" skip replace sc with "MATHEMATICS, APPLIED" skip replace sc with "MATHEMATICS, INTERDISCIPLINARY APPLICATIONS" skip replace sc with "MECHANICS" skip replace sc with "MEDICAL ETHICS" skip replace sc with "MEDICAL INFORMATICS" skip replace sc with "MEDICAL LABORATORY TECHNOLOGY" skip replace sc with "MEDICINE, GENERAL & INTERNAL" skip replace sc with "MEDICINE, LEGAL" skip replace sc with "MEDICINE, RESEARCH & EXPERIMENTAL" skip replace sc with "METALLURGY & METALLURGICAL ENGINEERING" skip replace sc with "METEOROLOGY & ATMOSPHERIC SCIENCES" skip replace sc with "MICROBIOLOGY" skip replace sc with "MICROSCOPY" skip replace sc with "MINERALOGY" skip replace sc with "MINING & MINERAL PROCESSING" skip replace sc with "MULTIDISCIPLINARY SCIENCES" skip replace sc with "MYCOLOGY" skip replace sc with "NANOSCIENCE & NANOTECHNOLOGY" skip replace sc with "NEUROIMAGING" skip replace sc with "NEUROSCIENCES" skip replace sc with "NUCLEAR SCIENCE & TECHNOLOGY" skip replace sc with "NURSING" skip replace sc with "NUTRITION & DIETETICS" skip replace sc with "OBSTETRICS & GYNECOLOGY" skip replace sc with "OCEANOGRAPHY" skip replace sc with "ONCOLOGY" skip replace sc with "OPERATIONS RESEARCH & MANAGEMENT SCIENCE" skip replace sc with "OPHTHALMOLOGY" skip replace sc with "OPTICS" skip replace sc with "ORNITHOLOGY" skip replace sc with "ORTHOPEDICS" skip replace sc with "OTORHINOLARYNGOLOGY" skip replace sc with "PALEONTOLOGY" skip replace sc with "PARASITOLOGY" skip replace sc with "PATHOLOGY" skip replace sc with "PEDIATRICS" skip replace sc with "PERIPHERAL VASCULAR DISEASE" skip replace sc with "PHARMACOLOGY & PHARMACY" skip replace sc with "PHYSICS, APPLIED" skip replace sc with "PHYSICS, ATOMIC, MOLECULAR & CHEMICAL" skip replace sc with "PHYSICS, CONDENSED MATTER" skip replace sc with "PHYSICS, FLUIDS & PLASMAS" skip replace sc with "PHYSICS, MATHEMATICAL" skip replace sc with "PHYSICS, MULTIDISCIPLINARY" skip replace sc with "PHYSICS, NUCLEAR" skip replace sc with "PHYSICS, PARTICLES & FIELDS" skip replace sc with "PHYSIOLOGY" skip replace sc with "PLANNING & DEVELOPMENT" skip replace sc with "PLANT SCIENCES" skip replace sc with "POLITICAL SCIENCE" skip replace sc with "POLYMER SCIENCE" skip replace sc with "PRIMARY HEALTH CARE" skip replace sc with "PSYCHIATRY" skip replace sc with "PSYCHOLOGY" skip replace sc with "PSYCHOLOGY, APPLIED" skip replace sc with "PSYCHOLOGY, BIOLOGICAL" skip replace sc with "PSYCHOLOGY, CLINICAL" skip replace sc with "PSYCHOLOGY, DEVELOPMENTAL" skip replace sc with "PSYCHOLOGY, EDUCATIONAL" skip replace sc with "PSYCHOLOGY, EXPERIMENTAL" skip replace sc with "PSYCHOLOGY, MATHEMATICAL" skip replace sc with "PSYCHOLOGY, MULTIDISCIPLINARY" skip replace sc with "PSYCHOLOGY, PSYCHOANALYSIS" skip replace sc with "PSYCHOLOGY, SOCIAL" skip replace sc with "PUBLIC ADMINISTRATION" skip replace sc with "PUBLIC, ENVIRONMENTAL & OCCUPATIONAL HEALTH" skip replace sc with "RADIOLOGY, NUCLEAR MEDICINE & MEDICAL IMAGING" skip replace sc with "REHABILITATION" skip replace sc with "REMOTE SENSING" skip replace sc with "REPRODUCTIVE BIOLOGY" skip replace sc with "RESPIRATORY SYSTEM" skip replace sc with "RHEUMATOLOGY" skip replace sc with "ROBOTICS" skip replace sc with "SOCIAL ISSUES" skip replace sc with "SOCIAL SCIENCES, BIOMEDICAL" skip replace sc with "SOCIAL SCIENCES, INTERDISCIPLINARY" skip replace sc with "SOCIAL SCIENCES, MATHEMATICAL METHODS" skip replace sc with "SOCIAL WORK" skip replace sc with "SOCIOLOGY" skip replace sc with "SOIL SCIENCE" skip replace sc with "SPECTROSCOPY" skip replace sc with "SPORT SCIENCES" skip replace sc with "STATISTICS & PROBABILITY" skip replace sc with "SUBSTANCE ABUSE" skip replace sc with "SURGERY" skip replace sc with "TELECOMMUNICATIONS" skip replace sc with "THERMODYNAMICS" skip replace sc with "TOXICOLOGY" skip replace sc with "TRANSPLANTATION" skip replace sc with "TRANSPORTATION" skip replace sc with "TRANSPORTATION SCIENCE & TECHNOLOGY" skip replace sc with "TROPICAL MEDICINE" skip replace sc with "URBAN STUDIES" skip replace sc with "UROLOGY & NEPHROLOGY" skip replace sc with "VETERINARY SCIENCES" skip replace sc with "VIROLOGY" skip replace sc with "WATER RESOURCES" skip replace sc with "WOMEN'S STUDIES" skip replace sc with "ZOOLOGY" index on sc to sc go top select 2 use wc do while .not. eof() store upper(trim(wc)) to vwc select 1 seek vwc if found() replace number with number + 1 endif select 2 skip enddo select 1 set index to go top set alternate to wc10.vec set alternate on ? "*Vertices 224" do while .not. eof() ? ltrim(trim(str(number))) skip enddo ? set alternate off set alternate to ** file for PubMed clear all select 2 use au index on nr to nr set alternate to batch.txt set alternate on select 1 use core do while .not. eof() store nr to vnr select 2 seek vnr if nr == vnr store au to vau else stor "" to vau endif vau = strtran(vau,",","") select 1 store trim(so) to vso if "&"$vso store trim(j9) to vso endif ? trim(lower(vso)) + "|" + trim(py) + "|" + trim(vl) + "|" + trim(bp) + "|" + trim(lower(vau)) + "|" + trim(vnr) + "|" skip enddo set alternate off set alternate to ** file for RPYS; July 2013 clear all select 1 use cr index on rpy to rpy select 2 delete file temp.dbf create temp append blank replace field_name with "rpy" replace field_type with "n" replace field_len with 5 append blank replace field_name with "rpys" replace field_type with "n" replace field_len with 9 create rpys2 from temp use temp append blank replace field_name with "median" replace field_type with "n" replace field_len with 9 append blank replace field_name with "quantile" && added Feb. 9, 2015 replace field_type with "n" replace field_len with 7 replace field_dec with 2 create median from temp use rpys2 select 1 vbegin = 1 do while .not. eof() store rpy to vrpy if vrpy = 0 skip loop endif * if vbegin = 1 .and. vrpy > 0 && initial record for time series * select 2 * append blank * replace rpys with 0 * vbegin = int(vrpy/100) * 100 * replace rpy with vbegin * vbegin = 0 * select 1 * endif n = 0 do while rpy == vrpy .and. .not. eof() n = n + 1 skip enddo select 2 append blank replace rpy with vrpy replace rpys with n select 1 enddo *** fill in-between years with zeros select 2 index on rpy to rpy2 vbegin = int(rpy/100) * 100 do while .not. eof() if rpy <> vbegin append blank replace rpy with vbegin, rpys with 0 endif vbegin = vbegin + 1 skip enddo copy to rpys.dbf && sorted on publication year *** medians and differences close data declare amedian[5] use median append from rpys go top do while .not. eof() amedian[1] = rpys store recno() to vrecno skip amedian[2] = rpys skip amedian[3] = rpys skip amedian[4] = rpys skip amedian[5] = rpys asort(amedian) goto vrecno + 2 if .not. eof() replace median with rpys - amedian[3] else exit endif goto vrecno + 1 enddo *** percentiles && Feb. 9, 2015 set console on clear byear = "0000" eyear = str(year(date()),4) TEXT The user can specify a window with an initial year (e.g., 1900) and a last year to be used in the analysis if so wished. Otherwise, the program uses all years within the file. Default values are 0000 for the initial year and the current year, but one can change this here: The initial year and last year themselves will be included. ENDTEXT @ 15,1 SAY "Initial year? " GET byear @ 16,1 SAY "Last year? " GET eyear read byear = val(byear) eyear = val(eyear) delete for rpy < byear delete for rpy > eyear pack index on -rpys to rpys count to vcount go top n = 1 do while .not. eof() replace quantile with (100* (vcount - n)/vcount) + 1/(2 * vcount) n = n + 1 skip enddo clear screen v1 = "N" * @ 15,10 SAY "Do you wish to continue with generating yearcr.dbf? (Y/N) " get v1 * read if upper(v1) = "Y" do yearcr endif *** clear all return