View previous topic :: View next topic
|
Author |
Message |
rickyc.mathew
New User
Joined: 06 Mar 2008 Posts: 30 Location: kottayam
|
|
|
|
Hi All,
I wrote a new cobol DB@ program which fetches values from database.My program is working fine for all values except for values '0000' as the primary key.I dont know how to proceed.Could any one please help to resolve this.
Thanks,
Ricky |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
are you successful in spufi when you attempt to Select rows where col = '0000'? |
|
Back to top |
|
|
rickyc.mathew
New User
Joined: 06 Mar 2008 Posts: 30 Location: kottayam
|
|
|
|
Yes I am able to select it through Spufi...
But my program reads the next value when it encounters '0000' and fetches the value corresponding to that from the Db2 table.
Thanks,
Ricky |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest you show the code that does not work as desired. |
|
Back to top |
|
|
rickyc.mathew
New User
Joined: 06 Mar 2008 Posts: 30 Location: kottayam
|
|
|
|
Code: |
MOVE WL-SE-NUMBER TO WS-SE-NO
MOVE WS-SE-NO TO SE-NO
EXEC SQL
SELECT SE_ACCT_TYPE_CD,
SE_INDUS_MJR_DS_CD,
SE_SUBOR_DS_CD,
SE_INDUS_DTL_DS_CD,
SE_INDUS_DS_CD,
CTRY_ID
INTO :SE-ACCT-TYPE-CD,
:SE-INDUS-MJR-DS-CD,
:SE-SUBOR-DS-CD,
:SE-INDUS-DTL-DS-CD,
:SE-INDUS-DS-CD,
:CTRY-ID
FROM V01_GMAPS_MER_GENESIS_INDUS
WHERE SE_NO = :SE-NO |
please find the definiton
Code: |
01 WL-GR35100-PARAMETERS.
03 WL-SE-HQ-NO PIC S9(10) COMP-3.
01 WS-SE-NO PIC X(09). |
|
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you have a cobol problem.
you should display the values after you move
besides,
you provided code:
Code: |
MOVE WL-SE-NUMBER TO WS-SE-NO
MOVE WS-SE-NO TO SE-NO
|
and a definition of working-storage:
Code: |
01 WL-GR35100-PARAMETERS.
03 WL-SE-HQ-NO PIC S9(10) COMP-3.
01 WS-SE-NO PIC X(09).
|
but do not show us the definitions of WS-SE-NUMBER or SE-NO.
if your code is like your explanations,
your problem is accuracy. |
|
Back to top |
|
|
|