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

How to delete an empty row from the Table ?


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ermanjitsingh

New User


Joined: 08 Jun 2009
Posts: 19
Location: Banglore

PostPosted: Mon Jul 13, 2009 3:40 pm
Reply with quote

Hi.

I have one empty row in the ISPF table & i want to delete it. I tried to delete that row with the following lines of code:

"tbstats vcdtbl rowcurr(nocr)" /*to check no. of row in the table*/

say 'nocr ' nocr /*priting no. of rows*/

"tbdelete vcdtbl" /* to delete the row"

"tbstats vcdtbl rowcurr(nocr)" /* to check no. of row after deleting*/

say 'nocr ' nocr /*prting no. of rows after deletion*/

The value of NOCR before & after delete command is same as 1.

It's not going to delete the row. I don't know whats the problem.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Mon Jul 13, 2009 9:10 pm
Reply with quote

What is the return code from TBDELETE?
Back to top
View user's profile Send private message
ermanjitsingh

New User


Joined: 08 Jun 2009
Posts: 19
Location: Banglore

PostPosted: Tue Jul 14, 2009 12:18 am
Reply with quote

Pedro wrote:
What is the return code from TBDELETE?


Return code is coming as 8.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Jul 14, 2009 12:38 am
Reply with quote

How is the table defined? keys or no keys?

For keys, what do you mean by 'one empty row'? is it blanks? or is it nulls?

You have to set your table variable name to the same value as is used in the table.

Can you just delete the entire member from your ISPTABL database?
Back to top
View user's profile Send private message
ermanjitsingh

New User


Joined: 08 Jun 2009
Posts: 19
Location: Banglore

PostPosted: Tue Jul 14, 2009 5:04 pm
Reply with quote

Pedro wrote:
How is the table defined? keys or no keys?

Can you just delete the entire member from your ISPTABL database?


Table is defined as No keys.

No i don't want to delete the the entire member because in skeleton i m using this table.

so even if there is one empty row in the table it's doing file tailoring in skeleton for that empty record as well which i don't want.That's why i want to delete empty record from the Table.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Jul 14, 2009 9:12 pm
Reply with quote

Can you provide your table definition? (the TBCREATE command that was used)
Back to top
View user's profile Send private message
ermanjitsingh

New User


Joined: 08 Jun 2009
Posts: 19
Location: Banglore

PostPosted: Tue Jul 14, 2009 10:23 pm
Reply with quote

Pedro wrote:
Can you provide your table definition? (the TBCREATE command that was used)


My Table definition is as follows:

Code:

"TBCREATE VCDTBL NAMES(vcfl vcnewfl vcflrl vcfltype vcmode vcacess,
             vcseg vcrecl vckeyl vcflsub1 vcflsub2), WRITE REPLACE"
vcfl = " "
vcnewfl = ""
vcflrl = " "
vcfltype = " "
vcmode = " "
vcacess = " "
vcseg = " "
vcrecl = " "
vckeyl = " "
"TBADD VCDTBL"
"TBSAVE VCDTBL"
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Wed Jul 15, 2009 1:28 am
Reply with quote

This causes the blank line:
Code:
vcfl = " "
vcnewfl = ""
vcflrl = " "
vcfltype = " "
vcmode = " "
vcacess = " "
vcseg = " "
vcrecl = " "
vckeyl = " "
"TBADD VCDTBL"


To remove, this should work:
Code:
vcfl = " "
vcnewfl = ""
vcflrl = " "
vcfltype = " "
vcmode = " "
vcacess = " "
vcseg = " "
vcrecl = " "
vckeyl = " "
"TBDELETE VCDTBL"
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts DELETE SPUFI DB2 1
No new posts Load new table with Old unload - DB2 DB2 6
No new posts DSNTIAUL driven delete IBM Tools 0
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top