View previous topic :: View next topic
|
Author |
Message |
Faeton
New User
Joined: 21 Jun 2007 Posts: 3 Location: Madrid, Spain
|
|
|
|
Hi
I have a very simple panel with a table, showing one column which I feed through a COBOL program using TBCREATE, TBADD, ...
The variable is created in the program (using VDEFINE) as a CHAR(8). The problem comes when the value contains an underscore (_), which causes an error 20 when adding a row with TBADD. i've changed the panel to avoid the use of underscore in the ATTR section, but the problem persists. Any suggestions? |
|
Back to top |
|
|
Josh Keller
New User
Joined: 08 Oct 2007 Posts: 36 Location: Columbia, SC
|
|
|
|
You should override the values using the DEFAULT statement.
Code this with your )ATTR statement.
Then override the "_" with something else.
From the manual:
Quote: |
DEFAULT(def1def2def3)
You can use the DEFAULT keyword to specify the characters that define a high-intensity text field, a low-intensity text field, and a high-intensity input field, respectively. The value inside the parentheses must consist of exactly three characters, not enclosed in single quotes and not separated by commas or blanks.
The DEFAULT keyword can also be specified on the )ATTR section statement. |
|
|
Back to top |
|
|
Faeton
New User
Joined: 21 Jun 2007 Posts: 3 Location: Madrid, Spain
|
|
|
|
Hi, Josh
Thanks, but I've already tried that, and the problem is still there. It's not about showing underscores as part of the text in the ispf panel, but about the values of the variable i'm sending via TBADD from a COBOL program. The panel shows some data about a DB2 module, including the name of the collection. If that name contains underscores, the execution of TBADD fails. |
|
Back to top |
|
|
Ronald Burr
Active User
Joined: 22 Oct 2009 Posts: 293 Location: U.S.A.
|
|
|
|
Suggest that you run your dialog under test with variable trace turned on to see if/where the error is occurring.
I feel that there must be something exotic about what you are doing that is unrelated to the fact that a variable contains an underscore. In most of the Table dialogs I've written, I set the default value of variables to underscores to represent fields which have not yet been given "real" values by a user, and I have yet to see one fail due to the value of a variable containing an underscore. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Faeton wrote: |
The problem comes when the value contains an underscore (_), which causes an error 20 when adding a row with TBADD. |
I doubt that the underscore is the cause of the error.
Double check your code. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
Are you using NOBSCAN on your VDEFINE? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
run in dialog test and look at ZERRMSG andZERRLM immediately after the failure. |
|
Back to top |
|
|
Faeton
New User
Joined: 21 Jun 2007 Posts: 3 Location: Madrid, Spain
|
|
|
|
Marso wrote: |
Faeton wrote: |
The problem comes when the value contains an underscore (_), which causes an error 20 when adding a row with TBADD. |
I doubt that the underscore is the cause of the error.
Double check your code. |
When the variable doesn't contain an underscore, the process works fine. It's a bit puzzling...
Adding NOBSCAN doesn't help... |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Quote: |
It's a bit puzzling... |
That is when you go into the detailed debugging. Traces, dialog test, etc...
Can you simplify your program and show us? VDEFINE, TBCREATE, assign variable, TBADD. |
|
Back to top |
|
|
|