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
 

 

Automating the job flows by using the PCOM macros

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: Automating the job flows by using the PCOM macros
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: 8593
Location: Back in jolly old England

PostPosted: Mon Jul 01, 2013 3:54 pm    Post subject:
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    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Jul 01, 2013 4:10 pm    Post subject:
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    Post subject:
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: 7908
Location: Bellevue, IA

PostPosted: Mon Jul 01, 2013 5:09 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Mon Jul 01, 2013 8:51 pm    Post subject:
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    Post subject:
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: 645
Location: Pennsylvania

PostPosted: Wed Jul 03, 2013 9:27 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Automating the JCL rdr JCL & VSAM 11 Wed Mar 02, 2016 6:07 pm
No new posts How to use TPUT to cause PCOM to exec... Robert Schreiber All Other Mainframe Topics 4 Wed Aug 20, 2014 5:16 pm
No new posts Executing macros to all the members a... sakrat TSO/ISPF 1 Sun Apr 06, 2014 11:54 am
No new posts Loading BMS macros to SDF II Graham Hobbs CICS 4 Sun Mar 04, 2012 11:49 pm
No new posts Want to learn IBM PCOM macro Gopalakrishnan V All Other Mainframe Topics 8 Mon Jul 04, 2011 3:22 pm


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