....
/************************************************************/ /** (c) Copyright Velocity Software, Inc. 1990,1994 */ /************************************************************/ /* */ /* ESAMAP/VMPAF Keyword File Conversion Procedure */ /* */ /* Usage: ESAPAFKW [filename [filetype [filemode]]] */ /* */ /* where filename is the name of the output keyword file, */ /* filetype is the type of the output keyword file, */ /* and filemode is the mode of the output keyword file */ /* */ /************************************************************/ Address Command Parse Upper Arg fname ftype fmode rest If rest <> '' Then Do Say 'Extraneous parameters "'rest'" ignored.' End If fname = '' Then fname = 'ESAPAF' If ftype = '' Then ftype = 'KWIC' If fmode = '' Then fmode = 'A' fileid = fname ftype fmode symbols = 'HISTORY KEYWORDS *' 'ESTATE' symbols If RC > 0 Then Do Say "File '"symbols"' not found on disk." Exit RC End 'EXECIO * DISKR' symbols '( STEM SYMBOL. FINIS' If RC > 0 Then Do Say "Error" RC "reading '"symbols"' from disk." Exit RC End v = 0 Do s = 1 To symbol.0 If symbol.s = '' Then Iterate If LEFT(symbol.s,1) <> "'" Then Do Parse Var symbol.s vname . . vtype /* Need 4th token */ Iterate End If LEFT(vname,6) = 'MTRSYS' , | LEFT(vname,6) = 'MTRPRP' , | Pos('-',vtype) > 0 /* An unextractable item */ Then Iterate Parse Var symbol.s "'" vdesc "'" "'" vunits "'" Select When LENGTH(vunits) > 0 Then Do If vunits = ' ' Then Iterate vunits = '(' || vunits || ')' End When WORD(vdesc,1) = 'Percent' Then Do vdesc = SUBWORD(vdesc,2) vdesc = TRANSLATE(LEFT(vdesc,1)) || , SUBSTR(vdesc,2) If FIND(vdesc,'VMDBKs') > 0 , | WORD(vdesc,1) = 'Storage' Then vunits = '(Percent)' Else vunits = '(Percent of time)' End When FIND(vdesc,'per') > 0 Then Do Parse var vdesc vdesc ' per ' vword vunits = '(Number per' vword || ')' End When POS('(',vdesc) > 0 Then Do Parse var vdesc vdesc '(' vword ')' vrest If vrest <> '' Then vdesc = vdesc || vrest Else vdesc = STRIP(vdesc,'T') vunits = '(' || TRANSLATE(LEFT(vword,1)) || , SUBSTR(vword,2) || ')' End When RIGHT(vname,7) = 'SECONDS' Then vunits = '(Seconds)' When POS('I/O',vdesc) > 0 Then vunits = '(Number)' When POS('/',vdesc) > 0 Then Do Parse var vdesc vdesc '/' vword vrest If vrest <> '' Then vdesc = vdesc vrest vword = TRANSLATE(LEFT(vword,1)) || , SUBSTR(vword,2) vunits = '(Number per' vword')' End When RIGHT(vname,4) = '.HDR' Then Do Parse Var vname vname'.HDR' . Call SetHeader If vdesc = '' Then Iterate vname = '' End Otherwise vunits = '(Number)' End v = v + 1 If vname = '' Then vname.v = '***' vdesc Else vname.v = LEFT(vname,33) vdesc vunits End 'ERASE' fileid Queue '**' Queue ' ' 'EXECIO 2 DISKW' fileid If RC > 0 Then Do Say "Error" RC "writing '"fileid"' on disk." Exit RC End 'EXECIO' v 'DISKW' fileid '( FINIS STEM VNAME.' If RC > 0 Then Do Say "Error" RC "writing '"fileid"' on disk." Exit RC End Say "'"fileid"' created from '"symbols"'." Exit /*********************************************/ /* Convert record name to section identifier */ /*********************************************/ SetHeader: Select When vname = 'ACTIVE' Then vdesc = 'Global Active User Data' When vname = 'CONFIG' Then vdesc = 'Input/Output Device Configuration Data' When vname = 'IODCAD' Then vdesc = 'Cache Device Activity Data' When vname = 'IODDEV' Then vdesc = 'Input/Output Device Activity Data' When vname = 'MONITR' Then vdesc = 'Monitor Configuration Data' When vname = 'MTRMEM' Then vdesc = 'Storage Configuration Data' When vname = 'MTRPAG' Then vdesc = 'Paging Configuration Data' When vname = 'MTRSCH' Then vdesc = 'Scheduler Configuration Data' When vname = 'MTRXSG' Then vdesc = 'Expanded Storage Configuration Data' When vname = 'PRCPRP' Then vdesc = 'Processor Activity Data' When vname = 'SCLSTP' Then vdesc = 'Scheduler Timer Pop Data' When vname = 'STOASP' Then vdesc = 'Processor Auxiliary Storage Data' When vname = 'STOBPG' Then vdesc = 'Block Paging Data' When vname = 'STORSG' Then vdesc = 'Global Real Storage Activity Data' When vname = 'STORSP' Then vdesc = 'Processor Real Storage Activity Data' When vname = 'STOXSG' Then vdesc = 'Expanded Storage Management Data' When vname = 'SYTASG' Then vdesc = 'Global Auxiliary Storage Data' When vname = 'SYTCOM' Then vdesc = 'Global Inter-Machine Communication Data' When vname = 'SYTCPC' Then vdesc = 'Channel Path Connection Data' When vname = 'SYTPRP' Then vdesc = 'Processor Data' When vname = 'SYTRSG' Then vdesc = 'Global Real Storage Data' When vname = 'SYTRSP' Then vdesc = 'Processor Real Storage Data' When vname = 'SYTSCG' Then vdesc = 'Global Scheduler Data' When vname = 'SYTSCP' Then vdesc = 'Processor Scheduler Data' When vname = 'SYTSHS' Then vdesc = 'Shared Storage Data' When vname = 'SYTSYP' Then vdesc = 'Processor System Data' When vname = 'SYTUSR' Then vdesc = 'Global User Data' When vname = 'SYTUWT' Then vdesc = 'Global User Wait State Data' When vname = 'SYTXSG' Then vdesc = 'Global Expanded Storage Data' When vname = 'SYTXSP' Then vdesc = 'Processor Expanded Storage Data' When vname = 'TCLASS' Then vdesc = 'Transaction Classification Data' When vname = 'USEINT' Then vdesc = 'User Interaction Data' When vname = 'USETRE' Then vdesc = 'User Transaction End Data' When vname = 'USRACT' Then vdesc = 'User Activity Data' When vname = 'USRCON' Then vdesc = 'User Configuration Data' Otherwise vdesc = '' End Return