View previous topic :: :: View next topic
Author
Message
bala_span New User Joined: 26 Aug 2006Posts: 11
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
DavidatK Active Member Joined: 22 Nov 2005Posts: 700 Location: Troy, Michigan USA
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
bala_span New User Joined: 26 Aug 2006Posts: 11
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
DavidatK Active Member Joined: 22 Nov 2005Posts: 700 Location: Troy, Michigan USA
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
siva001 New User Joined: 12 Jan 2007Posts: 9 Location: chennai
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
priyesh.agrawal Senior Member Joined: 28 Mar 2005Posts: 1452 Location: Chicago, IL
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
Please enable JavaScript!