Unix Technical Forum

Re: Suggestion for best testing method

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 ...


Go Back   Unix Technical Forum > Database Server Software > DB2

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-26-2008, 09:46 AM
Rhino
 
Posts: n/a
Default Re: Suggestion for best testing method

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
>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-26-2008, 09:46 AM
Rhino
 
Posts: n/a
Default Re: Suggestion for best testing method

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
> >
> >

>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-26-2008, 09:47 AM
Craig Brown
 
Posts: n/a
Default Re: Suggestion for best testing method

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
> >
> >

>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:10 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com