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 Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


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