View previous topic :: View next topic
|
Author |
Message |
dineshsjce Currently Banned New User
Joined: 16 Apr 2007 Posts: 41 Location: Bangalore
|
|
|
|
Can we execute more than one program in a single step ? |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Quote: |
Can we execute more than one program in a single step ? |
Only one program can be submitted in any given step (but this can call another program). |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
...or it can be a load module containing multiple programs (composite).
O. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
The EXEC statement is the "new step" - it is the way the system knows the end of one step and the beginning of the next.
Do you have a requirement we might offer suggestions for, or is the question for learning? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
yeah..I'll follow Dick words, Please let us know why there is a requirement to run more than one pgm in a single step.
If it's a learnig process then I'll say that we cant have this type of code in JCL/s
1. //JOBCARD
//step1 EXEC PGM=PGM1, PGM2
//steplib
2. //JOBCARD
//step1 EXEC PGM=PGM1, PGM=PGM2
//steplib
3. //JOBCARD
//step1 EXEC PGM=PGM1
//step2 EXEC PGM=PGM2
You'll get a JCL syntax err for all the above codes.
|
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Anuj,
Quote: |
3. //JOBCARD
//step1 EXEC PGM=PGM1
//step2 EXEC PGM=PGM2 |
What is the problem with this job? I think it is perfectly allright. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
#3 is ok as long as pgm1 and pgm2 are in the linklist - it not, it won't be a jcl error - it should be an 806 abend as there is no steplib or joblib. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Hi,
I tried the following at my shop, (in CHGMAN environment)
//STEP016 EXEC PGM=PGM1,REGION=4096K
//STEP017 EXEC PGM=PGM2,REGION=4096K
//STEPLIB DD DSN=CHGMAN.PKG.LOD,
// DISP=SHR
// DD DSN=TEST-REGION.IPCW.PROD.PGMLIB,
// DISP=SHR
// DD DSN=TEST-REGION.IPCW.PROD.LINKLIB,
// DISP=SHR
when I do JEM, got the following JCL err msg:
*** ERROR SUMMARY AND COUNTS *** JEM 6.2.7A 04/26/2007 06:04:08
0 ADVISORY LEVEL
0 WARNING LEVEL
1 ERROR LEVEL
1 TOTAL ISSUED 0 SUPPRESSED.
THE HIGHEST SEVERITY CODE ENCOUNTERED WAS 08.
LABEL SV MSG.NO. ERROR MESSAGE
-------- -- -------- ------------------------------------------------
.JAAA 8 DSS2050E - PROGRAM "PGM1 " NOT FOUND
If I ignore the above msg & SUBmits the JOB, then I'll get ABEND S806.I I think you wanted to say this only.
Still, if I get the above message, should not it be cosidered as JCL err at first place?
& yeah programs PGM1, PGM2 are development pgms, they are not utility pgms such as SORT etc.
Please clarify. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
No, this
Quote: |
should not it be cosidered as JCL err at first place? |
should not be a "jcl error". The jcl meets all of the syntax rules.
The system will not "throw away" the job, as though it had bad jcl, if there is a PGM=pgmname which specifies a non-existant program. One reason is that while the program is not available at submit time, it may be available when the step is actually executed.
Depending on how libraries are set up at your location, STEP016 may or may not execute successfully. |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Quote: |
//STEP016 EXEC PGM=PGM1,REGION=4096K |
Anuj,
Even if we don't specify JOBLIB OR STEPLIB in JOB system searches the executable module in system library (SYS1.LINKLIB for example)
At the most it will abend giving S806 abend, but certainly it will not give JCL error.
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
ah..I accept your views with a hichh..! |
|
Back to top |
|
|
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 220 Location: USA
|
|
|
|
//stepname EXEC Procname like this
Put all your steps in the proc you are calling In the above example put all your steps in the proc you are calling.
Then when the JCL executes that proc it will open that proc and will execute all the steps in the proc.
But here the constraint is you need to code the Proc as follows
//Procname PROC SFX=P,
// GEN='(+1)', These are the optional ones you may code or you can skip. Because those are symbolic parameters I have used in my proc so I coded if you don't need it no need to code it.
*---------------------*
Start Coding the Steps you wan to execute.
//Step name EXEC PGM=Pgm-Name
Hence you have executed multiple steps in a single step
What do you say Dinesh?
Please let me know any body if I told any thing wrong?
I am sure from my side becuase it is implemented and it is now running currently in production.
Thank You,
Amar
[/code] |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Amar,
It looks like you are executing a procedure, not a program, inside the procedure there are multiple steps. This is a very common scenario, I don't consider this as executing multiple programs in one step. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello Amar,
This
Quote: |
Start Coding the Steps you wan to execute.
//Step name EXEC PGM=Pgm-Name
Hence you have executed multiple steps in a single step
Please let me know any body if I told any thing wrong?
I am sure from my side becuase it is implemented and it is now running currently in production.
|
would surely run correctly. However, it does not execute "multiple programs" in a single step. The "Hence" is incorrect. If you look thru your PROC, you will probably see several "//stepname EXEC PGM=" statements - these are steps and there is only one EXEC per step. It's not just a good idea - it's the law.
I would encourage using the proper wording so that when there is a discussion, everyone has the same foundation. |
|
Back to top |
|
|
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 220 Location: USA
|
|
|
|
Hello dick scherrer
I am not pointing out any body in this message. I didnt point out also if you read my message posted earlier.
But you are pointing out my mistake that I have wrong wording.
if i gave wrong solution then you would have told me that "That won;t meet the requirement"
Again you are telling like its not a good idea and as far as I know there is no good and bad , every thing is the way we think and understand it perfectly.
I didnt use improper wording. I just posted my idea. If it is wrong or my understanding of the requirement is wrong and if I hurted any body I am sorry all
Thank you
Amar |
|
Back to top |
|
|
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 220 Location: USA
|
|
|
|
Hello dick scherrer
I am not pointing out any body in this message. I didnt point out also if you read my message posted earlier.
But you are pointing out my mistake that I have wrong wording.
if i gave wrong solution then you would have told me that "That won;t meet the requirement"
Again you are telling like its not a good idea and as far as I know there is no good and bad , every thing is the way we think and understand it perfectly.
I didnt use improper wording. I just posted my idea. If it is wrong or my understanding of the requirement is wrong and if I hurted any body I am sorry all
Thank you
Amar |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
Time to kill this discussion. |
|
Back to top |
|
|
|