Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Dynamic JCL run by checking RC in $AVRS for prev run

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Sushant Singh

New User


Joined: 27 Jul 2010
Posts: 3
Location: Pune

PostPosted: Thu Jul 29, 2010 12:40 pm    Post subject: Dynamic JCL run by checking RC in $AVRS for prev run
Reply with quote

Hi All,

I have a requirement to create a JCL, to copy some sequence of files into a fixed file with the condition of checking the Return code of preccessor job in successor job from $AVRS.

Sequence of files:
PROJ.SPLTFILE.F01
PROJ.SPLTFILE.F02
PROJ.SPLTFILE.F03
.....
.....
.....
PROJ.SPLTFILE.F99

Fixed File:
PROJ.CONV.OUTPUT

Here above fixed file is an auto trigger file job i.e. when we edit this file with some data, this file automatically trigger a job in production whose output can be verified in $AVRS spool.

Actually, if we consider it manually then we do a copy operation for above sequential files individually through a SORT job or IEBGENER. Then we check the RC for this job and auto trigger file job in $AVRS (both should be RC=0) before doing the copy operation for next sequential file. We need to automate this process since the amount of input sequential files are sometimes very large due to which we need to run the job many times.
I think of some solution using internal reader but couln't find much.

Kindly suggest some solution for this and let me know in case of any doubt.

Thanks,
Sushant
Back to top
View user's profile Send private message

sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Wed Aug 04, 2010 8:30 pm    Post subject:
Reply with quote

Hi Sushant,

Welcome to IBMMAINFRAMES,

Quote:
copy some sequence of files into a fixed file with the condition of checking the Return code of preccessor job in successor job from $AVRS.


We do this by setting up the scheduling criteria. So, the second job will not be executed until the first job finishes successfully.

Hope this helps,
Sushanth
Back to top
View user's profile Send private message
Sushant Singh

New User


Joined: 27 Jul 2010
Posts: 3
Location: Pune

PostPosted: Mon Aug 09, 2010 3:27 pm    Post subject: Reply to: Dynamic JCL run by checking RC in $AVRS for prev r
Reply with quote

Hi Sushanth,

Thanks for replying. icon_smile.gif

Please note that first job is just a copy job in which the sequential files are getting copied into a fixed file which is an auto trigger file. This trigger file
triggers a job in production just after editing and the output of this trigger job is seen in $AVRS. The first job that is a copy job, runs in user/unit region (i.e. TSOA) not in production and second job i.e. auto trigger file job runs in production.
Now the query is that if we use scheduling criteria between these two jobs then how to put time lag between each steps of the first copy job. Because the second/successor step should be run after obtaining the output of the first/preccessor step production run in $AVRS. I mean the next step should be run only after verifying the output of first copy step run (i.e. the auto trigger file run) in production. Here, we have to set a condition in steps of user/unit region job to run depending on the corresponding production region job run return code.

Hope you get my points but please let me know in case of any concern.

Thanks & regards,
Sushant
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Aug 10, 2010 12:47 am    Post subject:
Reply with quote

Hello,

Suggest the approach to this "requirement" be re-visited. . .

Knowing how the scheduling system works could save a lot of extra work and false starts. The scheduling people should be able to provide all of the informatoin needed.

You do not want to implement a process that can easily be disrupted and cause even more problems.

Quote:
I mean the next step should be run only after verifying the output of first copy step run (i.e. the auto trigger file run) in production.
What needs to be verified? If the job ends successfully, the process should continue. . . icon_confused.gif
Back to top
View user's profile Send private message
Sushant Singh

New User


Joined: 27 Jul 2010
Posts: 3
Location: Pune

PostPosted: Wed Aug 11, 2010 1:48 pm    Post subject: Reply to: Dynamic JCL run by checking RC in $AVRS for prev r
Reply with quote

Hi Dick,

perhaps i couldn't articulate my requirement earlier. Below it goes -

I have 2 jobs - job 1 and job 2. Job 1 has say 10 steps and job 2 has only one step.I want job execution in following order -

job1 step1
job2
job1 step2
job2
job1 step3
job2
job1 step4
job2
...
...

i require this sequence because steps in job1 just copy different files into
a dataset, say triggerfile. whenever this triggerfile is edited, job2 gets triggered in production environment. so i want next step of job1 get started only when job2 is complete.

is there any way to check RC of job2 in job1 steps? or is there any other solution to this prob.?

Thanks,
Sushant
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 11, 2010 1:52 pm    Post subject:
Reply with quote

The two jobs can not interface in the way that you have described unless each job2 is a different name and you have batch pipes installed and running. But even that may not give you what you want.

If I were you, I would recreate job1 and include the step of job2 after each process of a step of job1.
Back to top
View user's profile Send private message
Liasar Rico

New User


Joined: 19 Aug 2010
Posts: 2
Location: Phoenix

PostPosted: Fri Aug 20, 2010 10:33 am    Post subject:
Reply with quote

Sushant -

To make your life easier, you can split Job1 steps into jobs (step3 to Job3, step4 to Job5...) and then make a scheduling change between the jobs. So in your Unit / user region, you will need to create dependency on those jobs. Job 1(originally step1) should be predecessor of Job2(originally step2), etc...

And aside from that, you also need to add a dataset trigger on those jobs which would be produced by the job you have in your production region which is Job2.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extract Data till prev hour balaji81_k DB2 16 Fri Aug 25, 2017 9:25 pm
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us