This is a discussion on Re: Suggestion for best testing method within the DB2 forums, part of the Database Server Software category; --> I'm really not very clear about what you're trying to do. There are, of course, many techniques available to ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I'm really not very clear about what you're trying to do. There are, of course, many techniques available to store data in DB2 and to retrieve it. Is that what you mean by reading and writing? I tend to use "read" and "write" more in the context of file I/O, as opposed to database I/O but you may be using the terms differently. If you simply want to put some data in a table and then display that data again to prove that it made it into the table, you should be able to do very easily with SPUFI. (I've never used Z/OS but I'm assuming that it has the same facilities as OS/390, including SPUFI.) Go into SPUFI, which should have been part of the basic install of DB2, and, using an existing PDS (Partitioned Data Set), create a new member with a name of your choice. Type the following into the member: create table test (id smallint not null, name char(10) not null); insert into test values (1, 'Jones'), (2, 'Smith'); select * from test; Then, execute this member. The output should show you the table being created, the rows being added to the table, and the contents of the table being displayed. I'm assuming that the ID you are using has sufficient authority to create the table, populate it, and view its contents and that you have authority to use the default database and tablespace (and that the default database and tablespace exist on your system.) Natural, if you don't have the necessary authority, you will find that these statements don't work. In that case, you'll need one of the administrators to give you that authority before these statements will work. If you'd like to accomplish the same thing in batch, look up DSNTEP2 and/or DSNTIAD in your manuals. These programs give you ways to display data from your tables via batch jobs. If I'm misunderstanding the intent of your question, please clarify it and I'll try again ;-) Rhino "newserver.cisco.com" <crbrown@cisco.com> wrote in message news:1056683181.294794@sj-nntpcache-5... > Hi, > > I need to perform a simple function using DB2 to show a read and write. This > is not a DB2 test but rather DB2 is the tool i am using to perform another > test. > > I am looking for a suggestion on the simplest method to perform this > read/write function. Can this function be performed using a set of commands > in JCL or REXX, or is some programming required in Java or C ? > > Could someone help with an example of performing this function or point me > to the relevent manuals. I have been through the plethero of documentation > and web sites but have failed to find specific examples. > > The OS being used is Z/OS V1R4 > > btw: My knowledge of DB2 is limited so thanks for your patience at such an > ignorant question > > Cheers, > Craig > > |
| |||
| Sorry, I didn't proof-read my reply adequately. Here's the revised version: "Rhino" <rhino1@NOSPAM.sympatico.ca> wrote in message news:KWWKa.5324$iM4.832018@news20.bellglobal.com.. . > I'm really not very clear about what you're trying to do. > > There are, of course, many techniques available to store data in DB2 and to > retrieve it. Is that what you mean by reading and writing? I tend to use > "read" and "write" more in the context of file I/O, as opposed to database > I/O but you may be using the terms differently. > > If you simply want to put some data in a table and then display that data > again to prove that it made it into the table, you should be able to do that > very easily with SPUFI. (I've never used Z/OS but I'm assuming that it has the > same facilities as OS/390, including SPUFI.) Go into SPUFI, which should > have been part of the basic install of DB2, and, using an existing PDS > (Partitioned Data Set), create a new member with a name of your choice. Type > the following into the member: > > create table test > (id smallint not null, > name char(10) not null); > > insert into test values > (1, 'Jones'), > (2, 'Smith'); > > select * from test; > > Then, execute this member. The output should show you the table being > created, the rows being added to the table, and the contents of the table > being displayed. > > I'm assuming that the ID you are using has sufficient authority to create > the table, populate it, and view its contents and that you have authority > to use the default database and tablespace (and that the default database > and tablespace exist on your system.) Natural, Sorry, I meant to say "Naturally," > if you don't have the > necessary authority, you will find that these statements don't work. In that > case, you'll need one of the administrators to give you that authority > before these statements will work. > > If you'd like to accomplish the same thing in batch, look up DSNTEP2 and/or > DSNTIAD in your manuals. These programs give you ways to display data from > your tables via batch jobs. > > If I'm misunderstanding the intent of your question, please clarify it and > I'll try again ;-) > > Rhino > > "newserver.cisco.com" <crbrown@cisco.com> wrote in message > news:1056683181.294794@sj-nntpcache-5... > > Hi, > > > > I need to perform a simple function using DB2 to show a read and write. > This > > is not a DB2 test but rather DB2 is the tool i am using to perform another > > test. > > > > I am looking for a suggestion on the simplest method to perform this > > read/write function. Can this function be performed using a set of > commands > > in JCL or REXX, or is some programming required in Java or C ? > > > > Could someone help with an example of performing this function or point me > > to the relevent manuals. I have been through the plethero of documentation > > and web sites but have failed to find specific examples. > > > > The OS being used is Z/OS V1R4 > > > > btw: My knowledge of DB2 is limited so thanks for your patience at such an > > ignorant question > > > > Cheers, > > Craig > > > > > > |
| ||||
| Thank you, your answer clears up the questions that i had. Cheers, Craig "Rhino" <rhino1@NOSPAM.sympatico.ca> wrote in message news:KWWKa.5324$iM4.832018@news20.bellglobal.com.. . > I'm really not very clear about what you're trying to do. > > There are, of course, many techniques available to store data in DB2 and to > retrieve it. Is that what you mean by reading and writing? I tend to use > "read" and "write" more in the context of file I/O, as opposed to database > I/O but you may be using the terms differently. > > If you simply want to put some data in a table and then display that data > again to prove that it made it into the table, you should be able to do very > easily with SPUFI. (I've never used Z/OS but I'm assuming that it has the > same facilities as OS/390, including SPUFI.) Go into SPUFI, which should > have been part of the basic install of DB2, and, using an existing PDS > (Partitioned Data Set), create a new member with a name of your choice. Type > the following into the member: > > create table test > (id smallint not null, > name char(10) not null); > > insert into test values > (1, 'Jones'), > (2, 'Smith'); > > select * from test; > > Then, execute this member. The output should show you the table being > created, the rows being added to the table, and the contents of the table > being displayed. > > I'm assuming that the ID you are using has sufficient authority to create > the table, populate it, and view its contents and that you have authority > to use the default database and tablespace (and that the default database > and tablespace exist on your system.) Natural, if you don't have the > necessary authority, you will find that these statements don't work. In that > case, you'll need one of the administrators to give you that authority > before these statements will work. > > If you'd like to accomplish the same thing in batch, look up DSNTEP2 and/or > DSNTIAD in your manuals. These programs give you ways to display data from > your tables via batch jobs. > > If I'm misunderstanding the intent of your question, please clarify it and > I'll try again ;-) > > Rhino > > "newserver.cisco.com" <crbrown@cisco.com> wrote in message > news:1056683181.294794@sj-nntpcache-5... > > Hi, > > > > I need to perform a simple function using DB2 to show a read and write. > This > > is not a DB2 test but rather DB2 is the tool i am using to perform another > > test. > > > > I am looking for a suggestion on the simplest method to perform this > > read/write function. Can this function be performed using a set of > commands > > in JCL or REXX, or is some programming required in Java or C ? > > > > Could someone help with an example of performing this function or point me > > to the relevent manuals. I have been through the plethero of documentation > > and web sites but have failed to find specific examples. > > > > The OS being used is Z/OS V1R4 > > > > btw: My knowledge of DB2 is limited so thanks for your patience at such an > > ignorant question > > > > Cheers, > > Craig > > > > > > |