Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Records are there but giving Sqlcode 100 in Spufi

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

New User


Joined: 25 Aug 2010
Posts: 10
Location: Bangalore, India

PostPosted: Fri May 13, 2011 6:13 pm    Post subject: Records are there but giving Sqlcode 100 in Spufi
Reply with quote

Hi,

Can anyone please clarify my issue below.

I am running the below query in Spufi. In the output dataset 1 record is being displayed but showing Sqlcode 100. Please let me how this happens.

SELECT distinct
WIDTH
,SUFFIX_LGTH_REQ
,CMDTY_CODE_DESC_1
,CMDTY_CODE_DESC_2
,SUFFIX_REQUIRED
FROM
P.TA0001
WHERE
COMMODITY_CODE = '123519'
AND SUFFIX = '099'


output dataset:

---------+---------+---------+---------+---------+---------+---------+
WIDTH SUFFIX_LGTH_REQ CMDTY_CODE_DESC_1
---------+---------+---------+---------+---------+---------+---------+
.00000 N LEVELROCK 2500 UNDERLAY 2700# BG
.00000 N LEVELROCK 2500 UNDERLAY 2700# BG
DSNE610I NUMBER OF ROWS DISPLAYED IS 2
DSNE616I STATEMENT EXECUTION WAS SUCCESSFUL, SQLCODE IS 100


Thanks,
Lalitha Rayala.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10375
Location: italy

PostPosted: Fri May 13, 2011 6:30 pm    Post subject: Reply to: Records are there but giving Sqlcode 100 in Spufi
Reply with quote

it happens ( that You are wondering ) because You did not care to read the manuals/doc

even a simple googling with spufi sql code 100 will return a pointer which answers Your question properly

http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db2.doc.apsg/xf4d5c.htm
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 688
Location: Pennsylvania

PostPosted: Fri May 13, 2011 6:38 pm    Post subject:
Reply with quote

Quote:
Please let me how this happens


More than likely:

1) Your where clause is incorrect for the datatype of the columns

2) You are not connected to the correct db2 subsystem

3) Your table qualifier is incorrect

Make your vote....
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10375
Location: italy

PostPosted: Fri May 13, 2011 6:48 pm    Post subject: Reply to: Records are there but giving Sqlcode 100 in Spufi
Reply with quote

the sql code 100 is a SUCCESS SQL CODE, not an error one

it happens because SPUFI blindly display the sql code from the <last executed> command

a sql code 100 is like the EOF indicator ...
fetch, fetch, ... , fetch with sql code 100 ==> no more rows ( end of file / no more rows )


in COBOL ( plain file access )
read, read, .... , read and raise the EOF condition ( end of file / no more records )

the general logic is the same in bothe cases
the query/read was <successful> it's up to the program to determine if any rows were returned or if any records were read
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 688
Location: Pennsylvania

PostPosted: Fri May 13, 2011 6:51 pm    Post subject:
Reply with quote

Thank you Enrico,

I could not see the forrest for the trees.

The rows were found and displayed:

Code:

.00000 N LEVELROCK 2500 UNDERLAY 2700# BG
.00000 N LEVELROCK 2500 UNDERLAY 2700# BG
DSNE610I NUMBER OF ROWS DISPLAYED IS 2
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
No new posts Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 9 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Increment number for every group of r... srajendran2 DFSORT/ICETOOL 7 Thu Nov 09, 2017 10:31 pm
No new posts Matching and unmatched records!! Vignesh Sid SYNCSORT 3 Thu Nov 09, 2017 11:22 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us