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

Replacing input file automatically


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sanjayis01
Warnings : 1

New User


Joined: 13 Jun 2007
Posts: 55
Location: banaglore

PostPosted: Fri Nov 02, 2007 12:28 pm
Reply with quote

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
View user's profile Send private message
hemanth.nandas

Active User


Joined: 18 Aug 2007
Posts: 120
Location: India

PostPosted: Fri Nov 02, 2007 2:13 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Nov 02, 2007 2:19 pm
Reply with quote

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
View user's profile Send private message
sanjayis01
Warnings : 1

New User


Joined: 13 Jun 2007
Posts: 55
Location: banaglore

PostPosted: Fri Nov 02, 2007 2:29 pm
Reply with quote

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
View user's profile Send private message
hemanth.nandas

Active User


Joined: 18 Aug 2007
Posts: 120
Location: India

PostPosted: Fri Nov 02, 2007 3:31 pm
Reply with quote

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
View user's profile Send private message
sanjayis01
Warnings : 1

New User


Joined: 13 Jun 2007
Posts: 55
Location: banaglore

PostPosted: Fri Nov 02, 2007 3:48 pm
Reply with quote

sorry i dont know any thing about that , if you could give any guidlines , so i can try ,
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Nov 02, 2007 3:55 pm
Reply with quote

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
View user's profile Send private message
sanjayis01
Warnings : 1

New User


Joined: 13 Jun 2007
Posts: 55
Location: banaglore

PostPosted: Fri Nov 02, 2007 4:01 pm
Reply with 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 .
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Nov 02, 2007 4:04 pm
Reply with quote

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
View user's profile Send private message
hemanth.nandas

Active User


Joined: 18 Aug 2007
Posts: 120
Location: India

PostPosted: Fri Nov 02, 2007 4:06 pm
Reply with quote

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
View user's profile Send private message
sanjayis01
Warnings : 1

New User


Joined: 13 Jun 2007
Posts: 55
Location: banaglore

PostPosted: Fri Nov 02, 2007 4:06 pm
Reply with quote

sorry i dont know
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Nov 02, 2007 4:11 pm
Reply with quote

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
View user's profile Send private message
sanjayis01
Warnings : 1

New User


Joined: 13 Jun 2007
Posts: 55
Location: banaglore

PostPosted: Fri Nov 02, 2007 4:19 pm
Reply with quote

Thanks Hemantha and enrico-sorichetti , iw ill try this and let u know .
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Nov 02, 2007 4:23 pm
Reply with quote

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
View user's profile Send private message
hemanth.nandas

Active User


Joined: 18 Aug 2007
Posts: 120
Location: India

PostPosted: Fri Nov 02, 2007 4:27 pm
Reply with quote

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
View user's profile Send private message
sanjayis01
Warnings : 1

New User


Joined: 13 Jun 2007
Posts: 55
Location: banaglore

PostPosted: Fri Nov 02, 2007 4:28 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Nov 02, 2007 4:45 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Nov 02, 2007 4:52 pm
Reply with quote

here is a pointer to my sample
http://www.ibmmainframes.com/viewtopic.php?t=24978&highlight=rexx
Back to top
View user's profile Send private message
sanjayis01
Warnings : 1

New User


Joined: 13 Jun 2007
Posts: 55
Location: banaglore

PostPosted: Fri Nov 02, 2007 4:54 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Nov 02, 2007 5:06 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Nov 05, 2007 5:26 pm
Reply with quote

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
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top