home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
chrchpr2.zip
/
REFERNTR.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1987-01-06
|
6KB
|
187 lines
* Program REFERNTR - Allows operator entry of new Article References
Set talk off
USE
SELECT PRIMARY
Store F to INDEXUPD
*Store d+':REFERNCE' to MFILE
Use &MFILE index &MFILE
Select secondary
*Store d+':REFINDEX' to MFILE1
*Store d+':REFINDKW' to MFILE3
Use &MFILE1 index &MFILE1
Store 'JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC' TO MONTHS
Store 'Y' to continu
Do while !(continu)='Y'
Select secondary
Store ' ' to INTITLE
Store INTITLE TO INTEXT1
STORE INTEXT1 TO INTEXT2
STORE INTEXT1 TO INTEXT3
STORE INTEXT1 TO INTEXT4
STORE ' ' TO SOURCECODE
STORE ' ' TO DATE
STORE ' ' TO PUBCODE
STORE 'p ' TO PAGEID
STORE ' ' TO INDATE
STORE ' ' TO INAUTHOR
Store ' ' to inlocatn
SET COLON OFF
Store T to NOGOOD
Do while NOGOOD
Erase
@ 1,17 say INH
@ 4,10 say 'TITLE :' GET INTITLE
@ 4,78 SAY ':'
@ 5,10 say 'AUTHOR :' get inauthor
@ 5,38 say ': LOCATION :' get inlocatn
@ 5,64 say ':'
@ 6,10 say 'SOURCE - pu mmm dd yy page'
@ 7,19 say ':' get PUBCODE
@ 7,22 say '-' get indate
@ 7,34 get PAGEID
@ 7,38 say ": pu=publication, mmm=month (3 char's)"
@ 8,43 say 'dd=day, yy=year, page=page number '
READ
If intitle='Q' .or. intitle=' '
STORE 'N' TO CONTINU
STORE F TO NOGOOD
else
If $(indate,7,3)=' '
Store $(indate,1,4)+' '+$(indate,5,2) to indate
endif
STORE !($(INDATE,1,3)) TO INMONTH
STORE 1 TO X1
DO WHILE $(MONTHS,X1,3)<>INMONTH .AND. X1<36
STORE X1+3 TO X1
ENDDO
Store (X1+2)/3 to X1
IF X1=13
ACCEPT 'INVALID MONTH NAME. PLEASE ENTER AGAIN (Press <retn>) ' to xx
else
Store '~'+pubcode to pubcodex
Find &pubcodex
Store pubcode+'-'+$(indate,1,3)+$(indate,5,2)+$(indate,8,2)+' '+;
pageid to insource
If # = 0
Accept 'Reference/Publication code not found. Enter it as new? ' to XX
If !(XX)='Y'
Accept ' Enter the Reference / Publication Name ' to keywndx
? 'Now saving Ref./Pub. = ',pubcode,': ',keywndx
Append blank
Replace sourcecode with '~'+pubcode
Replace keywordndx with '~'+keywndx
Store F to NOGOOD
endif
If !(XX)='Q'
Store f to NOGOOD
Store 'N' to continu
endif
else
Store F to NOGOOD
endif
endif
ENDIF
enddo
If !(continu)='Y'
Clear gets
Store ' ' to keyword1
Store keyword1 to keyword2
Store keyword1 to keyword3
Store keyword1 to keyword4
Store keyword1 to keyword5
Store keyword1 to keyword6
Store keyword1 to keyword7
Store keyword1 to keyword8
Store ' ' to keyword9
Set colon on
@ 9,0 say ' ABSTRACT ' get intext1
@ 10,12 get intext2
@ 11,12 get intext3
@ 12,12 get intext4
@ 14,1 say 'KEYWORDS ' GET KEYWORD1
@ 14,34 SAY ' '
@ 15,12 GET KEYWORD2
@ 15,34 SAY ' '
@ 16,12 GET KEYWORD3
@ 16,34 SAY ' '
@ 17,12 GET KEYWORD4
@ 17,34 SAY ' '
@ 14,40 GET KEYWORD5
@ 15,40 GET KEYWORD6
@ 16,40 GET KEYWORD7
@ 17,40 GET KEYWORD8
READ
ACCEPT 'Press <RETURN> to record this new entry, or enter "Q" to bypass ' to XX
If !(XX)<>'Q'
Select primary
Store T to nogood
Do while nogood
Store F to nogood
Find &insource
If #<>0
? 'Duplicate source code found -',insource
Accept 'Do you want to change it? ' to XX
?
If !(XX)='Y'
@ 23,10 say 'SOURCE CODE ' GET insource
READ
Store T to nogood
else
If !(XX)='Q' .or.!(XX)=' '
Store F to nogood
else
Store T to nogood
endif
endif
endif
enddo
If !(XX)<>'Q'
Append blank
Replace date:in with $(date(),7,2)+'/'+$(date(),1,3)+$(date(),4,2)
Replace title with intitle
Replace author with inauthor
Replace text1 with intext1
Replace text2 with intext2
Replace text3 with intext3
Replace text4 with intext4
Replace keyw1 with keyword1
Replace keyw2 with keyword2
Replace keyw3 with keyword3
Replace keyw4 with keyword4
Replace keyw5 with keyword5
Replace keyw6 with keyword6
Replace keyw7 with keyword7
Replace keyw8 with keyword8
Replace sourcecode with insource
Store '1' to XX
Store 1 to X1
Select secondary
Store T to INDEXUPD
Do while keyword&XX<>' '
Append blank
Replace sourcecode with insource
Replace keywordndx with keyword&XX
Store X1+1 to X1
Store str(X1,1) to XX
enddo
endif
endif
Accept 'Another? ' to continu
endif
ENDDO
If INDEXUPD
? 'Now re-indexing file',MFILE1,'by key word.'
Select secondary
USE &MFILE1 index &MFILE3
REINDEX
endif
USE
Release keyword1,keyword2,keyword3,keyword4,keyword5,keyword6,keyword7,keyword8
Release keyword9,continu,intext1,intext2,intext3,intext4,intext,pubcodex,nogood
Release notbegin,intitle,continu,ina,inn,months,insource,keywndx,st,sourcecode
Release keyw1,keyw2,keyw3,keyw4,keyw5,keyw6,keyw7,keyw8,text1,text2,text3,text4
Release MFILE1,MFILE3,date,pubcode,pageid,indate,X1,inmonth,inauthor,sourcecode
Release pageid,indxupd
RETURN
Y Steinbrenner Perry