The code worked fine this way...
DSavobjcnt S 20P 0
C/EXEC SQL
C+ SELECT SUM(BSHSAV)
C+ INTO :Savobjcnt
C+ FROM QGPL.REPORT
C/END-EXEC
Any obvious mistake I made? Bueller? Bueller??
**FREE
Dcl-s Savobjcnt Packed(20:0);
Dcl-s Saverrcnt Packed(20:0);
Exec SQL SET OPTION
naming = *SYS,
commit = *none;
Exec SQL Select SUM(BSHSAV) INTO :Savobjcnt
FROM QGPL.REPORT;
Exec SQL SELECT SUM(BSHERR) INTO :Saverrcnt
FROM QGPL.REPORT;
MSG ID SEV RECORD TEXT
SQL5066 0 30 Precompile option NAMING changed by SET OPTION statement.
SQL5066 0 30 Precompile option COMMIT changed by SET OPTION statement.
SQL0312 30 34 Position 42 Variable SAVOBJCNT not defined or not usable.
Reason: No declaration for the variable exists, the
declaration is not within the current scope, or the
variable does not have an equivalent SQL data type.
SQL0312 30 44 Position 42 Variable SAVERRCNT not defined or not usable.
Reason: No declaration for the variable exists, the
declaration is not within the current scope, or the
variable does not have an equivalent SQL data type.
DSavobjcnt S 20P 0
C/EXEC SQL
C+ SELECT SUM(BSHSAV)
C+ INTO :Savobjcnt
C+ FROM QGPL.REPORT
C/END-EXEC
Any obvious mistake I made? Bueller? Bueller??
**FREE
Dcl-s Savobjcnt Packed(20:0);
Dcl-s Saverrcnt Packed(20:0);
Exec SQL SET OPTION
naming = *SYS,
commit = *none;
Exec SQL Select SUM(BSHSAV) INTO :Savobjcnt
FROM QGPL.REPORT;
Exec SQL SELECT SUM(BSHERR) INTO :Saverrcnt
FROM QGPL.REPORT;
MSG ID SEV RECORD TEXT
SQL5066 0 30 Precompile option NAMING changed by SET OPTION statement.
SQL5066 0 30 Precompile option COMMIT changed by SET OPTION statement.
SQL0312 30 34 Position 42 Variable SAVOBJCNT not defined or not usable.
Reason: No declaration for the variable exists, the
declaration is not within the current scope, or the
variable does not have an equivalent SQL data type.
SQL0312 30 44 Position 42 Variable SAVERRCNT not defined or not usable.
Reason: No declaration for the variable exists, the
declaration is not within the current scope, or the
variable does not have an equivalent SQL data type.
Comment