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

Unload Tablespace using DB2CPROC instead of DSNUPROC


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
gopalkulkarni

New User


Joined: 13 Aug 2007
Posts: 12
Location: Pune, India

PostPosted: Wed Jul 22, 2009 11:53 am
Reply with quote

Hi,
I want to unload tablespace using utility DB2CPROC instead of DSNUPROC.
What will be the code for it?

OR, below code is sufficient?

Code:
//TDM#P04@     JOB (AUTHORIZATION CODE),
//             'TDM#P004',
//             CLASS=I,
//             MSGCLASS=X,
//             REGION=0M,
//             SCHENV=DB2DWPG,
//             USER=USER,NOTIFY=USER
//*
//*>OPC SCAN
//*
/*JOBPARM S=ANY
//*
//*
//***********************************************
//*                                                                               *
//* PURPOSE OF JOB: UNLOAD TABLE FROM REGION        *
//*                                                                               *
//***********************************************
//*
//********************************************
//*                                                                          *
//* STEP PURPOSE: TO CHECK DB2 AVAILABILITY      *
//*                                                                          *
//********************************************
//*
//SDB2CHK EXEC NUDB2CHK,
//             DB2SYS=DWPG
//*
//*********************************************
//*                                                                            *
//* STEP PURPOSE- DELETE THE UNLOAD DATASET      *
//*                                                                            *
//*********************************************
//*
//SDELETE EXEC PGM=IDCAMS,
//             COND=(4,LT)
//SYSIN    DD  *
  DEL 'NUDMD.T1.TDM#P004.TDMZPCL.UNLOAD'
  DEL 'NUDMD.T1.TDM#P004.TDMZPCL.SYSPUNCH'
  IF MAXCC = 8 THEN SET MAXCC = 0
//SYSPRINT DD  SYSOUT=*
//SYSABEND DD  SYSOUT=X,HOLD=YES
//*
//****************************************
//*                                                                   *
//* STEP PURPOSE: TO UNLOAD TABLE               *
//*                                                                   *
//****************************************
//*
//UNLOAD01 EXEC DB2CPROC,
//             SYSTEM=DWPG,
//             COND=(4,LT)
//SYSTSIN  DD  *
 RUN PROG(DSNTIAUL) PLAN(DSNTIAUL) -
 PARM('SQL')
 END
//SYSIN    DD  *
  UNLOAD TABLESPACE DDMMART.SDMZPCL
  FROM TABLE NUDM.TDMZPCL
//*
//SYSREC   DD  DSN=NUDMD.T1.TDM#P004.TDMZPCL.UNLOAD,
//             DISP=(NEW,CATLG,DELETE),
//             UNIT=DEVPOOL,
//             SPACE=(TRK,(5000,500),RLSE)
//SYSPUNCH DD  DSN=NUDMD.T1.TDM#P004.TDMZPCL.SYSPUNCH,
//             DISP=(NEW,CATLG,DELETE),
//             UNIT=DEVPOOL,
//             SPACE=(TRK,(1,1),RLSE)
//SYSPRINT DD  SYSOUT=*
//SYSTSPRT DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//SYSDUMP  DD  SYSOUT=X,HOLD=YES
//SYSABEND DD  SYSOUT=X,HOLD=YES
____________________________________________________________

Please reply to my query as early as possible.
Thanks in advance.

Regards,
Gopal

Edited: Please use BBcode when You post some code/error, that's rather readable, Thanks... Anuj
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Jul 22, 2009 9:41 pm
Reply with quote

Hello,

Quote:
I want to unload tablespace using utility DB2CPROC instead of DSNUPROC.
Are you just curious or is there some reason you might share?

Is there some reason you have not tried this? What happens when you do? Have you talked with your dba?
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Thu Jul 23, 2009 1:18 am
Reply with quote

DB2CPROC looks like an in-house proc. It is not standard IBM supplied proc. It seems to be using DSNTIAUL too. Better to talk to your house DBA.
Back to top
View user's profile Send private message
gopalkulkarni

New User


Joined: 13 Aug 2007
Posts: 12
Location: Pune, India

PostPosted: Thu Jul 23, 2009 8:38 am
Reply with quote

Hello,

I tried this JCL, it was in error. Error message was, syntax error for the code in syntax. I tried this utility for getting unload file in FB format. As DSNUPROC gives us unload file in VB format.

I just wanted to know that, whether can we unload the tablespace using this utility. Finally, after lot's of efforts, I completed this using select query instead of unload tablespace. I received unload file in FB format.

Is there any other way to take unload?
Back to top
View user's profile Send private message
wanderer

Active User


Joined: 05 Feb 2007
Posts: 199
Location: Sri Lanka

PostPosted: Thu Jul 23, 2009 9:44 am
Reply with quote

You can also try DSNTIAUL. Probably your DB2CPROC used that already but we don't know.

I was wondering why do you have to put in so much effort in guessing how to run this DB2CPROC when you can ask your in-house DBA for a sample JCL which is a whole lot easier.
Back to top
View user's profile Send private message
gopalkulkarni

New User


Joined: 13 Aug 2007
Posts: 12
Location: Pune, India

PostPosted: Thu Jul 23, 2009 9:47 am
Reply with quote

Thanks for your reply.
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 Load new table with Old unload - DB2 DB2 6
No new posts Remote Unload of CLOB Columns DB2 6
No new posts Multiple table unload using INZUTILB DB2 2
No new posts force tablespace using LISTDEF input DB2 1
No new posts changing defaults in db2 admin - Unlo... DB2 0
Search our Forums:

Back to Top