Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Replacing input file automatically
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: Replacing input file automatically
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: Chennai

PostPosted: Fri Nov 02, 2007 2:13 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Nov 02, 2007 2:19 pm    Post subject: Reply to: Replacing input file automatically
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    Post subject:
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: Chennai

PostPosted: Fri Nov 02, 2007 3:31 pm    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Nov 02, 2007 3:55 pm    Post subject: Reply to: Replacing input file automatically
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Nov 02, 2007 4:04 pm    Post subject: Reply to: Replacing input file automatically
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: Chennai

PostPosted: Fri Nov 02, 2007 4:06 pm    Post subject:
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    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Nov 02, 2007 4:11 pm    Post subject: Reply to: Replacing input file automatically
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Nov 02, 2007 4:23 pm    Post subject: Reply to: Replacing input file automatically
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: Chennai

PostPosted: Fri Nov 02, 2007 4:27 pm    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Nov 02, 2007 4:45 pm    Post subject: Reply to: Replacing input file automatically
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Nov 02, 2007 4:52 pm    Post subject: Reply to: Replacing input file automatically
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Nov 02, 2007 5:06 pm    Post subject: Reply to: Replacing input file automatically
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 15 Tue Dec 06, 2016 8:04 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us