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
 

 

Extract data from db2 table with column name

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

New User


Joined: 18 Mar 2008
Posts: 35
Location: Gurgaon

PostPosted: Wed Jun 18, 2008 1:11 pm    Post subject: Extract data from db2 table with column name
Reply with quote

I want to extract the data from a db2 table into a sequential file. I want db2 table column name as a header to the sequential file.

So is it possible to extract the data from db2 table into a sequential file with column names?
Back to top
View user's profile Send private message

PeD

Active User


Joined: 26 Nov 2005
Posts: 456
Location: Belgium

PostPosted: Wed Jun 18, 2008 1:37 pm    Post subject:
Reply with quote

DSNTEP2 aka SPUFI in batch
Back to top
View user's profile Send private message
Richa Jain

New User


Joined: 18 Mar 2008
Posts: 35
Location: Gurgaon

PostPosted: Fri Jun 20, 2008 6:46 pm    Post subject:
Reply with quote

I have got an answer of my question.

We can use QMF to extract the data into a sequential file with column names. Below are the setps -

Step 1: Write sql query in QMF screen
Step 2: Press F2 to run the query and to see the report.
Step 3: Write 'export report to '<datasetname>' and hit enter.

I hope it will be useful for others.
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 788
Location: Chennai, India

PostPosted: Fri Jun 20, 2008 7:15 pm    Post subject:
Reply with quote

These are other options on QMF.

Code:
DRAW SYSIBM.SYSTABLES     --> Any table name here.., to get column list

EDIT QUERY        --> To navigate to other panels

EXPORT DATA TO 'dataset'

IMPORT DATA FROM  'dataset'

SAVE QUERY AS TEMP        --> I havn't used

RES
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 copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 18 Thu Jul 13, 2017 2:11 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts What is the Extract Function in JCL dharmaraok JCL & VSAM 3 Wed Jun 14, 2017 9:12 am


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