View previous topic :: View next topic
|
Author |
Message |
sanjayis01 Warnings : 1 New User
Joined: 13 Jun 2007 Posts: 55 Location: banaglore
|
|
|
|
hi all
how to replace input file automatically in a job
for Example: I have 5 gdg versions
For 1st run it should take filename(0)
for 2nd run it should take filename(-1)
for 3rd run it should take filename(-2)
..............
..............
for 5th run it should take filename(-5)
for repeating the particular step i will use internal reader(INTDR).
could you please help me on this |
|
Back to top |
|
|
hemanth.nandas
Active User
Joined: 18 Aug 2007 Posts: 120 Location: India
|
|
|
|
Hi Sanjay,
I will you the hint to do this.
Create a Dynamic JCL which replace this Dataset every time.
I meant to say that Include a step (prior) to create dynamic JCL to replace this dataset everytime.
Do it your self its very interesting Job and good scenareo. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
how to replace input file automatically in a job |
How will You know the "RUN" number ?
if You always run the 5 things why not have one job with 5 steps ?? |
|
Back to top |
|
|
sanjayis01 Warnings : 1 New User
Joined: 13 Jun 2007 Posts: 55 Location: banaglore
|
|
|
|
yes i agree with you , if we have 255 versions , in that case it is very difficult to write 255 steps.
I doing it for analysis to resoslve one issue
please let me know , if u need anything more.
-----------------------
Hemanth could please post the jcl to change the filename dynamically |
|
Back to top |
|
|
hemanth.nandas
Active User
Joined: 18 Aug 2007 Posts: 120 Location: India
|
|
|
|
Hi Sanjay,
Quote: |
Hemanth could please post the jcl to change the filename dynamically |
Try yourself, try out and let us know if you stuck out somewhere. |
|
Back to top |
|
|
sanjayis01 Warnings : 1 New User
Joined: 13 Jun 2007 Posts: 55 Location: banaglore
|
|
|
|
sorry i dont know any thing about that , if you could give any guidlines , so i can try , |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Please post the info I asked for in my previous post..
How You will determine the run number
if You will always process the five generations
reasons for not submitting a job with five steps
or "RUNS" are actually reruns of the same job caused by errors ??? |
|
Back to top |
|
|
sanjayis01 Warnings : 1 New User
Joined: 13 Jun 2007 Posts: 55 Location: banaglore
|
|
|
|
After the completion of 5 run the job will abend, because it cant find the any files the lib . , I think there is no way to trace the run number . |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
After the completion of 5 run the job will abend, because it cant find the any files the lib . , I think there is no way to trace the run number . |
Could You please answer my previous question ???
if You cannot trace the run number how can You build a good jcl ???
more and more puzzled |
|
Back to top |
|
|
hemanth.nandas
Active User
Joined: 18 Aug 2007 Posts: 120 Location: India
|
|
|
|
Hi Sanjay,
Create the control card in prior step and include this control card in next step.
For this you need to maintain infromation how many times job ran today(consider your ideal scenareo according your requirement). Based on this information update the version number in control card, then use it in Next step.
Maintain control card as
//DYNMICDD DD DSN=your-ddname(vrnbr).
Update vrnbr everytime you ran the job based on Job count and todays date.
To do all this, you have to write a Program. |
|
Back to top |
|
|
sanjayis01 Warnings : 1 New User
Joined: 13 Jun 2007 Posts: 55 Location: banaglore
|
|
|
|
sorry i dont know |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
I will not ask for forgiveness...
/STRONG RUDENESS ON
why did You post asking help for something You know little /nothing about
/STRONG RUDENESS OFF
We are all glad to help,
but any requester should have clear understanding of his needs |
|
Back to top |
|
|
sanjayis01 Warnings : 1 New User
Joined: 13 Jun 2007 Posts: 55 Location: banaglore
|
|
|
|
Thanks Hemantha and enrico-sorichetti , iw ill try this and let u know . |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
Thanks Hemantha and enrico-sorichetti , iw ill try this and let u know |
What are You thanking for ?...
I was asking additional info to try to help You in the best way,
You were not able to reply... I was not able to help You...
MEDITATE PLEASE |
|
Back to top |
|
|
hemanth.nandas
Active User
Joined: 18 Aug 2007 Posts: 120 Location: India
|
|
|
|
Hi Enric and Sanjay,
Quote: |
if You cannot trace the run number how can You build a good jcl ??? |
You can trace How many times Job has ran today, But for this need to maintain dataset with DATE-field and Count - field. Read infromation and check Date and count, Based on this info Rewrite it.
But it is little risky matter since has to create control card and maintaining info in one dataset read it then based condition rewrite it everytime.
Instead of doing all this logic, update version number everytime you submitt the Job. |
|
Back to top |
|
|
sanjayis01 Warnings : 1 New User
Joined: 13 Jun 2007 Posts: 55 Location: banaglore
|
|
|
|
hi enrico
i didnt get you what you are asking
can u post little bit clear
so i can give you some more information which u need |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
You want to replace a dataset name in a jcl stream .. OK
It can be done thru job scheduler rules
writing a program ( in extended sense ) to generate the jcl with the customized info
Now You posted a sample ( confusing I would say )
please reply to these simple questions
is it a real scenario ??
if it so then ...
How do You determine the run number ?
why the limit of 5 reruns ?
otherwise forget about it
was I clear
some time ago I posted a rexx sample on how to build some jcl
search for it |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
Back to top |
|
|
sanjayis01 Warnings : 1 New User
Joined: 13 Jun 2007 Posts: 55 Location: banaglore
|
|
|
|
hi Enrico
I just gave u example of 5 generations . i need to run it for 255 versions of GDG (My need is to replace GDG versions )
once 255 runs completed means i will cancel this job manually which serves my need. , i m not implemeting this in PROD. this is for analysis And REXX i dont know.
What u have understood is absolutely correct ! |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
if it is a one time job why not use a procedure...
Code: |
//some_name JOB ....
//proc_name PROC
//step_name EXEC .....
//dd_name DD .....
// DSN=gdg_name(&gen)
...
...
// PEND
//s0 EXEC proc_name,GEN='0'
//s1 EXEC proc_name,GEN='-1'
//s2 EXEC proc_name,GEN='-2'
//s3 EXEC proc_name,GEN='-3'
.....
//sx EXEC proc_name,gen='-255'
|
If You had used this approach,
less network traffic,
less typing for everybody,
less forum flames due to misunderstandings |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
enrico-sorichetti wrote: |
but any requester should have clear understanding of his needs |
Yeah..there is saying I read somewhere.."A perfect man has the answer of all the questions but you should have the right question." |
|
Back to top |
|
|
|