subroutine create_dict_equates( Table ) begin condition pre: post: end condition $insert logical $insert rlist_equates $insert dict_equates $insert msg_equates declare function msg, utility equ CrLf$ to char(13):char(10) open 'DICT.':Table to EquTable else void = msg( '', 'Unable to open dict.':Table ) return 0 end open 'SYSPROCS' to SysProcsTable else void = msg( '', 'Unable to open sysprocs table.' ) return 0 end LineNumber = 1 Statment = 'SELECT DICT.':Table:' WITH F1 = "F" BY FMC' rlist( Statment, target_activelist$, '', '', '' ) if @list.active then EquRecord = '' Eof = false$ loop readnext DictId else Eof = true$ until Eof read DictRec from EquTable, DictId then if DictRec then LineNumber += 1 EquRecord = 'equ ':Table:'_':DictId:'$ to ':DictRec end end repeat if EquRecord then Heading = '* Equates for ':Table:' created on ':OCONV(DATE(),'D2/'):' ':OCONV(TIME(),'MTH') EquRecord = Heading:@fm:EquRecord write EquRecord on SysProcsTable, Table:'_EQU*':@appid<1> else void = msg( '', 'Unable to write ':Table:'_EQU in the sysprocs table.' ) return 0 end MsgRec = '' MsgRec = Table:'_EQU constants have been created':CrLf$:' in the sysprocs table for the ':@appid<1>:' application.' MsgRec = '!' Void = msg( '', MsgRec ) end end return 0