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

TABLESPACE IS NOT EMPTY


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
apsar.kogatam
Warnings : 1

New User


Joined: 27 Jun 2008
Posts: 33
Location: CHENNAI

PostPosted: Wed Feb 03, 2010 3:28 pm
Reply with quote

Hi Team,

I am using the below jcl to delete all the data from table and to load with new data.eventhough the table is empty which i am trying to load is giving the error 'TABLESPACE IS NOT EMPTY'.I have used the below control card to load the table.Can you please advice me how to proceed furthur.
c
ontrol card:

LOAD DATA INDDN SYSREC01 RESUME NO INTO TABLE
DA53.T535702
(


)
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Feb 03, 2010 3:33 pm
Reply with quote

Hello Apsar,

You cant use resume no with Nonempty Tablespace.In order to delete all the rows from tablespace & load new data useload Replace job.

Let me know if you need further help
Back to top
View user's profile Send private message
apsar.kogatam
Warnings : 1

New User


Joined: 27 Jun 2008
Posts: 33
Location: CHENNAI

PostPosted: Wed Feb 03, 2010 3:42 pm
Reply with quote

Hello Gupte,

Can u just brief me what is Non empty tablespace.By name i can understand that the tablespace is not empty to hold the new data.Am i correct here?And also i tried the job before with Load replace but the tables data which i am not intended also getting deleted.Please adivice me.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Feb 03, 2010 3:48 pm
Reply with quote

Hello Apsar,

Non Empty Tablespace: Atleast one table contained in Tablespace contained Data

Secondly Load Replace will delete the data of all the tables of that particular Tablespace. If you want to replace data of specific table of
Tablespace you need to delete all the rows in the table, and then use LOAD with RESUME YES. For
example, assume that you want to replace all the data in PNASCMOD.TSEMP1
without changing any data in PNASCOMD.TSEMPA. To do this, follow these steps:
1. Delete all the rows from PNASCMOD.TSEMP1 by using the following SQL
DELETE statement:
Code:
EXEC SQL
DELETE FROM PNASCMOD.TSEMP1
ENDEXEC

Tip: The mass delete works most quickly on a segmented table space.
2. Use the LOAD job that is shown in the following figure to replace the rows in
that table.
Code:
LOAD DATA RESUME YES
INTO PNASCMOD.TSEMP1
(....
)
Back to top
View user's profile Send private message
apsar.kogatam
Warnings : 1

New User


Joined: 27 Jun 2008
Posts: 33
Location: CHENNAI

PostPosted: Wed Feb 03, 2010 4:55 pm
Reply with quote

Hello Guptae,

Thankyou so much its working now.
Back to top
View user's profile Send private message
apsar.kogatam
Warnings : 1

New User


Joined: 27 Jun 2008
Posts: 33
Location: CHENNAI

PostPosted: Wed Feb 03, 2010 5:03 pm
Reply with quote

Hi Guptae,
The load is working fine for me for all the tables which i require but for some of the tables in sysout of Job the //UTPRINT statements are missing.

I have used the below for all

//UTPRINT DD SYSOUT=*

Can you please advice me what could be the reason for missing UTPRINT ststements in sysout.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Feb 03, 2010 5:18 pm
Reply with quote

Hello Apsar,

UTPRINT contain message from DFSORr.If any utility requires a sort, it executes DFSORT. Messages from that program are sent to UTPRINT So
might be load of those table did nt require sort.
Back to top
View user's profile Send private message
apsar.kogatam
Warnings : 1

New User


Joined: 27 Jun 2008
Posts: 33
Location: CHENNAI

PostPosted: Wed Feb 03, 2010 5:20 pm
Reply with quote

thanks alot
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Thu Feb 04, 2010 7:18 pm
Reply with quote

Hi Guptae

Adding to what has already been said above, I want to know what is the standard practice for backup of table or tablespace in both the scenarios:

1) Load with Replace -- works on entire tablespace. If this option is used, i need to take backup of entire table space. Am I right?

2) Load with No Replace and RESUME Yes -- works on specific tables in tablespace tablespace. So if i am using this option, do i need to take backup of those tables only?

Am i right in saying this?


Thanks and Regards,
Ajay
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 force tablespace using LISTDEF input DB2 1
No new posts Insert trailer for non empty file only DFSORT/ICETOOL 6
No new posts EMPTY file check scenario JCL & VSAM 6
No new posts Map VSAM Dataset to a Table/Tablespace DB2 5
No new posts icetool empty file and not empty file... DFSORT/ICETOOL 5
Search our Forums:

Back to Top