MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Execution of a Particular Step for 'n' times

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
sakreg
Beginner


Joined: 28 Feb 2005
Posts: 80
Topics: 26

PostPosted: Mon Jun 13, 2005 2:24 am    Post subject: Execution of a Particular Step for 'n' times Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Mon Jun 13, 2005 5:06 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
sakreg
Beginner


Joined: 28 Feb 2005
Posts: 80
Topics: 26

PostPosted: Mon Jun 13, 2005 9:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Mon Jun 13, 2005 9:23 pm    Post subject: Reply with quote

Sakreg,

Did you get a chance to search the forums ? Check these links for similar topics

http://www.mvsforums.com/helpboards/viewtopic.php?t=2787&highlight=sqlcards

http://www.mvsforums.com/helpboards/viewtopic.php?t=3369&highlight=sqlcards

Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group