!BONOUT3.IPF - from KARCACT7.IPF [6/7/96] with BONOUT2.IPF code [bottom of !file] move to top and new code from KARCACT7.IPF added to allow run through !new bonap data [BONAP96A.ITB]. NO BONAP mapping links BUT adding common names ! and stuff required for new data [combo2, 'pp' exclusion] as extracts from !KARCACT7.IPF code - 7/7/96 - looks like TAES code is NOT present in !the copy of BONOUT2.IPF appended to KARCACT7.IPF - so, inserting now !from copy of KARCACT7.IPF below - TAES stuff now looks ok, added genus common !name grabbing but not working right - check tomorrow-8/7/96 set up fullcom2.itb !using fullmod1.ipf for better access to common names at all ranks - local !name insertion working ok, but now getting win95 crash when old files !deleted-crash problem fixed with 'erase' command - now looking at using !taesall5.itb and saving current bonout3.ipf as bonout3.arc [17/7/96]. !18/7/96-made bontest1.ipf to check taes name output thing and inserted !today - now going to add family common names to fullcom2 using bontest2.ipf !also set up bontest3 for genus names and this works, but none added !1ST USE HERE OF FUNCTION CHKSTR TO MAKE 'PARENTS' STRING - have a problem !with browser choking on formating code in url - using ascii conversion !%3C=< and >=>-later discovered that problem related to unquoted url, set !quotes for the url and changed actual url to normal html - 19/7/96 - now !looking at bringing fwsen1b.itb data into output - see verison [ar1] !for post-fws condition-looks like program is set up to following inital !line output - regardless of rank - with TAES stuff - so, will check fws table !with a pluck at each 'ac' [diferent ranks] if statement and set 'qflag' which !will either be a gif or "" - will then set for output lines BEFORE the TAES !output stuff-stuff from fwsen1b now coming in ok, looking now at getting !ref for listing from fws1date.itb/fws1datf-have some records in fwsen1b with !whenlist as xx, xxx - a problem that was dealt with in fwswwwo1 and inserting !here-20/7/96 - have syn comments working for fws-show source shows blinking !urls to texas maps - going back to %3C/%3E - also will insert a 'spelling' !routine for fws-screwed up and edited the fws name under fwskar1a so don't !have their spelling - will forget for now-had to re-convert for html print !of taes name - see 507 - 22/7 - added 'space' treatment for tex veg url-this !works - now hybrid1 and 'q' field - 23/7 - note from Amy on q field: if !with an 'ac' = presence in NA in question, and with an 'sy' taxonomic placement !uncertain-23/7/96-now looking at special char problem in author's names: !can use chr() to check for special chars - ones that look common are: 130, !(Fee,Hulten), 148 (Love) and, since deal with 'qauthor', might as well convert !' ex ' to italics - this will involve a major change - saving this as !BONOUT3.AR2 !TABLES finish all if inuse("fws1date")=false then;use fws1date with fws1datf;endif if inuse("fwsen1b")=false then;use fwsen1b with fws1btax;endif if inuse("fullcom2")=false then;use fullcom2 with fullcomf,fullcomg,fullcomk;endif if inuse("taesall5")=false then;use taesall5 with taes5tax;endif if inuse("webfam1")=false then;use webfam1 with webfamf;endif if inuse("bonap96a")=false then;use bonap96a;endif !1st portion of bonap96a default bonap96a !DEFINE WORKING MACROS - CAN'T 'ERASE' FROM A PROGRAM ON SHEBA macro bongo erase "bonxx*.htm" macro go perform bonout3 !VARS doit=0;syout=0;qnameid=" ";qtaxid=" ";qfam=" ";gotfile=false combo2="";gengrab="";gcomname="";endstr=0;grabspe=" ";scomname="" flocal="";qspec1="";qspec2="";qspec3="";qvar1="";qvar2="";qvar3="" qssp1="";qssp2="";qssp3="";qgenus="";parent1="";parent2="";parent3="" qflag="";fwsout1a="";fwsout1b="";outline="";date1="";date2="";fwsnum=0 fwssyn=" ";fwsvar=0;fwsssp=0;fwsname=" ";fwsoutc="";texoutc="";xgen#=0 xhyb#=0;quest="";autex=0;aut148=0;aut130=0;qauthor="";qauthor1="" qauthor2="";qauthor3="" newgen=true !THIS ONLY NEED FOR 1ST RECORD qindent=0 !THIS TO TRACK
" !END OF TOP default bonap96a;obtain next !GO BY FAMILY RECORD AND GET 1ST GENUS !MAIN PRINTING LOOP while doit=0 do !OUTPUT COMMANDS if bonap96a.rankcode=1 and bonap96a.concode ne "pp" then !OUTPUT GENUS LINE !GET COMMON NAME FOR GENUS grabgen=bonap96a.genus;default fullcom2;pluck grabgen using "fullcomg.ind" if #found=true then !CHECK FOR PRESENCE OF COMMON NAME glocal=trim(fullcom2.gcomname) gcomname=" - "+trim(glocal) else gcomname="" endif grabgen="";endstr=0 default bonap96a !RESET INDENTS IF USED IN PRIOR LINES if qindent=1 then;?"
"
if comname ne "none" then
fwsout1a="Listed by the U.S. FWS as endangered, FWS local name is "+trim(comname)+""
fwsout1b="and the FWS range is: "+trim(hrange)+"."+outline
else
fwsout1a="Listed by the U.S. FWS as endangered."
fwsout1b=" The FWS range of distribution is: "+trim(hrange)+"."+outline
endif
endif
if fwsen1b.status="t" then
qflag="
"
if comname ne "none" then
fwsout1a="Listed by the U.S. FWS as threatened, FWS local name is "+trim(comname)+""
fwsout1b="and the FWS range is: "+trim(hrange)+". "
else
fwsout1a="Listed by the U.S. FWS as threatened."
fwsout1b=" The FWS range of distribution is: "+trim(hrange)+". "
endif
endif
endif
default bonap96a
else
qflag="";fwsout1a="";outline="";fwsout1b=""
default bonap96a
endif
!TRACK TAXONID HERE WITH QTAXID AND UL BREAKS WITH qindent
if bonap96a.rankcode=2 and bonap96a.concode="ac" then !NEW SPECIES - RESET
if qindent = 1 then;?"";qindent=0;endif
if qindent = 2 then;?"";qindent=0;endif
!INSERT CHECK FOR QFIELD - 23/7/96 - AND FILL VAR 'QUEST'
if qfield ne " " then
quest=" (NOTE: Presence in the North American flora not certain. Please contact BONAP if vouchered records are available.)"
else
quest=""
endif
!INSERT HYBRID1 CHECK
if bonap96a.hybrid1 ne " " then
!CONVERT PARENT STRING FOR HYBRIDS
parent1=chstr(parents," X "," X ")
parent2=chstr(parent1,"[","[")
parent3=trim(chstr(parent2,"]","]"))
?"X "+trim(bonap96a.species)+" "+trim(qauthor)+" "+parent3+""+quest parent1="";parent2="";parent3="" !CLEAR xhyb#=xhyb#+1 !ADVANCE INTERGENRIC HYBRID 'SPECIES' COUNT syout=0; if bonap96a.taxonid ne qtaxid then taesok=1 endif qtaxid=bonap96a.taxonid else if bonap96a.hybrid2 = " " then ?"
"+qflag+trim(bonap96a.species)+" "+trim(qauthor)+""+quest SPE#=SPE#+1 !ADVANCE SPECIES COUNT else !CONVERT PARENT STRING FOR HYBRIDS parent1=chstr(parents," X "," X ") parent2=chstr(parent1,"[","[") parent3=trim(chstr(parent2,"]","]")) ?"
X "+trim(bonap96a.species)+" "+trim(qauthor)+" "+parent3+""+quest parent1="";parent2="";parent3="" !CLEAR hyb#=hyb#+1 !ADVANCE HYBRID COUNT endif syout=0; if bonap96a.taxonid ne qtaxid then taesok=1 endif qtaxid=bonap96a.taxonid endif !END OF STANDARD/INTERSPECIFIC HYBRID CHECK endif !END OF HYBRID1 CHECK !DEAL WITH LEVEL 3 INFRA if bonap96a.rankcode=3 and bonap96a.concode="ac" then infra#=infra#+1 !ADVANCE INFRA COUNT !INSERT CHECK FOR QFIELD - 23/7/96 - AND FILL VAR 'QUEST' if qfield ne " " then quest=" (NOTE: Presence in the North American flora not certain. Please contact BONAP if vouchered records are available.)" else quest="" endif if qindent=0 then qindent=1;taesok=1;?"
"+qflag+trim(bonap96a.inrank1)+". "+trim(bonap96a.inname1)+" "+trim(qauthor)+""+quest syout=0;taesok=1 else ?"
"+qflag+trim(bonap96a.inrank2)+". "+trim(bonap96a.inname2)+" "+trim(qauthor)+""+quest syout=0;taesok=1 endif if bonap96a.taxonid ne qtaxid then taesok=1 endif qtaxid=bonap96a.taxonid endif !DEAL WITH LEVEL 4 INFRA - NO 'Q' RECORDS if bonap96a.rankcode=4 and bonap96a.concode="ac" then infra#=infra#+1 !ADVANCE INFRA COUNT if qindent=0 then qindent=1;taesok=1;?"
"+qflag+trim(bonap96a.inrank2)+". "+trim(bonap96a.inname2)+" "+trim(qauthor)+"" syout=0;taesok=1 if bonap96a.taxonid ne qtaxid then taesok=1 endif qtaxid=bonap96a.taxonid endif !DEAL WITH TAES DATA - USING TAESOK TO TAG FOR OUTPUT HERE if taesok=1 and qtaxid ne " " then default taesall5;pluck qtaxid if #found=true then !HAVE DATA IN taesall5 tex#=tex#+1 !CLEAR TAES REG VARS regfill=0;regstr1=" ";regstr2=" ";regstr3=" ";regstr4=" " regstr5=" ";regstr6=" ";regstr7=" ";regstr8=" ";regstr9=" " regstr10=" ";regstrt=" " !SERIES OF IFS THAT FILL REGION AREA MAP LINK TAG [regstrt] if reg1 ne 0 then regstrt="1" else regstr1="" regstrt=" " endif if reg2 ne 0 then regstr2="2" if regstrt ne " " then regstrt=regstrt+","+regstr2 else regstrt=regstr2 endif else regstr2="" endif if reg3 ne 0 then regstr3="3" if regstrt ne " " then regstrt=regstrt+","+regstr3 else regstrt=regstr3 endif else regstr3="" endif if reg4 ne 0 then regstr4="4" if regstrt ne " " then regstrt=regstrt+","+regstr4 else regstrt=regstr4 endif else regstr4="" endif if reg5 ne 0 then regstr5="5" if regstrt ne " " then regstrt=regstrt+","+regstr5 else regstrt=regstr5 endif else regstr5="" endif if reg6 ne 0 then regstr6="6" if regstrt ne " " then regstrt=regstrt+","+regstr6 else regstrt=regstr6 endif else regstr6="" endif if reg7 ne 0 then regstr7="7" if regstrt ne " " then regstrt=regstrt+","+regstr7 else regstrt=regstr7 endif else regstr7="" endif if reg8 ne 0 then regstr8="8" if regstrt ne " " then regstrt=regstrt+","+regstr8 else regstrt=regstr8 endif else regstr8="" endif if reg9 ne 0 then regstr9="9" if regstrt ne " " then regstrt=regstrt+","+regstr9 else regstrt=regstr9 endif else regstr9="" endif if reg10 ne 0 then regstr10="10" if regstrt ne " " then regstrt=regstrt+","+regstr10 else regstrt=regstr10 endif else regstr10="" endif !HAVE MAPPING DATA, NOW FOR NAMES-17/7/96-BLOCKED BELOW TO USE TAES NAMES !FOR NEW VERSION-this code taken from bontest1.ipf [sheba] !NEW NAME TAG FOR MAPS - GENUS+SPECIES+AUTHOR TO TEXOUT if match(genus," ") ne 0 then !CATCH THOSE WITH NO AUTHOR qgenus="%3Ci%3E"+substr(genus,1,1)+locase(substr(genus,2,(match(genus," ")-1))) else qgenus="%3Ci%3E"+substr(genus,1,1)+locase(trim(genus)) endif !ROUTINE BELOW TAKEN FROM BONTEST1.IPF [TEST PROGRAM] !TRIM 1ST LETTER AND PERIOD FROM SPECIES NAME qspec1=substr(species,match(species,". ")+2,len(trim(species))) !EXTRACT NAME FROM QSPEC1 AND END ITALICS qspec2=substr(qspec1,1,match(qspec1," ")-1)+"%3C/i%3E" !EXTRACT SPECIES AUTHOR FROM QSPEC1 qspec3=substr(qspec1,match(qspec1," "),len(trim(qspec1))-match(qspec1," ")+1) texout=trim(qgenus)+" "+qspec2+qspec3 !FORM OUTPUT STRING-ADD TO THIS IF INFRA qgenus="";qspec1="";qspec2="" !CLEAR BUILDER STRINGS !NEW NAME TAG FOR MAPS - VARIETY+AUTHOR TO TEXOUT if taesall5.variety ne " " then !TRIM 1ST 4 AND PERIOD FROM VARIETY NAME qvar1=substr(variety,match(variety,". ")+2,len(trim(variety))) !EXTRACT NAME FROM QVAR1 AND END ITALICS-MIGHT *NOT* BE AN AUTHOR if match(qvar1," ") ne 0 then haveauth=true qvar2=" var. %3Ci%3E"+substr(qvar1,1,match(qvar1," ")-1) else qvar2=" var. %3Ci%3E"+trim(qvar1) endif !EXTRACT SPECIES AUTHOR FROM QSPEC1 - IF ONE IS PRESENT if haveauth=true then qvar3="%3C/i%3E"+substr(qvar1,match(qvar1," "),len(trim(qvar1))-match(qvar1," ")+1) else qvar3="%3C/i%3E" endif texout=texout+qvar2+qvar3 !FORM OUTPUT STRING-ADD TO THIS IF INFRA qvar1="";qvar2="";qvar3="";haveauth=false !CLEAR BUILDER STRINGS endif !NEW NAME TAG FOR MAPS - SUBSPECI+AUTHOR TO TEXOUT if taesall5.subspeci ne " " then !TRIM 1ST 4 AND PERIOD FROM subspeci NAME qssp1=substr(subspeci,match(subspeci,". ")+2,len(trim(subspeci))) !EXTRACT NAME FROM qssp1 AND END ITALICS-MIGHT *NOT* BE AN AUTHOR if match(qssp1," ") ne 0 then haveauth=true qssp2=" ssp. %3Ci%3E"+substr(qssp1,1,match(qssp1," ")-1) else qssp2=" ssp. %3Ci%3E"+trim(qssp1) endif !EXTRACT SPECIES AUTHOR FROM QSPEC1 - IF ONE IS PRESENT if haveauth=true then qssp3="%3C/i%3E"+substr(qssp1,match(qssp1," "),len(trim(qssp1))-match(qssp1," ")+1) else qssp3="%3C/i%3E" endif texout=texout+qssp2+qssp3 !FORM OUTPUT STRING-ADD TO THIS IF INFRA qssp1="";qssp2="";qssp3="";haveauth=false !CLEAR BUILDER STRINGS endif !READY TO PRINT TAES STUFF if taesall5.KARTAX#=taesall5.karnam# then if taesall5.commonna ne " " then ?"Present in the Texas flora and known locally as: "+trim(taesall5.commonna)+"" else ?"Present in the Texas flora, local name unknown." endif !DEAL WITH SPACES - 22/7/96 - TAKING TO TEXOUT TEXOUTC FOR URL PRINT texout1=chstr(texout," ","+") texout2=chstr(texout1," ","+") texout3=chstr(texout2," ","+") texout4=chstr(texout3," ","+") texout5=chstr(texout4," ","+") texout6=chstr(texout5," ","+") texout7=chstr(texout6," ","+") texout8=chstr(texout7," ","+") texout9=chstr(texout8," ","+") texoutc=chstr(texout9," ","+") else !CONVERT TEXOUT TO PRINTABLE HTML AS TEXOUTB-CHSTR ONLY WORKS ONCE !SO TRYING SERIES OF 6 STEPS texout1=chstr(texout,"%3C","<") texout2=chstr(texout1,"%3C","<") texout3=chstr(texout2,"%3C","<") texout4=chstr(texout3,"%3C","<") texout5=chstr(texout4,"%3C","<") texouta=chstr(texout5,"%3C","<") texout1=chstr(texouta,"%3E",">") texout2=chstr(texout1,"%3E",">") texout3=chstr(texout2,"%3E",">") texout4=chstr(texout3,"%3E",">") texout5=chstr(texout4,"%3E",">") texoutb=chstr(texout5,"%3E",">") !DEAL WITH SPACES - 22/7/96 - TAKING TO TEXOUT TEXOUTC FOR URL PRINT texout1=chstr(texout," ","+") texout2=chstr(texout1," ","+") texout3=chstr(texout2," ","+") texout4=chstr(texout3," ","+") texout5=chstr(texout4," ","+") texout6=chstr(texout5," ","+") texout7=chstr(texout6," ","+") texout8=chstr(texout7," ","+") texout9=chstr(texout8," ","+") texoutc=chstr(texout9," ","+") !PRINT ?"Present in the Texas flora (treated as "+texoutb if taesall5.commonna ne " " then ?"by Hatch et al, 1990) and known locally as: "+trim(taesall5.commonna)+"" else ?"by Hatch et al, 1990)" endif endif if regstrt ne " " regstrt="reg="+regstrt !ADJUST TO INCLUDE PROPER TAG ?"(Texas Distribution by vegetation zone)" else ?"No Texas distribution data available" endif endif !END OF TAES CHECK texout="";texouta="";texoutb="";texoutc="";taesok=0 endif !END OF TAESOK IF !PRINT FWS STUFF if fwsout1a ne "" and fwssyn=" " then ?fwsout1a;?fwsout1b;?fwsoutc;fwsnum=fwsnum+1 endif if fwsout1a ne "" and fwssyn ne " " then ?fwsout1a;?fwsout1b ?fwssyn;?fwsoutc;fwsnum=fwsnum+1 endif !CONTINUE WALK THROUGH TABLE default bonap96a;taesok=1 !18/6 to 0 for test obtain next !ROUTINE TO AVOID ALL RECORDS WITH CONCODE=PP TEST bonap96a.concode CASE "ac": taxlimit=1 CASE "sy": taxlimit=1 OTHERWISE: taxlimit=0 ENDTEST while taxlimit=0 do if bonap96a.concode = "ac" then;taxlimit=1;endif if bonap96a.concode = "sy" then;taxlimit=1;endif obtain next if pastend(bonap96a)=true then;doit=1;break;endif if taxlimit ne 0 then;obtain prior;break;endif endwhile !END CONCODE 'PP' BY PASS ROUTINE !IF NEW FAMILY, END PAGE AND SET UP ANOTHER PAGE FOR THE NEW FAMILY if bonap96a.rankcode = 0 then !END OLD PAGE ?"
"
!END OF TOP
obtain next !ADVANCE TO 1ST NEW GENUS RECORD
endif
!END NEW FAMILY MOVES, INCLUDING ADVANCE TO NEXT RECORD [1ST GENUS]
if bonap96a.rankcode gt 1 then
!DON'T THINK MAP ID USED NOW [23/7/96], BUT WILL KEEP FOR NOW
mapid=bonap96a.taxonid
!CONVERT ALL AUTHORS AT THIS POINT - ALL OUPUT NOW [23/7/96] = QAUTHOR
qauthor=""
autex=match(bonap96a.author," ex ")
aut130=match(bonap96a.author,chr(130))
aut148=match(bonap96a.author,chr(148))
if autex+aut130+aut148 ne 0 then !DO AS A SEQUENCE TO COVER COMBOS
if autex ne 0 then
qauthor1=chstr(bonap96a.author," ex "," ex ")
else
qauthor1=trim(bonap96a.author)
endif
if aut130 ne 0 then
qauthor2=chstr(qauthor1,chr(130),"é")
else
qauthor2=trim(qauthor1)
endif
if aut148 ne 0 then
qauthor3=chstr(qauthor2,chr(148),"ö")
else
qauthor3=trim(qauthor2)
endif
qauthor=trim(qauthor3)
else !NO SPECIAL CHARS/ITALICS
qauthor=trim(bonap96a.author)
endif
endif
!STOP AT END
if pastend(bonap96a)=true then;doit=1;endif
!LIMIT FOR TESTING - BLOCK FOR FULL RUN
!if currec(bonap96a) gt 900 then;doit=1;endif
if doit ne 0 then;break;endif
!SLOW FOR LOOK - BLOCK FOR FULL RUN - BELOW
!sleep(1)
!CLEAR VARS
qnameid=" ";qtaxid=" ";qfam=" ";texout=" ";haveauth=false;qflag="";fwsout1a=""
outline="";fwsout1b="";fwsoutc="";texoutc="";quest=""
endwhile
!END OF LAST PAGE
?"
"
!GENERATE DOC FILE - BONXXDOC.HTM
e.odsk=false;#dskout="bonxxdoc.htm";e.odsk=true;etime=time()
!PRINT TOP OF PAGE
?""
?"
" ?"The program acts on a data table carrying data for BONAP taxa - BONAP96A.ITB. " ?"Starting with the first record, it proceeds to move through the data table, " ?"keying on internal BONAP code fields and name strings to produce appropriate " ?"HTML code to allow a rough replication of BONAP listings as they appear " ?"in hardcopy (1994 - Volume 1 - Checklist). These listings form the foundation for " ?"placement of additional information within a structured context.
This process is demonstrated in this version " ?"by 'plucking' BONAP 'common name' data from FULLCOM2.ITB using family and genus" ?"name indices [FULLCOMG.IND, FULLCOMF.IND]. Another 'data layer' is produced by programmed reference to " ?"a data table (taesall5.ITB) that contains informaton present in the " ?"Checklist of the " ?"Vascular Plants of Texas (1990). These data, now being updated and proofed, allow mapped distribution " ?"by Texas vegetaton zones, inclusion of local names, and some information on " ?"differences among plant names used by national vs. Texas checklists. We are currently " ?"working to refine this last item. A final data layer for the current version of BONOUT3.IPF" ?"involves the data tables FWSEN1B.ITB and FWS1DATE.ITB and indices. These carry data " ?"obtained from a delimited ASCII file available through the U.S. FWS server. These data are 'registered' " ?"to the BONAP system and thereby tapped when a matching taxon id code is encountered as the program " ?"moves through the primary nomenclatural table, BONAP96A.ITB." ?"
The program, written by Hugh Wilson, is designed to allow access to additional " ?"data sources. Information on Texas endemics and U. S. Fish and Wildlife 'candidate' taxa " ?"will be available soon. A modification of code developed here will be used to produce " ?"a full file index that will allow various queries, as opposed to straight family listings.
" ?"