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 DB2 tables without duplicate column header

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

New User


Joined: 26 Aug 2006
Posts: 11

PostPosted: Thu Jan 11, 2007 4:20 am    Post subject: Extract DB2 tables without duplicate column header
Reply with quote

Hi,
I need to extract DB2 tables. I do not want the column header to be repeated.

We have only SPUFI. There is no QMF & FileAID installed here.

Please let me know if I can extract the tables without the column header repeated.

Also let me know if there is a JCL to extract the tables, so that I can avoid SPUFI extract.

Thanks
B
Back to top
View user's profile Send private message

DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Jan 16, 2007 9:17 pm    Post subject: Re: Extract DB2 tables without duplicate column header
Reply with quote

B,

What are you tying to accomplish? Why don't you want column headings? You could use an Unload, but then there would be no column headings
Back to top
View user's profile Send private message
bala_span

New User


Joined: 26 Aug 2006
Posts: 11

PostPosted: Wed Jan 17, 2007 5:49 am    Post subject:
Reply with quote

Dave,
I am trying to extract DB2 tables and format it to load into somother database like SQL server.
Could you provide a detailed info for unload.

If I use spufi query of select * from tablename, it gives me repeated column headings and also the sql is displayed on the top of the file. I do not want to delete this manually (using x all command) as I am trying to automate this process.

Thanks
B
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Wed Jan 17, 2007 7:21 am    Post subject: Re: Extract DB2 tables without duplicate column header
Reply with quote

B,

So you want it unloaded to a flat file.

What do you want the structure to be like?

Straight file layout? delimitted? Character?
Back to top
View user's profile Send private message
siva001

New User


Joined: 12 Jan 2007
Posts: 9
Location: chennai

PostPosted: Wed Jan 17, 2007 12:00 pm    Post subject: Re: Extract DB2 tables without duplicate column header
Reply with quote

please use below jcl this unload job .
unload table data inti file with out column headers

//AMARUNLI JOB (G8474701),'RUN UTBL ',
// MSGLEVEL=(1,1),
// MSGCLASS=X,
// CLASS=D,
// NOTIFY=&SYSUID
//TOUSR EXEC PGM=IKJEFT01,COND=(4,LT)
//STEPLIB DD DSN=SYSD0.DB2.DSN2.SDSNLOAD,DISP=SHR
//SYSOUT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSPUNCH DD DSN=SWAXV02.AMAR.BMC.V22CADEF.OCT18.PUNCH,
// DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,SPACE=(TRK,(1,1))
//SYSREC00 DD DSN=SWAXV02.AMAR.BMC.V22CADEF.OCT18.SYSREC,
// SPACE=(CYL,(50,50),RLSE),UNIT=(SYSDA,15),
// DISP=(NEW,CATLG,DELETE)

//SYSTSIN DD *
DSN SYSTEM(DSN2)
RUN PROGRAM(DSNTIAUL) PARM('SQL') PLAN(DSNTIAUL) +
LIB('SYSD0.DB2.DSN2.RUNLIB.LOAD')
END
//SYSIN DD *
SELECT *
FROM BMC.V22_CADEF WITH UR;
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Thu Jan 18, 2007 8:55 am    Post subject: Re: Extract DB2 tables without duplicate column header
Reply with quote

I generally sort the output dataset of SPUFI from the command prompt by command "SORT 1 80" and then delete all the headers at one shot.
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 Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts Identify top 30 big tables or indexes... ashek15 DB2 0 Fri Jun 16, 2017 10:01 am
No new posts What is the Extract Function in JCL dharmaraok JCL & VSAM 3 Wed Jun 14, 2017 9:12 am
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm


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