IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Test Data


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Susanta

Active User


Joined: 17 Nov 2009
Posts: 126
Location: India

PostPosted: Thu Sep 08, 2011 6:46 pm
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

Moderator Emeritus


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

PostPosted: Thu Sep 08, 2011 8:59 pm
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
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: 1020
Location: India

PostPosted: Thu Sep 08, 2011 10:10 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top