z/OS Unicode Services User's Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Using the C interface

z/OS Unicode Services User's Guide and Reference
SA38-0680-00

This topic describes the syntax in C for calling the stub routine CUNLBIDI or CUN4LBID (bidi). Mapping of the parameter area is supplied by the header file cunhc.h listed in Mapping of parameters in C.

#include<cunhc.h>
#define SLEN 1024
#define WLEN 4096
#define TLEN 4096
.....
unsigned char Sourcebuffer [SLEN];
unsigned char Workbuffer   [WLEN];
unsigned char Targetbuffer [TLEN];


#ifdef _LP64        /* 64 bit */
CUN4BBPR myparm ={CUN4BBPR_DEFAULT};
#else               /* 31 bit */
CUNBBPRM myparm ={CUNBBPRM_DEFAULT};
#endif

Myparm.Src_Buf_Ptr  = Sourcebuffer;
Myparm.Wrk_Buf_Ptr  = Workbuffer;
myparm.Targ_Buf_Ptr = Targetbuffer;
Myparm.Src_Buf_Len  = SLEN;
Myparm.Wrk_Buf_Len  = WLEN;
myparm.Targ_Buf_Len = TLEN;
Myparm.ccsid_src    = 1200;
Myparm.ccsid_trt    = 425;

#ifndef _LP64        /* 31 bit */
CUNLBIDI(&myparm);
#else                /* 64 bit */
CUN4LBID(&myparm);
#endif

if((myparm.Return_Code != CUN_RC_OK)......

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014