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
 

 

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

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Can we execute more than one program in a single step ?
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: 1439
Location: Bangalore,India

PostPosted: Mon Apr 16, 2007 2:23 pm    Post subject:
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: 2360
Location: Israel

PostPosted: Mon Apr 16, 2007 3:04 pm    Post subject:
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

Site Director


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

PostPosted: Tue Apr 17, 2007 11:39 pm    Post subject:
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

Senior Member


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

PostPosted: Wed Apr 18, 2007 2:20 pm    Post subject:
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: 685
Location: Earth

PostPosted: Wed Apr 18, 2007 6:37 pm    Post subject:
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

Site Director


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

PostPosted: Wed Apr 18, 2007 7:17 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Apr 26, 2007 7:05 pm    Post subject:
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

Site Director


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

PostPosted: Thu Apr 26, 2007 9:57 pm    Post subject:
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: 685
Location: Earth

PostPosted: Thu Apr 26, 2007 11:13 pm    Post subject:
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

Senior Member


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

PostPosted: Fri Apr 27, 2007 8:04 pm    Post subject:
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: 189
Location: INDIA

PostPosted: Tue May 08, 2007 4:38 pm    Post subject: Here is the solution to run multiple step in single step
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: 685
Location: Earth

PostPosted: Tue May 08, 2007 4:46 pm    Post subject:
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

Site Director


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

PostPosted: Tue May 08, 2007 7:36 pm    Post subject:
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: 189
Location: INDIA

PostPosted: Tue May 08, 2007 8:40 pm    Post subject: Re: Can we execute more than one program in a single step ?
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: 189
Location: INDIA

PostPosted: Tue May 08, 2007 9:00 pm    Post subject: Re: Can we execute more than one program in a single step ?
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

Active Member


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

PostPosted: Tue May 08, 2007 9:09 pm    Post subject:
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.    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts A sample of exit program for exit XMN... lind sh CICS 2 Mon Oct 03, 2016 5:07 pm
No new posts Need points to tune IMS Checkpoint Pr... satish.ms10 IMS DB/DC 2 Fri Sep 30, 2016 4:12 pm


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