Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

DB2-cobol module not fetching records whose primary key is 0

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
rickyc.mathew

New User


Joined: 06 Mar 2008
Posts: 30
Location: kottayam

PostPosted: Fri Aug 06, 2010 5:21 pm    Post subject: DB2-cobol module not fetching records whose primary key is 0
Reply with quote

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
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Fri Aug 06, 2010 6:05 pm    Post subject:
Reply with quote

are you successful in spufi when you attempt to Select rows where col = '0000'?
Back to top
View user's profile Send private message
rickyc.mathew

New User


Joined: 06 Mar 2008
Posts: 30
Location: kottayam

PostPosted: Mon Aug 09, 2010 11:04 am    Post subject: Reply to: DB2-cobol module not fetching records whose primar
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Aug 09, 2010 11:12 am    Post subject:
Reply with quote

Hello,

Suggest you show the code that does not work as desired.
Back to top
View user's profile Send private message
rickyc.mathew

New User


Joined: 06 Mar 2008
Posts: 30
Location: kottayam

PostPosted: Mon Aug 09, 2010 12:18 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Mon Aug 09, 2010 3:57 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Dump analysis of an assembler module monica1 PL/I & Assembler 4 Tue May 09, 2017 10:05 am
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us