53 lines
1.5 KiB
Plaintext
53 lines
1.5 KiB
Plaintext
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<dict_column_no$> then
|
|
LineNumber += 1
|
|
EquRecord<LineNumber> = 'equ ':Table:'_':DictId:'$ to ':DictRec<dict_column_no$>
|
|
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<mtext$> = Table:'_EQU constants have been created':CrLf$:' in the sysprocs table for the ':@appid<1>:' application.'
|
|
MsgRec<micon$> = '!'
|
|
Void = msg( '', MsgRec )
|
|
end
|
|
end
|
|
return 0
|
|
|
|
|