home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
chrchpr2.zip
/
REFCODES.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1987-01-06
|
2KB
|
83 lines
* Program REFCODES - Displays/updates 2-character Ref/Publications codes
Store F to updated
Select primary
Use
Select secondary
*Store d+':REFINDEX' to MFILE
*Store d+':REFINDKW' to MFILENDX
Use &MFILE index &MFILE
ERASE
@ 2,9 say INH
?
?
Store T to morentries
Do while morentries
Accept 'Enter 2-character Ref./Pub. code ("Q"=quit) ' to PUBCODE
Store T to invalid2
Do while invalid2
If len(pubcode)=1 .and. !(PUBCODE)='Q'
Store F to invalid2
Store F to morentries
else
If len(pubcode)<>2
Accept 'Not 2 characters. Please enter again ' to PUBCODE
else
Store '~'+!(PUBCODE) to pubcode1
Store $(pubcode,1,2) to pubcd
Find &pubcode1
If #<>0
Accept 'Duplicate found. Enter again ' to PUBCODE
else
Store F to invalid2
endif
endif
endif
enddo
If morentries
Accept 'Reference / Publication Name ' to keywndx
? 'Now saving Ref./Pub. = ',pubcd,': ',keywndx
Accept 'Ok? ' to XY
If !(XY)='Q'
Store F to invalid2
Store F to morentries
else
If !(XY)='Y'
Store T to updated
Append blank
Replace sourcecode with PUBCODE1
Replace keywordndx with '~'+keywndx
endif
endif
endif
enddo
USE
If updated
USE &MFILE index &MFILENDX
Set talk on
REINDEX
Set talk off
endif
Select secondary
USE
Select primary
Use
Release updated,mfilendx,morentries,invalid2,pubcode1,pubcode,pubcd,keywndx,xy
RETURN
econdary
*Store d+':REFINDEX' to MFILE
*Store d+':REFINDKW' to MFILENDX
Use &MFILE index &MFILE
ERASE
@ 2,9 say INH
?
?
Store T to morentries
Do while morentries
Accept 'Enter 2-character Ref./Pub. code ("Q"=quit) ' to PUBCODE
Store T to invalid2
Do while invalid2
If len(pubcode)=1 .and. !(PUBCODE)='Q'
Store F to invalid2
Store F to morentries