Get small set of data from a larger DB2 Table.

RDBMS from IBM and IBM's Hierarchical DBMS and Transaction Manager (IMS DC).
Post Reply
Eklavya Bharti
New Member
Posts: 7
Joined: Sat Jan 23, 2016 11:34 am

Get small set of data from a larger DB2 Table.

Post by Eklavya Bharti »

Hi,

I am writing a COBOL DB2 program. There is a DB2 table which has 7 million rows. I need to get only the 2020 data for the employees having the grade from 1 TO 50. Could you please advise, if I can get total count of each grade through a DB2 query. I need to run the query using a COBOL program.

Please suggest.
User avatar
Anuj Dhawan
Founder
Posts: 2802
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

Re: Get small set of data from a larger DB2 Table.

Post by Anuj Dhawan »

I think you can write a query using 'cursor', as you are working with COBOL-DB2 program. Have you tired that? Please advise.
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “IBM DB2 and IMS DB/DC”