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
 

 

Unload Tablespace using DB2CPROC instead of DSNUPROC

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Unload Tablespace using DB2CPROC instead of DSNUPROC
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

Site Director


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

PostPosted: Wed Jul 22, 2009 9:41 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject: Reply to: Unload Tablespace using DB2CPROC instead of DSNUPR
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    Post subject: Reply to: Unload Tablespace using DB2CPROC instead of DSNUPR
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    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 unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
This topic is locked: you cannot edit posts or make replies. Need help in estimating space of unlo... ashek15 IMS DB/DC 12 Fri Apr 07, 2017 5:11 am
No new posts Best IMS DB Unload Utility jjabez10 IMS DB/DC 12 Thu Sep 22, 2016 11:15 pm
No new posts DB2 Unload format options Susanta DB2 2 Fri Aug 12, 2016 5:42 pm
No new posts DXT unload utility - DVRE0000 mistah kurtz DB2 1 Thu Jul 07, 2016 4:56 pm


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