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
 

 

what is the equivalent data type of SMALLINT of DB2 in Easy?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
vijayalayancse

New User


Joined: 29 Aug 2005
Posts: 25
Location: Chennai

PostPosted: Sat Apr 05, 2008 4:44 am    Post subject: what is the equivalent data type of SMALLINT of DB2 in Easy?
Reply with quote

Team,
what is the equivalent data type of SMALLINT of DB2 in Easytrieve?
I have tried W 02 P and W 02 B..
Actually the length of the variable in DB2 is only 2..

I am getting the follwing error
14 SQL FETCH C1
INTO :WS-CNT,:WS-COMM-CD
14 *******B204 SQL - INVALID HOSTVAR DATATYPE 836


Any help would be greatly appreciated..
Back to top
View user's profile Send private message

CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Sat Apr 05, 2008 5:55 am    Post subject:
Reply with quote

As far as I know, the "W 02 B" should be correct, but beyond that, I have no idea......
Back to top
View user's profile Send private message
pranav yadav

New User


Joined: 04 Apr 2008
Posts: 9
Location: Noida, India

PostPosted: Sat Apr 05, 2008 7:06 pm    Post subject:
Reply with quote

For Binary variable , you always need to intialise the variable,
so the definition would be ,
W 2 B 0.
I hope this should work.
icon_smile.gif
Back to top
View user's profile Send private message
vijayalayancse

New User


Joined: 29 Aug 2005
Posts: 25
Location: Chennai

PostPosted: Mon Apr 07, 2008 8:38 am    Post subject: Reply to: what is the equivalent data type of SMALLINT of DB
Reply with quote

Hi,

Thanks for ur response. I even tried that also. Still i am getting invalid declaration.

Any help would be greatly appreciated.



10 DEFINE WS-COMM-CD W 02 B 0

11 SQL DECLARE C1 CURSOR FOR + SELECT COUNT(*),TP_123+
FROM PRTHD.TP_XXYY_ + WHERE TP_COMM_STAT_CD=5 AND + LAST_UPD_TS < CURRENT TIMESTAMP - 60 MINUTE + GROUP BY TP_123 WITH UR

12 JOB INPUT NULL FINISH EOFPROC 0
0
13 SQL OPEN C1 0
0
14 SQL FETCH C1 + 0
INTO :WS-CNT,:WS-COMM-CD 0
14 *******B204 SQL - INVALID HOSTVAR DATATYPE 836

F1=HELP F2=SPLIT F3=END F4=RETURN F5=IFIND F6=BOOK
F7=UP F8=DOWN F9=SWAP F10=LEFT F11=RIGHT F12=RETRIEVE
. . . . . . . . . . . . . . . . . . . . . . . . . . .
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 Apr 07, 2008 8:52 am    Post subject:
Reply with quote

Hello,

This is a bit round-a-bout, but do you have some cobol code that successfully executes the same cursor? If not, might one be easily created and tested.

I'd be interested to see what the host variables that work in cobol might be.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon Apr 07, 2008 4:49 pm    Post subject:
Reply with quote

How is WS-CNT defined? What is the table definition of TP_123?
Back to top
View user's profile Send private message
keyarika

New User


Joined: 24 May 2008
Posts: 10
Location: bangalore

PostPosted: Mon Sep 08, 2008 11:25 pm    Post subject:
Reply with quote

Hi,

you can check the sysprint to know the correct datatype. when you include a table in easytreive code, the datatypes for all the columns appear in the sysprint.
check the column name and see the datatype given there, then declare a variable with the same datatype and use that in the program.

thanks,
sagar keyarika
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 -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm


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