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

Can we execute more than one program in a single step ?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
dineshsjce
Currently Banned

New User


Joined: 16 Apr 2007
Posts: 41
Location: Bangalore

PostPosted: Mon Apr 16, 2007 2:05 pm
Reply with quote

Can we execute more than one program in a single step ?
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Mon Apr 16, 2007 2:23 pm
Reply with quote

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

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon Apr 16, 2007 3:04 pm
Reply with quote

...or it can be a load module containing multiple programs (composite).

O.
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: Tue Apr 17, 2007 11:39 pm
Reply with quote

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

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Wed Apr 18, 2007 2:20 pm
Reply with quote

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

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Wed Apr 18, 2007 6:37 pm
Reply with quote

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

Moderator Emeritus


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

PostPosted: Wed Apr 18, 2007 7:17 pm
Reply with quote

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

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Thu Apr 26, 2007 7:05 pm
Reply with quote

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

Moderator Emeritus


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

PostPosted: Thu Apr 26, 2007 9:57 pm
Reply with quote

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

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Thu Apr 26, 2007 11:13 pm
Reply with quote

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.
icon_smile.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Fri Apr 27, 2007 8:04 pm
Reply with quote

ah..I accept your views with a hichh..!
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 220
Location: USA

PostPosted: Tue May 08, 2007 4:38 pm
Reply with quote

//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 icon_lol.gif
[/code]
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Tue May 08, 2007 4:46 pm
Reply with quote

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. icon_smile.gif
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: Tue May 08, 2007 7:36 pm
Reply with quote

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
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 220
Location: USA

PostPosted: Tue May 08, 2007 8:40 pm
Reply with quote

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. icon_sad.gif

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 icon_smile.gif
Back to top
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 220
Location: USA

PostPosted: Tue May 08, 2007 9:00 pm
Reply with quote

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. icon_sad.gif

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 icon_smile.gif
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1050
Location: Richmond, Virginia

PostPosted: Tue May 08, 2007 9:09 pm
Reply with quote

Time to kill this discussion.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts combine multiple unique records into ... DFSORT/ICETOOL 2
No new posts Error to invoke MPP program through B... IMS DB/DC 3
No new posts SORT JCL to merge multiple tow into s... DFSORT/ICETOOL 6
No new posts Using API Gateway from CICS program CICS 0
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top