View previous topic :: View next topic |
Author |
Message |
sakreg Beginner
Joined: 28 Feb 2005 Posts: 80 Topics: 26
|
Posted: Mon Jun 13, 2005 2:24 am Post subject: Execution of a Particular Step for 'n' times |
|
|
Can some one let me know, if it is possible to execute a particular step for some 221 times or some 'n' times as required.
Actual need is to insert some 2585 records to a production table. All the attributes value remains the same.For a specific combination of values, I need to insert some 20 rows and for another set I need to insert some 50 rows and so on.
I am planning to do this using SPUFI via the SYSIN Card with JCL. I am looking for a way how to instruct the JCL, in such a way that it executes, that particular step the number of times as we instruct.
Is this possible?If so, please let me know how to have the JCL set-up.
Post all your valuable suggestion. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Mon Jun 13, 2005 5:06 am Post subject: |
|
|
sakreg,
There are a couple of ways of doing it. You can use DFSORT's REPEAT parm which lets you repeat a line 'n' number of times. So you can generate your Sql stmts running just 1 step. Post your sample input and desired update/insert sql statements and we will show you a way to do.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
sakreg Beginner
Joined: 28 Feb 2005 Posts: 80 Topics: 26
|
Posted: Mon Jun 13, 2005 9:07 pm Post subject: |
|
|
Hi Kolusu,
Basically I am looking for a SPUFI Generator. In my previuos post, I had confused that. Repeating a Step will not solve the pbm as there are thousand of rows with different inputs for the UPDATE SQL.
I have an Input file:
Quote: |
0016346373CHENNAI IN1
0016126373BOMBAY IN2
0016006373CALCUTTAIN3
0013416373TVM IN4
0019566373COCHIN IN5
|
Similarly like this I will have thousands of rows.
Task is to Generate Update SPUFI like this:
Quote: |
UPDATE DBA.TABLE
SET ATTR1 = Value @ Column 4 (3 Characters)
WHERE ATTR2 = Value @ Column 11 (8 Charcters)
|
Based on the value for first row,
I should get an UPDATE SPUFI like:
Quote: |
UPDATE DBA.TABLE
SET ATTR1 = 034 (3 Characters)
WHERE ATTR2 = 'CHENNAI' (8 Charcters)
|
in another Output file.
The aim is to generate somewhere around 3000 SPUFI to Update a table in Prod.
I think JCL can be used to generate such SPUFI based on the value from input file.
Hope my illustration is fine to help me out.
I am Sorry for my initial post which is NOT exactly what I was looking for. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
|
Back to top |
|
|
|
|