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

Automating the job flows by using the PCOM macros


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

New User


Joined: 16 Jan 2007
Posts: 11
Location: Bangalore

PostPosted: Mon Jul 01, 2013 3:48 pm
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Mon Jul 01, 2013 3:54 pm
Reply with quote

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

New User


Joined: 16 Jan 2007
Posts: 11
Location: Bangalore

PostPosted: Mon Jul 01, 2013 3:57 pm
Reply with quote

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

New User


Joined: 16 Jan 2007
Posts: 11
Location: Bangalore

PostPosted: Mon Jul 01, 2013 3:59 pm
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Mon Jul 01, 2013 4:10 pm
Reply with quote

It is very easily achieved using JCL to submit the next job if the desired return code has been issued.
Back to top
View user's profile Send private message
chandrupegasus
Warnings : 1

New User


Joined: 16 Jan 2007
Posts: 11
Location: Bangalore

PostPosted: Mon Jul 01, 2013 5:05 pm
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Mon Jul 01, 2013 5:09 pm
Reply with quote

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

New User


Joined: 16 Jan 2007
Posts: 11
Location: Bangalore

PostPosted: Mon Jul 01, 2013 5:26 pm
Reply with quote

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

Moderator Emeritus


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

PostPosted: Mon Jul 01, 2013 8:51 pm
Reply with quote

Hello,

Is there some reason this is not defined to and controlled by the system scheduler.
Back to top
View user's profile Send private message
chandrupegasus
Warnings : 1

New User


Joined: 16 Jan 2007
Posts: 11
Location: Bangalore

PostPosted: Wed Jul 03, 2013 8:33 pm
Reply with quote

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

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Wed Jul 03, 2013 9:27 pm
Reply with quote

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
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 Help in Automating Batch JCL jobs mon... JCL & VSAM 3
This topic is locked: you cannot edit posts or make replies. Excel VBA integration with AS400 Macr... All Other Mainframe Topics 1
No new posts ISRE771 error while invoking macros CLIST & REXX 5
No new posts Automating the JCL JCL & VSAM 11
No new posts How to use TPUT to cause PCOM to exec... All Other Mainframe Topics 4
Search our Forums:

Back to Top