View previous topic :: View next topic |
Author |
Message |
jerryc314 Beginner
Joined: 13 May 2004 Posts: 6 Topics: 4
|
Posted: Thu May 13, 2004 9:38 pm Post subject: Adding rows to a table |
|
|
I am trying to add a row to an existing table. I get no errors, but my data is not added to the table. What am I doing wrong?
My code follows:
Code: |
address ispexec
tablename='mytable'
"libdef mylib dataset id('MYTSO.STUTABL')"
"CONTROL ERRORS RETURN"
"TBOPEN" tablename 'write library(mylib)'
say tablename 'rc' rc
if rc > 0 then do
say 'rc' rc
exit
end
KEYNAME='12345'
VALUE1='Y'
VALUE2='Y'
DESCRIP='THIS IS THE DESCRIPTION'
"tbadd" tablename "order"
say 'rc' rc tablename
"TBCLOSE" tablename
say 'rc' rc tablename
"libdef mylib"
say 'rc' rc
|
|
|
Back to top |
|
|
warp5 Intermediate
Joined: 02 Dec 2002 Posts: 429 Topics: 18 Location: Germany
|
Posted: Fri May 14, 2004 12:42 am Post subject: |
|
|
What does your TBCREATE look like? What does a trace R tell you? |
|
Back to top |
|
|
apostrophe Beginner
Joined: 03 Dec 2002 Posts: 3 Topics: 0 Location: Bavaria, Germany
|
Posted: Fri May 14, 2004 2:39 am Post subject: |
|
|
You open the the table with "LIBRARY(MYLIB)". Do write the table in the same file you must change the tbclose to
Code: | "tbclose" tablename "library(mylib)" |
|
|
Back to top |
|
|
|
|