View previous topic :: View next topic
|
Author |
Message |
chandrupegasus Warnings : 1 New User
Joined: 16 Jan 2007 Posts: 11 Location: Bangalore
|
|
|
|
I have some set of jobs to be run continously. The job should continue to run based on the previous job successful completion. for ex, job 1 ends with CC 0000, if the job 1 ends with this code then I have to go for next job. So I am trying to automate the jobs thru PCOM macro. Please refer the attached doc and could any one of you pls help me on this.
Joblog from Spool: QSHK4CNA JOB51929 PSAH CC 0000
I want to compare the CC 0000 with my excel sheet value.
can you pls help me on this.
Thanks,
chandra.R |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
1) DO NOT post attachments, a lot of sites disallow the download of these.
2) People dislike them and will not bother to respond to your request.
This is a frequently asked question, so please search the forum for ideas and solutions. |
|
Back to top |
|
|
chandrupegasus Warnings : 1 New User
Joined: 16 Jan 2007 Posts: 11 Location: Bangalore
|
|
|
|
Thanks for your note Expat. I will avoid the attachment henceforth. First I searched this topic in the forum and understood that most of the solution was provided to use REXX language by using the RC field. As I don't know REXX, I tried in PCOM itself. could you please help me on this?.
Thanks,
Chandra.R |
|
Back to top |
|
|
chandrupegasus Warnings : 1 New User
Joined: 16 Jan 2007 Posts: 11 Location: Bangalore
|
|
|
|
Adding one point here, I know that we can use Gettext command, but we need to give the cursor position and length of the field. but in my case, as the same job ran lot of times, i will not be able to identify the current cursor position of this job. so please share your suggestions. thanks.
thanks,
Chandra.R |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
It is very easily achieved using JCL to submit the next job if the desired return code has been issued. |
|
Back to top |
|
|
chandrupegasus Warnings : 1 New User
Joined: 16 Jan 2007 Posts: 11 Location: Bangalore
|
|
|
|
Yes, I agreed your point. But If we dont need to change any parameters in each job, it will be easy to use JCL to give If CC of prev job = 0 then continue the 2nd job in the same JCL. In my case, I have some date variables like $DATE_PC_DE, $DATE_PC_DE. , XXXX-XX-XX etc to be changed with my run date in each job and I need to insert the input files in some of my jobs as well. so in this case If I club all jobs in a single JCL and run the each job based on the "IF CC of prev job = 0 then run the next job". I will not be able to insert the input files and changing the date variables where ever I required. Please correct me If I am wrong in this point. Thanks.
But anyway I will try your valueable suggestion as well. Please help me If there are any command to automate in my PCOMM macro.
Thanks,
chandr.R |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
chandrupegasus, you seem to be focused on one single solution to your problem. This solution most likely is not the best, nor the easiest to implement, nor provide you a complete solution.
We do not recommend attempting to write your own job scheduler as that is considerably beyond the abilities of many programmers to successfully implement. However, it is easy -- as long as your jobs need to run sequentially -- to add a step to the end of each job that submits the next job through the internal reader. You can also use condition code checking to determine whether or not to submit that next job.
Using PCOM macros may -- or may not -- provide you with what you want, and will definitely be more complicated to implement, and you may not find a lot of expertise on PCOM macros on this forum. So if you want to continue down the path you are going, be aware that we may not be able to provide much assistance in implementing PCOM macros to do what you want, especially since we are recommending an alternative approach that is easy to implement. |
|
Back to top |
|
|
chandrupegasus Warnings : 1 New User
Joined: 16 Jan 2007 Posts: 11 Location: Bangalore
|
|
|
|
Ok, thanks for the response Robert. As per Expat's earlier comment to use the JCL to submit the jobs one by one, I will try to use this and come back If any issues. Thanks for your time and support. thanks.
Thanks,
Chandra.R |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Is there some reason this is not defined to and controlled by the system scheduler. |
|
Back to top |
|
|
chandrupegasus Warnings : 1 New User
Joined: 16 Jan 2007 Posts: 11 Location: Bangalore
|
|
|
|
Sorry for the delay response. Yes Dick, actually am trying to do automation for running the job flows to avoid the manual intervention. So I will not be able to ask the scheduler for this. As per the expat's previous reply, I will try in submitting JCLs thru internal reader and let you all know If need any help.
But still my question is, If I get any suggestions by using the PCOMM macro,. it will be greatful for me. I can improve my skills in PCOMM macro as well. Expecting your valuable suggestions on this.
thanks,
Chandra.R |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Chandra.R
Quote: |
Yes Dick, actually am trying to do automation for running the job flows to avoid the manual intervention. So I will not be able to ask the scheduler for this. |
The purpose of a scheduling package is to do exactly that: Automation of running Job flows to avoid manual intervention. Your Scheduler's (the person) job is to help you with that.
Quote: |
But still my question is, If I get any suggestions by using the PCOMM macro,. it will be greatful for me. I can improve my skills in PCOMM macro as well. Expecting your valuable suggestions on this.
|
You have already received several suggestions. Do not use PCOMM to do this.
Rather than trying to improve your PCOMM skills, try improving your reading comprehension skills. |
|
Back to top |
|
|
|