IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Extract data from db2 table with column name


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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: 459
Location: Belgium

PostPosted: Wed Jun 18, 2008 1:37 pm
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
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: 792
Location: Chennai, India

PostPosted: Fri Jun 20, 2008 7:15 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Store the data for fixed length COBOL Programming 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top