MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Adding rows to a table

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
jerryc314
Beginner


Joined: 13 May 2004
Posts: 6
Topics: 4

PostPosted: Thu May 13, 2004 9:38 pm    Post subject: Adding rows to a table Reply with quote

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
View user's profile Send private message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Fri May 14, 2004 12:42 am    Post subject: Reply with quote

What does your TBCREATE look like? What does a trace R tell you?
Back to top
View user's profile Send private message Visit poster's website
apostrophe
Beginner


Joined: 03 Dec 2002
Posts: 3
Topics: 0
Location: Bavaria, Germany

PostPosted: Fri May 14, 2004 2:39 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group