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: 785
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 Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm


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