View previous topic :: View next topic
|
Author |
Message |
Susanta
Active User
Joined: 17 Nov 2009 Posts: 126 Location: India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
Back to top |
|
|
|