View previous topic :: View next topic
|
Author |
Message |
mssabirami
New User
Joined: 11 Feb 2008 Posts: 17 Location: Chennai
|
|
|
|
Hi all,
I am new to Mainframe domain.
I am using a SQL query in which Date is compared with Comp variabe.
While binding i get SQLCODE -401.
this is my SQL query
EXEC SQL
SELECT MIN(TRSPRDC_ID)
INTO :WS-TRSPRDC-ID
FROM BPRR
WHERE BNFT_ID_CD=:WS-TEMP-BIC
AND BPRR_EFF_DT=:WS-D133050-ORIG-EFF-DATE
END-EXEC
Here data type of BPRR_EFF_DT is DATE and that of WS-D133050-ORIG-EFF-DATE is S9(7) USAGE IS COMP-3. |
|
Back to top |
|
|
Prajesh_v_p
Active User
Joined: 24 May 2006 Posts: 133 Location: India
|
|
|
|
Abi,
You should be using an X(10) variable to the date comparios in the query.
Also u might have to ensure that date field in S9(7) comp-3should be properly formatted before u move it to X(10) field.
Hope this helps..
Thanks,
Prajesh |
|
Back to top |
|
|
mssabirami
New User
Joined: 11 Feb 2008 Posts: 17 Location: Chennai
|
|
|
|
Prajesh,
Thanks...it worked out... |
|
Back to top |
|
|
|