Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Test Data

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Susanta

Active User


Joined: 17 Nov 2009
Posts: 122
Location: India

PostPosted: Thu Sep 08, 2011 6:46 pm    Post subject: Test Data
Reply with quote

Hi

This is for creating test data.

I have few rows i one table with CUD-No as the primary key and the table has 300 + columns.

I need to create almost 300 to 400 records , i am trying to create all these rows just copying the one of existing row but just incrementing the CUD-No , is there any way to do it . I do not want to use column list in the sql as there are so many columns , again i do not want to create rows with any default value i want to pick all values to be picked as exists for the sample CUD-No (which is existin in the table)

Could you please help.
Thanks.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Sep 08, 2011 8:59 pm    Post subject:
Reply with quote

Hello,

Create one "loadable" record using an editor.

Clone the one record incrementing the key and changing any data that would be useful in testing.

Load the sequential file into the table.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Sep 08, 2011 9:24 pm    Post subject:
Reply with quote

Susanta wrote:
I do not want to use column list in the sql as there are so many columns


if you had decent ISPF skills,
capturing the column names and putting them in your sql would take 30 seconds.

change the select CUD-No + 1 in your dsntemp2/dsnutial dump
then you have an unload that you could immediately reload.

use the ispf command CUT (CC on first column name and CC on last)
to capture the column names in the ddl
use the ispf command PASTE
to put them in a member that you use for your sysltin
x all, display the first (line command F)
display the last (line command L)
use )) to shift the column names where you want them,
Insert a line containing a comma ',' aligned before the start of column name
line command M on the comma line,
line command OO on the first non-displayed line,
line command OO on the last line (the last column name which is displayed)
add the '+ 1' to CUD_No
save and execute.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Thu Sep 08, 2011 10:10 pm    Post subject:
Reply with quote

Susanta,

You can also have IEBDG utility as one of the options for generating test data.

Check the following links,
The IEBDG utility: Generate test data

Also use search in IBMMAINFRAMEs, you can come across link like these,
Generating a Sequence and storing in file

Thanks,
Sushanth
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Data replication from multiple Db2 ta... kishpra DB2 1 Mon Mar 27, 2017 9:58 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us