View previous topic :: View next topic
|
Author |
Message |
ermanjitsingh
New User
Joined: 08 Jun 2009 Posts: 19 Location: Banglore
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
What is the return code from TBDELETE? |
|
Back to top |
|
|
ermanjitsingh
New User
Joined: 08 Jun 2009 Posts: 19 Location: Banglore
|
|
|
|
Pedro wrote: |
What is the return code from TBDELETE? |
Return code is coming as 8. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
ermanjitsingh
New User
Joined: 08 Jun 2009 Posts: 19 Location: Banglore
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Can you provide your table definition? (the TBCREATE command that was used) |
|
Back to top |
|
|
ermanjitsingh
New User
Joined: 08 Jun 2009 Posts: 19 Location: Banglore
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
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 |
|
|
|