* XPORTMSG.SPT - Generate VMS Message Definition Modules from XPORT.REQ base_value = TABLE( 8 ) base_value< 'XPO_OK' > = '0' base_value< 'XPO_WARN' > = '^X1000@-3' base_value< 'XPO_ERROR' > = '^X2000@-3' base_value< 'XPO_FATAL' > = '^X4000@-3' base_value< 'STR_OK' > = '^X800@-3' base_value< 'STR_WARN' > = '^X1800@-3' base_value< 'STR_ERROR' > = '^X2800@-3' base_value< 'STR_FATAL' > = '^X4800@-3' severity = TABLE( 4 ) severity< 'OK' > = 'SUCCESS' severity< 'WARN' > = 'WARNING' severity< 'ERROR' > = 'ERROR' severity< 'FATAL' > = 'FATAL' input_name = IDENT(input_name) 'XPORT.REQ' INPUT( 'input', 1, input_name ) xport_name = 'XPORT.MSG' OUTPUT( 'XPO', 2, xport_name ) string_name = 'STRING.MSG' OUTPUT( 'STR', 3, string_name ) skip image = TRIM(input) :F(END) image FENCE ' XPO$K_VMS_CODE = ' BREAK(',') . xport_number + :F(skip) xport_header XPO = '.TITLE XPORT Messages' XPO = '.FACILITY XPO, ' xport_number ' /SYSTEM' read image = TRIM(input) :F(done) image FENCE ' STR$K_VMS_CODE = ' BREAK(',') . string_number + :S(string_header) image FENCE ' $' ARB . class '_CODE =' :S(new_class) image FENCE SPAN(' ') '( ' BREAK(',') . msg_name + SPAN(", '") BREAK("'") . msg_text :S(message) image 'STR$_NORMAL' :S(done)F(read) string_header STR = '.TITLE STRING Messages' STR = '.FACILITY STR, ' string_number ' /SYSTEM' :(read) new_class class BREAK('_') . file_name LEN(1) REM . type $file_name = '.SEVERITY ' severity< type > $file_name = '.BASE ' base_value< class > :(read) message $file_name = msg_name ' <' msg_text '>' :(read) done XPO = '.END' STR = '.END' TERMINAL = 'XPORT.MSG created' TERMINAL = 'STRING.MSG created' END