|
>
> **ver1 (which is out of the Host Programming manual on pg 26 & 27)
>
> typedef _Packed struct {
> char FIRSTINIT;
> char MIDINIT;
> _Packed struct{
> short LASTNAME_LEN;
> char LASTNAME_DATA[15];
> } LASTNAME;
> float SALARY;
> float BONUS;
> float COMM;
> } empDS;
>
EXEC SQL BEGIN DECLARE SECTION;
> empDS hostDS[10];
EXEC SQL END DECLARE SECTION;
In other words, variables, that you are going to fetch into, must be declared
inside this section....
Below is a working program :
EXEC SQL BEGIN DECLARE SECTION;
char user[4];
EXEC SQL END DECLARE SECTION;
EXEC SQL INCLUDE SQLCA;
int main(int argc, char *argv[])
{
memcpy(user, argv[1], 4);
EXEC SQL DELETE FROM GDPF
WHERE GDUSID = :user;
EXEC SQL UPDATE OCPF SET OCCOA = ' '
WHERE OCUSID = :user;
return(0);
}
HTH,
Jevgeni Astanovski
IT support department manager
Sampo bank
Tallinn, Estonia.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.