OSF DCE Application Development Guide--Core Components

Using the DCE Serviceability Application Interface
4.1.2.2 Processing the sams File
The entire sams file for the hello_svc program is as follows:
# Part I
component hel
table hel_msg_table
# Part II
serviceability table hel_svc_table handle hel_svc_handle
start
subcomponent hel_s_main "main" hel_i_svc_main
end
# Part III
start
code hel_s_hello
subcomponent hel_s_main
attributes "svc_c_sev_notice | svc_c_route_stderr"
text "Hello World"
explanation "?"
action "None required."
end
# Part IIIa
start !intable undocumented
code hel_i_svc_main
text "hello_svc main"
end
We create the file with these contents and name it hel.sams. It can be processed with the
simple command that follows:
sams hel.sams
Running the command as shown will result in ten files being created:
dcehel.cat XPG4 message catalog file created by gencat. If you wish to
use the message catalog, you must install it yourself. Its proper
location is platform dependent.
dcehel.msg Message input file for gencat.
dcehelmac.h Defines convenience macros for use with the serviceability
interface to write serviceability messages.
dcehelmsg.c Code defining the in-memory table of message texts. By using
this table, you can avoid depending on extracting message texts
from the message catalog.
dcehelmsg.h Header file containing definitions for dcehelmsg.c.
124245 Tandem Computers Incorporated 47