当前位置:首页 > Tuxdo函数说明2
Return value :points to an object that has the same type as the field type
11、Ffprint,Ffprint32 :打印指定Buffer的值到Stream 函数原形:
#include
int Ffprint(FBFR * fbfr, FILE * iop) #include \
int Ffprint32(FBFR32 * fbfr, FILE *iop) 参数说明:
fbfr:a pointer to a given Field Buffer ,指定Buffer的数据指针
iop:输出文件流 a pointer of type FILE that points to the output stream. Return value :如果操作错误返回 –1
12、Fprint,Fprint32:打印指定Buffer的内容到标准输出设备 函数原形:
#include
int Fprint(FBFR * fbfr) #include \
int Fprint32(FBFR32 * fbfr) 参数说明:
fbfr:a pointer to a given Field Buffer ,指定Buffer的数据指针 Return value:如果操作错误返回 –1
13、Ffree,Ffree32:释放Buffer占用的空间 函数原形: #include
int Ffree(FBFR * fbfr) #include \
int Ffree32(FBFR32 * fbfr) 参数说明:
fbfr:a pointer to a fielded buffer Return value :如果操作错误返回 –1
14、Fget,Fget32:从指定的Buffer取得指定Field的指定值 函数原形: #include
int Fget(FBFR *fbfr, FLDID fieldid, FLDOCC oc, char * value, FLDLEN* maxlen) #include \
int Fget32(FBFR32 * fbfr, FLDID32 fieldid, FLDOCC32 oc, char * value,FLDLEN32 * maxlen)
参数说明:
fbfr : a pointer to a given field buffer 指定FML Buffer的指针
fieldid: 指定的字段Field的名称(区分大小写)或ID (field identifier) oc:Buffer中该字段的值的序列
char *value:与Buffer定义中该字段相同内容的对象的指针 maxlen:数据的长度,可以为NULL Return value :如果操作错误返回 –1
15、Fgetlast,Fgetlast32 :Get 指定Buffer中指定字段的最后一个occurrence的值 函数原形:
5 #include
int Fgetlast(FBFR * fbfr, FLDID fieldid, FLDOCC * oc, char * value, FLDLEN* maxlen) #include \
int Fgetlast32(FBFR32 * fbfr, FLDID32 fieldid, FLDOCC32 *oc,char*value,FLDLEN32* maxlen)
参数说明:
fbfr : a pointer to a given field buffer 指定FML Buffer的指针
fieldid: 指定的字段Field的名称(区分大小写)或ID (field identifier) oc:Buffer中该字段的值的序列
char *value:与Buffer定义中该字段相同内容的对象的指针 maxlen:数据的长度,可以为NULL Return value :如果操作错误返回 –1
16、Fldid,Fldid32:根据 field name取得 field identifier 函数原形: #include
FLDID Fldid(char * name) #include \
FLDID32 Fldid32(char * name) 参数说明:
name:字段的名称
Return value:field identifier
17、Fldtype, Fldtype32:根据 field identifier 取得 field type 函数原形: #include
int Fldtype(FLDID fieldid) #include \
int Fldtype32(FLDID32 fieldid) 参数说明:
fieldid:相应Field 的identifier
Return value:the field type 指定Field 的数据类型
18、Fname,Fname32:根据field identifier 取得 field name 函数原形: #include
char * Fname(FLDID fieldid) #include \
char * Fname32(FLDID32 fieldid) 参数说明:
fieldid:一个Field对应的identifier Return value:相应字段的Name
19、Fnext,Fnext32:Get 指定字段的下一个值 函数原形: #include
int Fnext(FBFR * fbfr, FLDID * fieldid, FLDOCC *oc, char *value, FLDLEN* len) #include \
int Fnext32(FBFR32 * fbfr, FLDID32 *fieldid, FLDOCC32 * oc, char * value,
6 FLDLEN32 *len) 参数说明:
fbfr : a pointer to a given field buffer 指定FML Buffer的指针
fieldid: 指定的字段Field的名称(区分大小写)或ID (field identifier) oc:Buffer中该字段的值的序列
char *value:与Buffer定义中该字段相同内容的对象的指针 len:数据的长度,可以为NULL Return value :如果操作错误返回 –1
20、Foccur, Foccur32:Get指定Buffer中指定Field值的个数 函数原形: #include
FLDOCC Foccur(FBFR * fbfr, FLDID fieldid) #include \
FLDOCC32 Foccur32(FBFR32 * fbfr, FLDID32 fieldid) 参数说明:
fbfr:a pointer to a given field buffer 指定FML Buffer的指针
fieldid:指定的字段Field的名称(区分大小写)或ID (field identifier)
21、Fsizeof,Fsizeof32:取得 fielded buffer 的大小 函数原形:
#include
long Fsizeof(FBFR * fbfr) #include \
long Fsizeof32(FBFR32 * fbfr) 参数说明:
fbfr:a pointer to a given field buffer 指定FML Buffer的指针 Return value:FML Buffer中数据所占字节数
22、Fwrite,Fwrite32:写FML Buffer中内容到File Stream中 函数原形: #include
int Fwrite(FBFR * fbfr, FILE * iop) #include \
int Fwrite32(FBFR32 * fbfr, FILE * iop) 参数说明:
fbfr:a pointer to a given field buffer 指定FML Buffer的指针 iop:输出文件流的指针
Return value:如果操作错误返回 –1
(二)调用函数说明:
1、 tpabort 放弃当前事物处理(交易) 函数原形:
#include
int tpabort(long flags) 参数说明:
flags:reserved for future use and should be set to 0 Return value:如果操作错误返回 –1
2、 tpalloc 为各种类型Buffer分配存储空间
7 函数原形:
#include
char * tpalloc(char *type, char *subtype, long size) 参数说明:
type:Buffer的类型名称
subtype:Buffer的sub type 的名称,一般为空 size:为该buffer分配空间的大小,以字节为单位
Return value:a pointer to a buffer of the appropriate type aligned on a long word; 如果错误,返回NULL
3、 tpcall sending service request and awaiting its reply 函数原形:
int tpcall(char *svc, char *idata, long ilen, char **odata, long *olen, long flags) 参数说明:
svc:service name,被请求服务的名称 idata:输入参数数据指针 ilen:入参数据的长度 odata:输出参数数据指针 olen:输出数据的长度 flags:取值: TPNOTRAN TPNOCHANGE TPNOBLOCK TPNOTIME TPSIGRSTRT
4、 tpbegin 开始一个事物处理的过程 函数原形:
#include
int tpbegin(unsigned long timeout, long flags) 参数说明:
timeout:操作超时的时间限制
flags:reserved for future use and must be set to 0. Return value:如果操作错误,返回 –1. 5、 tpcommit 提交一个事物处理 函数原形:
#include
int tpcommit(long flags) 参数说明:
flags:reserved for future use and must be set to 0. Return value:如果操作错误,返回 –1. 6、 tpfree 释放Buffer所占用的存储空间 函数原形:
void tpfree(char *ptr) 参数说明:
ptr:a pointer a given buffer
7、 tpreturn: 结束一个会话,返回相应值 函数原形:
void tpreturn(int rval, long rcode, char *data, long len, long flags) 参数说明:
rval:可以为以下值:
TPSUCCESS:调用的服务成功结束 TPFAIL:服务调用在某个环节出错
TPEXIT:behaves the same as TPFAIL with respect to completing the
8
共分享92篇相关文档