Message . . . . : Indicator variable required.
Cause . . . . . : A FETCH, an embedded SELECT, a CALL or a SET or VALUES
INTO statement has resulted in a null value, but an indicator variable
was
not specified for host variable PRECISION. The relative position of the
host variable in the INTO clause or parameter list is 6. If the host
variable name is *N, an SQLDA was specified.
Recovery . . . : Specify an indicator variable, and precompile the
program
again.
So it looks like the null value in PRECISION is killing me. I would specify
an indicator variable if only I knew what one was. Any ideas.
Thanks,
Thad Rizzi
Define the variable and the null indicator (1 byte binary).
05 Activity-Dt Picture X(8).
05 Activity-Dt-Ind Picture S9(4) Binary.
Fetch from the cursor. The null indicator variables are not separated from
the varaible itself by a comma...SQL knows how to load these.
Exec SQL
Fetch Next
From Time_Data
Into
:Activity-Dt : Activity-Dt-Ind,
:Cnty-Staff-Num :Cnty-Staff-Num-Ind,
:Cnty-Case-Num :Cnty-Case-Num-Ind,
:App-Num :App-Num-Ind,
:Family-Mbr-Num :Family-Mbr-Num-Ind,
:Duration :Duration-Ind,
:Contact-Loc-Cd :Contact-Loc-Cd-Ind,
:Svc-Cd :Svc-Cd-Ind,
:HCPCS-Cd :HCPCS-Cd-Ind,
:Tr-Activity-Id :Tr-Activity-Id-Ind,
:Num-Pers-Rec-Svc :Num-Pers-Rec-Svc-Ind,
:Time-Record-Id :Time-Record-Id-Ind,
:Staff-Id :Staff-Id-Ind,
:WG-Id :WG-Id-Ind,
:Purpose :Purpose-Ind,
:Person-Id :Person-Id-Ind,
:Contact-Event-Id :Contact-Event-Id-Ind,
:SISI1000FL-Duration,
:Contact-Method-Cd :Contact-Method-Cd-Ind
End-Exec
Make sure you have a zero in the null indicator variable before using it.
If Cnty-Staff-Num-Ind = 0
Move Cnty-Staff-Num to TS-Worker
End-if
--
Thomas Kine
www.RighteousSoftware.com
"Thad Rizzi" <tha...@earthlink.net> wrote in message
news:58vs6.1923$Im6.2...@newsread1.prod.itd.earthlink.net...
See the manual SQL Programming with Host Languages:
http://publib.boulder.ibm.com/pubs/html/as400/v4r5/ic2924/info/db2/rzajpmst02.htm
Specifically see the chapter on Coding SQL Statements in ILE RPG for
AS/400 Applications.. there is an example of using indicator variables:
http://publib.boulder.ibm.com/pubs/html/as400/v4r5/ic2924/info/db2/rzajpmst138.htm#Header_158
--
Karl Hanson