Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 19 Using TIBCO Object Service Broker SDK (C/C++) : Sample Application Using the SDK (C/C++)

Sample Application Using the SDK (C/C++)
C Program
The sample program is available in the RCLISAMP member of the C data set distributed with TIBCO Object Service Broker SDK (C/C++).
The RCLIJCL member of the JCL data set distributed with TIBCO Object Service Broker SDK (C/C++) contains JCL to compile and run the sample program.
Rule Called by Program
The TC007113RU02 rule creates an occurrence of the LOG TDS table, generates an end message, and returns a value. On completion of the rule, the changes are not committed because the transaction is still active. The SDK (C/C++) program explicitly stops the transaction by issuing STOPTR with a COMMIT flag or a ROLLBACK flag to indicate whether the changes are to be committed.

 
RULE EDITOR ===> SCROLL: P
TC007113RU02;
_
_ ---------------------------------------------------------------------------
_ ------------------------------------------------------------+--------------
_ TC007113TA01.TEXT = 'RULE "TC007113RU02" IS CALLED'; ¦ 1
_ INSERT TC007113TA01; ¦ 2
_ CALL ENDMSG('END MESSAGE GENERATED BY RULE "TC007113RU02"');¦ 3
_ RETURN('RETURN VALUE OF RULE "TC007113RU02"'); ¦ 4
_ ---------------------------------------------------------------------------
_

 
Table Referenced by a Rule
The table TC007113TA01 is defined as follows:

 
COMMAND==> TABLE DEFINITION
Table: TC007113TA01 Type: TDS Unit: TC07113 IDgen: Y
Source:
Parameter Name Typ Syn Len Dec Class ' Event Rule Typ Acc
---------------- - - --- -- - ' ---------------- - -
_ LOCATION I C 16 0 L ' _
_ ' _
Field Name Typ Syn Len Dec Key Ord Rqd Default Reference
---------------- - - ---- -- - - - ---------------- ----------------
_ KEY I B 4 0 P
_ TEXT S C 50 0
_
_
_
_
_
_
_
_
_
_
PFKEYS: 3=END 12=CANCEL 22=DELETE 13=PRINT 14=FIELDS 21=DATA 2=DOC
New table definition

 
Output from the Program
The out from the program is as follows:

 
STARTSS completed. Session User ID = HURON1
STARTTR completed.
CALLRULE completed, return value: 'RETURN VALUE OF RULE "TC007113RU002"'
Rule end message: 'END MESSAGE GENERATED BY RULE "TC007113RU002"'
STOPTR completed.
STOPSS completed.

 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved