home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
chrchpr2.zip
/
REFREPTS.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1987-01-06
|
5KB
|
179 lines
* Program REFREPTS - makes reports of selected categories of the CROSSREF files
Store T to level2
Do while LEVEL2
Erase
@ 2,1 say 'DATA DISK = '+D
@ 2,60 say curdate
@ 3,20 say ' CROSSREF Reports'
@ 5,9 say '1) Display all/selected Articles in SOURCECODE order'
@ 6,9 say '2) Display all/selected Articles by LOCATION'
@ 7,9 say '3) Print Articles LOCATION report'
@ 8,9 say '4) Display all/selected Articles by TITLE'
@ 9,9 say '5) Print Articles TITLE report'
@ 10,9 say '6) Display all/selected Articles by AUTHOR'
@ 11,9 say '7) Print Articles AUTHOR report'
?
Accept ' Enter selection ' to MSEL
?
Do while @(MSEL,'1234567Qq')=0
Accept ' Invalid selection. Please enter again ' to MSEL
enddo
If !(MSEL)='Q'
Store F to LEVEL2
USE
else
Store 0 to IKEY
Store 0 to IABS
Accept 'Enter selection criteria (<RETURN> = all) ' to scriteria
?
Accept 'Include keywords? ' to XX
If !(XX)='Y'
Store IKEY+5 to IKEY
endif
Accept 'Include Abstracts? ' to XX
If !(XX)='Y'
Store IABS+5 to IABS
endif
Store IKEY+IABS to ISKIP
STORE ' ' TO XX
Use &MFILE
Do case
CASE MSEL='2'.or.MSEL='3'
Store D+':REFLOCAT' to MFILEX
Store 'LOCATION' to XX
CASE MSEL='4'.or.msel='5'
Store D+':REFTITLE' to MFILEX
Store 'TITLE' to XX
CASE MSEL='6'.or.MSEL='7'
Store D+':REFAUTHR' to MFILEX
Store 'AUTHOR' to XX
otherwise
Store MFILE to MFILEX
Store 'SOURCECODE' to XX
endcase
? 'Index file to',XX,'field of',MFILE,'is',MFILEX,'.'
If MSEL<>'1'
Accept 'Is this index file current with the latest data file changes?' to X
If !(X)<>'Y'
? 'Now indexing file ',MFILE,' by ',XX,' field.'
Use &MFILE
Set talk on
Index on &XX to &MFILEX
Set talk off
? 'Indexing is complete.'
?
endif
endif
Use &MFILE index &MFILEX
Store T to beginng
Store T to LEVEL1
If @(msel,'1246')<>0
? ' ',INH,' Report - by',XX,' ',curdate
?
If scriteria=' '
Store 'LEVEL1' to scriteria
else
? ' Selection: ',scriteria
endif
?
?
Do while .not.EOF
If .not. beginng
? $(TITLE,1,54),'LOCATION:',LOCATION
? ' by: ',AUTHOR,' SOURCE:',sourcecode
If IKEY<>0
? ' KEYWORDS - ',keyw1,' ',keyw5
? ' ',keyw2,' ',keyw6
? ' ',keyw3,' ',keyw7
? ' ',keyw4,' ',keyw8
endif
If IABS<>0
? ' ABSTRACT - ',text1
? ' ',text2
? ' ',text3
? ' ',text4
endif
?
SKIP
endif
Store F to beginng
Do while .not. EOF.and..not.(&SCRITERIA)
SKIP
enddo
enddo
else
Store T to beginng
Set format to print
@ 1,9 say INH+' Report - by '+XX+' '+curdate
Store 4 to curline
Store 1 to PN
If scriteria=' '
Store 'LEVEL1' to scriteria
else
@ 3,28 say 'Selection: '+scriteria
Store 6 to curline
endif
Do while .not. EOF
If .not. beginng
If curline > 62-ISKIP
Eject
Store PN+1 to PN
@ 1,9 say INH+' Report - by '+XX+' '+curdate
@ 1,72 say 'Page'+str(PN,4)
Store 4 to curline
endif
@ curline,0 say $(title,1,54)+' LOCATION: '+location
@ curline+1,3 say 'by: '+author
@ curline+1,55 say 'SOURCE: '+$(sourcecode,1,6)+' '+$(sourcecode,7,2)+;
' '+$(sourcecode,9,7)
If IKEY<>0
@ curline+2,3 say 'KEYWORDS - '+keyw1+' '+keyw5
@ curline+3,16 say keyw2+' '+keyw6
@ curline+4,16 say keyw3+' '+keyw7
@ curline+5,16 say keyw4+' '+keyw8
Store curline+4 to curline
endif
If IABS<>0
@ curline+2,3 say 'ABSTRACT - '+text1
@ curline+3,14 say text2
@ curline+4,14 say text3
@ curline+5,14 say text4
Store curline+4 to curline
endif
SKIP
Store curline+3 to curline
endif
Store F to beginng
Do while .not. EOF .and. .not. (&SCRITERIA)
SKIP
enddo
enddo
EJECT
Set format to screen
endif
?
Accept 'End of report. Press <retn> ' to xx
endif
ENDDO
Release XX,MFILEX,IKEY,IABS,ISKIP,X,beginng,SCRITERIA
RETURN
URN
eginng,SCRITERIA,LEVEL1
RETURN
do
If !(MSEL)='Q'
Store F to LEVEL2
USE
else
Store 0 to IKEY
Store 0 to IABS
Accept 'Enter selection criteria (<RETURN> = all) ' to scriteria
?
Accept 'Include keywords? ' to XX
If !(XX)='Y'
Store IKEY+5 to IKEY
endif
Accept