SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)
Host Variables in C/C++ Programs
HP NonStop SQL/MX Programming Manual for C and COBOL—523627-004
3-43
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;
}










