SQL/MX 3.2.1 Programming Manual for C and COBOL (H06.26+, J06.15+)

Host Variables in C/C++ Programs
HP NonStop SQL/MX Release 3.2.1 Programming Manual for C and COBOL663854-005
3-55
Selecting From an ISO88591 Character Set Into a
UCS2 Host Variable
where city <> :in_hv_city
order by pnum;
EXEC SQL open curs02;
EXEC SQL fetch curs02 INTO
:out_hv_pnum,:out_hv_pname,:out_hv_ptype;
while (strcmp(SQLSTATE,SQLSTATE_OK) == 0)
{
// processthe output
EXEC SQL fetch curs02 into
:out_hv_pnum,:out_hv_pname,:out_hv_ptype;
cout <<"-----------"<<endl;
}
EXEC SQL close curs02;
}