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 is the call syntax in C for calling the stub routine CUNLASE (case conversion). The mapping of the parameter area supplied by the header file cunhc.h is listed in Mapping of parameters in C. A sample program, CUNSASMC, is provided in SYS1.SAMPLIB.

#include<cunhc.h>
#define SLEN 1000
#define TLEN 4096
.....
unsigned char Sourcebuffer [SLEN ];
unsigned char Targetbuffer [TLEN ];
unsigned char DDA [CUNBAPRM_DDA_REQ ];

CUNBAPRM myparm ={CUNBAPRM_DEFAULT};
myparm.Src_Buf_Ptr=Sourcebuffer;
myparm.Targ_Buf_Ptr=Targetbuffer;
myparm.Targ_Buf_Len=TLEN;
myparm.Src_Buf_Len=SLEN;
myparm.DDA_Buf_Ptr=DDA;
myparm.DDA_Buf_Length=CUNBAPRM_DDA_REQ;
Myparm.Conv_Type=CUNBAPRM_TO_UPPER;
CUNLASE ( & myparm );
if((myparm.Return_Code !=CUN_RC_OK)......

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014