home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of A1200
/
World_Of_A1200.iso
/
programs
/
text
/
heddley
/
archive
/
databaseinfo.rexx
next >
Wrap
OS/2 REXX Batch file
|
1995-02-27
|
3KB
|
59 lines
/* databaseinfo.rexx */
/* by Edd Dumbill */
/* Saturday 02-Jul-94 20:07:16 */
/* scans the database currently being edited by Heddley */
OPTIONS RESULTS /* enable return codes */
OPTIONS FAILAT 6 /* ignore warnings */
SIGNAL ON SYNTAX /* ensure clean exit */
SIGNAL ON FAILURE /* trap Heddley errors */
address 'HEDDLEY.1'
query loaded var isl /* ask if database loaded */
if ~isl then /* if not, then... */
do /* say so, and... */
say "No database loaded." /* quit */
exit
end
options failat 30 /* we stop at nothing! */
'query database var DOG' /* ask for database name */
say 'Database ' DOG
'query master var DOG' /* ask for filename */
say 'Filename ' DOG
'query index var DOG' /* ask for index */
say 'Index ' DOG
say 'Documents...'
say 'Name,Title,TOC,Temp. filename'
curdoc=1 /* number of doc. to scan */
quit=0
do while ~quit /* while not done... */
goto number curdoc /* goto the next doc. */
if RC=0 then /* if no error then */
do
'query current var DNAME' /* ask attributes of doc... */
'query doctitle var DTITLE'
'query doctoc var DTOC'
'query docfilename var DFNAME'
say DNAME','DTITLE','DTOC','DFNAME /* and print them */
curdoc=curdoc+1 /* move on to next doc. */
end
else
quit=1 /* goto failed so must be at end */
end
EXIT /* quit this macro */
SYNTAX: /* ARexx error... */
SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) /* report it... */
EXIT /* exit */
FAILURE: /* Heddley error... */
ERRV=address().LASTERROR /* get name of error var. */
SAY "Error:" VALUE(ERRV) /* report the error */
EXIT /* exit */