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

Extract DB2 tables without duplicate column header


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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
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
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
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: 1448
Location: Chicago, IL

PostPosted: Thu Jan 18, 2007 8:55 am
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 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 Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts Duplicate transid's declared using CEDA CICS 3
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts How to load to DB2 with column level ... DB2 6
Search our Forums:

Back to Top