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
 

 

Through a single JCL,submit different steps of different job
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Aradhana Rathore.

New User


Joined: 22 Jul 2013
Posts: 12
Location: INDIA

PostPosted: Mon Jul 22, 2013 10:11 pm    Post subject: Through a single JCL,submit different steps of different job
Reply with quote

Hi Folks,

I have a basic idea about IEBEDIT utility through which we can include or exclude particular step of a jcl.
Now, my requirement is that through a single JCL I want to include/exclude one step of jobA and one step of jobB as well.I.e through a single jcl I can include/exclude step of 2 different jobs.

Quick resolution is appreciated.
If possible kindly provide me code.

TIA.
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Mon Jul 22, 2013 10:28 pm    Post subject:
Reply with quote

  1. I recommend that you read the IEBEDIT documentation; example 2 is essentially what you want.
  2. Note that speed of my (or anyone else's) replies is determined by my interest and availability, not by your perception of criticality.
  3. If possible kindly provide me with my (or other developer with whom you come to agreement) standard billing rate for writing this code (my billing rate is Rs. 5,000/hour, pre-paid, minimum of one hour; others' rates will differ. Caveat emptor).
Back to top
View user's profile Send private message
Aradhana Rathore.

New User


Joined: 22 Jul 2013
Posts: 12
Location: INDIA

PostPosted: Mon Jul 22, 2013 10:36 pm    Post subject: Reply to: Through a single JCL,submit different steps of dif
Reply with quote

Thanks for quick reply.

I already gone through that document and tested the same , but its not working fine for me.I have a doubt in that, if possible please clarify.

//EDIT2 JOB ...
//STEP1 EXEC PGM=IEBEDIT
//SYSPRINT DD SYSOUT=A
//SYSUT1 DD DSN=INJOBS,DISP=(OLD,KEEP),VOLUME=SER=001234,
// UNIT=tape
//SYSUT2 DD DSN=OUTSTRM,UNIT=tape,DISP=(NEW,KEEP),
// DCB=(RECFM=F,LRECL=80,BLKSIZE=80),LABEL=(2,SL)
//SYSIN DD *
EDIT START=JOBA,TYPE=INCLUDE,STEPNAME=(STEPC,STEPD)
EDIT START=JOBB,TYPE=INCLUDE,STEPNAME=STEPE
EDIT START=JOBC,TYPE=INCLUDE,STEPNAME=STEPJ

Here they are referring UNIT=tape, can't we refer current device(SYSDA etc).
Back to top
View user's profile Send private message
Aradhana Rathore.

New User


Joined: 22 Jul 2013
Posts: 12
Location: INDIA

PostPosted: Mon Jul 22, 2013 10:38 pm    Post subject: Reply to: Through a single JCL,submit different steps of dif
Reply with quote

Are you working as a part time Mainframe Developer....?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Mon Jul 22, 2013 10:53 pm    Post subject: Re: Reply to: Through a single JCL,submit different steps of
Reply with quote

Aradhana Rathore. wrote:
Thanks for quick reply.

I already gone through that document and tested the same , but its not working fine for me.I have a doubt in that, if possible please clarify.

//EDIT2 JOB ...
//STEP1 EXEC PGM=IEBEDIT
//SYSPRINT DD SYSOUT=A
//SYSUT1 DD DSN=INJOBS,DISP=(OLD,KEEP),VOLUME=SER=001234,
// UNIT=tape
//SYSUT2 DD DSN=OUTSTRM,UNIT=tape,DISP=(NEW,KEEP),
// DCB=(RECFM=F,LRECL=80,BLKSIZE=80),LABEL=(2,SL)
//SYSIN DD *
EDIT START=JOBA,TYPE=INCLUDE,STEPNAME=(STEPC,STEPD)
EDIT START=JOBB,TYPE=INCLUDE,STEPNAME=STEPE
EDIT START=JOBC,TYPE=INCLUDE,STEPNAME=STEPJ

Here they are referring UNIT=tape, can't we refer current device(SYSDA etc).

Of course you can; remember that output can be written to many different devices. Unless you are writing to tape, I recommend that you skip the LABEL parameter; in any case, you ought certainly to change RECFM to FB, and eliminate the BLKSIZE sub-parameter, allowing the system to choose an efficient block size.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Mon Jul 22, 2013 10:56 pm    Post subject: Re: Reply to: Through a single JCL,submit different steps of
Reply with quote

Aradhana Rathore. wrote:
Are you working as a part time Mainframe Developer....?

No; save for a period of illness in the early 2000s, I have been a full-time software developer (albeit not always on IBM mainframes) for over 35 years, and am currently developing software tools for a client that prefers to remain nameless.
Back to top
View user's profile Send private message
Aradhana Rathore.

New User


Joined: 22 Jul 2013
Posts: 12
Location: INDIA

PostPosted: Mon Jul 22, 2013 11:12 pm    Post subject: Reply to: Through a single JCL,submit different steps of dif
Reply with quote

I ran below jcl -:

//WEAPEDIT JOB (ACCOUNT),'INCLUDE',
// CLASS=A,MSGCLASS=D,REGION=32M,NOTIFY=PPPRG2
//*===========================================================
//* EXAMPLE FOR IEBEDIT UTILITY
//*===========================================================
//STEP001 EXEC PGM=IEBEDIT
//SYSPRINT DD SYSOUT=A
//SYSUT1 DD DSN=PPPRG2.IRAM.JCL,DISP=SHR
//SYSUT2 DD DSN=PPPRG2.IRAM.JCL.JCL,UNIT=SYSDA,DISP=(NEW,KEEP),
// DCB=(RECFM=FB,LRECL=80)
//*SYSUT3 DD SYSOUT=(*,INTRDR)
//SYSIN DD *
EDIT START=WDAAAAAA,TYPE=INCLUDE,STEPNAME=(E16005)
EDIT START=WDBBBBBB,TYPE=INCLUDE,STEPNAME=(E16005)
/*

But job fails with JCL error.

Spool->
JESMSGLG
JOBNAME- --STEP-- -PSTEP-- CCODE ELAPSED-TIME -CPU-TIME-
WEAPEDIT STEP001 FLUSH 00:00:00 0.00S
EAPEDIT - JOB FAILED - JCL ERROR - TIME=13.38.31
-WEAPEDIT ENDED. NAME-INCLUDE TOTAL CPU TIME= .00
-NOT_EXECUTED_STEP_TABLE BEGIN
-JOBNAME STEPNAME PROCSTEP STEPNO
-WEAPEDIT STEP001 1
-NOT_EXECUTED_STEP_TABLE END
$HASP395 WEAPEDIT ENDED
TISTICS ------
XECUTION DATE

Please advice.

Can I have your mail id...?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Mon Jul 22, 2013 11:19 pm    Post subject: Re: Reply to: Through a single JCL,submit different steps of
Reply with quote

Aradhana Rathore. wrote:
Can I have your mail id...?

I will PM it to you.
Back to top
View user's profile Send private message
Aradhana Rathore.

New User


Joined: 22 Jul 2013
Posts: 12
Location: INDIA

PostPosted: Mon Jul 22, 2013 11:21 pm    Post subject: Reply to: Through a single JCL,submit different steps of dif
Reply with quote

Sorry, didn't get you.

Can I have your mail id...?
Back to top
View user's profile Send private message
Aradhana Rathore.

New User


Joined: 22 Jul 2013
Posts: 12
Location: INDIA

PostPosted: Mon Jul 22, 2013 11:29 pm    Post subject: Reply to: Through a single JCL,submit different steps of dif
Reply with quote

I have one more question, can you please check that link and provide me the solution if possible.


http://ibmmainframes.com/viewtopic.php?p=314592#314592
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Tue Jul 23, 2013 12:11 am    Post subject: Re: Reply to: Through a single JCL,submit different steps of
Reply with quote

Aradhana Rathore. wrote:
I ran below jcl -:

Code:
//WEAPEDIT JOB (ACCOUNT),'INCLUDE',                                 
//         CLASS=A,MSGCLASS=D,REGION=32M,NOTIFY=PPPRG2               
//*===========================================================       
//* EXAMPLE FOR IEBEDIT UTILITY                                     
//*===========================================================       
//STEP001  EXEC PGM=IEBEDIT                                         
//SYSPRINT DD  SYSOUT=A                                             
//SYSUT1   DD  DSN=PPPRG2.IRAM.JCL,DISP=SHR                         
//SYSUT2   DD  DSN=PPPRG2.IRAM.JCL.JCL,UNIT=SYSDA,DISP=(NEW,KEEP),   
//             DCB=(RECFM=FB,LRECL=80)                               
//*SYSUT3   DD  SYSOUT=(*,INTRDR)                                   
//SYSIN    DD  *                                                     
  EDIT START=WDAAAAAA,TYPE=INCLUDE,STEPNAME=(E16005)                 
  EDIT START=WDBBBBBB,TYPE=INCLUDE,STEPNAME=(E16005)                 
/*                                                                   


But job fails with JCL error.

Spool->
Code:
JESMSGLG
JOBNAME- --STEP-- -PSTEP-- CCODE ELAPSED-TIME -CPU-TIME-         
WEAPEDIT STEP001           FLUSH     00:00:00      0.00S         
EAPEDIT - JOB FAILED - JCL ERROR - TIME=13.38.31                 
-WEAPEDIT ENDED.  NAME-INCLUDE              TOTAL CPU TIME=   .00
-NOT_EXECUTED_STEP_TABLE BEGIN                                   
-JOBNAME  STEPNAME PROCSTEP STEPNO                               
-WEAPEDIT          STEP001    1                                 
         -NOT_EXECUTED_STEP_TABLE END
$HASP395 WEAPEDIT ENDED               
TISTICS ------                       
XECUTION DATE                         


Please advice.

You will find, Aradhana-chan, that responses will be much more readily forthcoming if you enclose your JCL, code, error messages, and anything for which alignment can be in critical in Code tags, as I have above (quote this post to see what I did).

Now there is nothing in your JCL per se that is invalid; we must therefore look at possible situational problems. The most obvious that you may have run this job twice; if so, PPPRG2.IHRAM.JCL.JCL will exist, and the job will fail with a JCL error.

Other possibilities are that your job class, message class, and/or esoteric unit name are incorrect for your shop (remember that these things are completely site-specific). Another is that you have no space allocation for your output data set; depending on how your shop has set up SMS (or if indeed it has SMS at all), this may be an error.

Please check these things and correct or eliminate them as needed.
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 Jul 23, 2013 12:21 am    Post subject:
Reply with quote

Hello,

Quote:
can you please check that link and provide me the solution if possible.
That topic has sufficient info fo you . . . There is no reason to ask more about it here.

If you still have some kind of doubt, ask in your other topic.

When you have a technical question, you should post it in the forum - not some private dialog. When you take discussions offline you prevent all of the other users from seeing the question/answer.

If you want to hire someone, by all means, take it offline.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Tue Jul 23, 2013 12:27 am    Post subject:
Reply with quote

dick scherrer wrote:
When you have a technical question, you should post it in the forum - not some private dialog. When you take discussions offline you prevent all of the other users from seeing the question/answer.

She did so only to get my e-mail address, at my request; no other information has been shared other than in this thread.
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 Jul 23, 2013 12:44 am    Post subject:
Reply with quote

Cool . . .

My post was due to the few each month i receive where someone wants a private discussion. I send them back into their topic so everyone can benefit/participate.


Have a good one!

d
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1717
Location: UK

PostPosted: Tue Jul 23, 2013 2:35 pm    Post subject:
Reply with quote

Quote:
But job fails with JCL error.

Code:
Spool->
JESMSGLG
JOBNAME- --STEP-- -PSTEP-- CCODE ELAPSED-TIME -CPU-TIME-
WEAPEDIT STEP001 FLUSH 00:00:00 0.00S
EAPEDIT - JOB FAILED - JCL ERROR - TIME=13.38.31
-WEAPEDIT ENDED. NAME-INCLUDE TOTAL CPU TIME= .00
-NOT_EXECUTED_STEP_TABLE BEGIN
-JOBNAME STEPNAME PROCSTEP STEPNO
-WEAPEDIT STEP001 1
-NOT_EXECUTED_STEP_TABLE END
$HASP395 WEAPEDIT ENDED
TISTICS ------
XECUTION DATE

Yes - it fails JCL error but...you have not posted the error itself. This could be in either JESJCL or JESYSMSG depending on the error.

Without this further information we would only be guessing.
Back to top
View user's profile Send private message
Pete Wilson

Active User


Joined: 31 Dec 2009
Posts: 437
Location: London

PostPosted: Tue Jul 23, 2013 4:32 pm    Post subject:
Reply with quote

Why did SYSUT3 (referring to the internal reader) appear in the JCL commented out?
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 Jul 23, 2013 8:48 pm    Post subject:
Reply with quote

Hello,

I'd guess a dataset issue . . .

Either "file not found" or "duplicate" . . .

Maybe the actual error will be posted icon_neutral.gif
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Tue Jul 23, 2013 9:56 pm    Post subject:
Reply with quote

Pete Wilson wrote:
Why did SYSUT3 (referring to the internal reader) appear in the JCL commented out?

A good reason might be that IEBEDIT does not, in fact, use SYSUT3. It's probably just some garbage that was ignorantly included in the job stream some generations back and was then commented out, wittingly or not.
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 Jul 23, 2013 10:02 pm    Post subject:
Reply with quote

Quote:
It's probably just some garbage that was ignorantly included in the job stream some generations back and was then commented out, wittingly or not.
Yup . . .

Several places i've been people were never taught JCL. When they implemented a batch program/job, the cloned something they thought was similar, made enough changes to get their "thiing" working and moved on.

I wish i had just one (1) US dollar for each line of this i've found. Then they have been afraid to remove the stuff for fear that there could be a problem.
Back to top
View user's profile Send private message
Aradhana Rathore.

New User


Joined: 22 Jul 2013
Posts: 12
Location: INDIA

PostPosted: Mon Jul 29, 2013 5:51 pm    Post subject: Reply to: Through a single JCL,submit different steps of dif
Reply with quote

Hi,

I X-checked my jcl ,
PPPRG2.IRAM.JCL.JCL is a new data set i.e it is not allocated, and all other parameters like CLASS=A,MSGCLASS=D,REGION=32M are correct.Even I have sufficient storage.

Job- >
Code:
//WEAPEDIT JOB (ACCOUNT),'INCLUDE',                                   
//         CLASS=A,MSGCLASS=D,REGION=32M,NOTIFY=PPPRG2               
//*===========================================================       
//* EXAMPLE FOR IEBEDIT UTILITY                                       
//*===========================================================       
//STEP001  EXEC PGM=IEBEDIT                                           
//SYSPRINT DD  SYSOUT=A                                               
//SYSUT1   DD  DSN=PPPRG2.IRAM.JCL,DISP=SHR                           
//SYSUT2   DD  DSN=PPPRG2.IRAM.JCL.JCL,                               
//             DISP=(NEW,CATLG,DELETE),RECFM=FB,                     
//             UNIT=SYSDA,SPACE=(CYL,(1,1),RLSE)                     
//*SYSUT3   DD  SYSOUT=(*,INTRDR)                                     
//SYSIN    DD  *                                                     
  EDIT START=WDAAAAAA,TYPE=INCLUDE,STEPNAME=(E16005)                 
  EDIT START=WDBBBBBB,TYPE=INCLUDE,STEPNAME=(E16005)                 
/*                                                                   
**************************** Bottom of Data **************************

For those who wants JESJCL and JESYSMSG, please see below

JESJCL ->
Code:
********************************* TOP OF DATA ***********************
        1 //WEAPEDIT JOB (ACCOUNT),'INCLUDE',                       
          //         CLASS=A,MSGCLASS=D,REGION=32M,NOTIFY=PPPRG2     
          //*========================================================
          //* EXAMPLE FOR IEBEDIT UTILITY                           
          //*========================================================
        2 //STEP001  EXEC PGM=IEBEDIT                               
        3 //SYSPRINT DD  SYSOUT=A                                   
        4 //SYSUT1   DD  DSN=PPPRG2.IRAM.JCL,DISP=SHR               
        5 //SYSUT2   DD  DSN=PPPRG2.IRAM.JCL.JCL,                   
          //             DISP=(NEW,CATLG,DELETE),RECFM=FB,           
          //             UNIT=SYSDA,SPACE=(CYL,(1,1),RLSE)           
          //*SYSUT3   DD  SYSOUT=(*,INTRDR)                         
        6 //SYSIN    DD  *                                           
******************************** BOTTOM OF DATA *********************

Note :-
After running this job I got MAXCC 8 and the required task was achieved but new DSN was created PPPRG2.IRAM.JCL.JCL.

JESYSMSG->
Code:
********************************* TOP OF DATA **********************************
I PPPRG2   LAST ACCESS AT 08:14:49 ON MONDAY, JULY 29, 2013                     
ALLOC. FOR WEAPEDIT STEP001                                                     
JES2 ALLOCATED TO SYSPRINT                                                     
SMS ALLOCATED TO DDNAME SYSUT1                                                 
SMS ALLOCATED TO DDNAME (SYSUT2  )                                             
DSN (PPPRG2.IRAM.JCL.JCL                         )                             
STORCLAS (SCSTAND) MGMTCLAS (MCSTAND) DATACLAS (DCSTAND)                       
VOL SER NOS= ZIWF20                                                             
JES2 ALLOCATED TO SYSIN                                                         
WEAPEDIT STEP001 - STEP WAS EXECUTED - COND CODE 0008                           
  PPPRG2.WEAPEDIT.JOB02937.D0000102.?          SYSOUT                           
PPPRG2.IRAM.JCL                              RETAINED,  DDNAME=SYSUT1           
PPPRG2.IRAM.JCL.JCL                          RETAINED,  DDNAME=SYSUT2           
  PPPRG2.WEAPEDIT.JOB02937.D0000101.?          SYSIN                           
********************************************************************************
   UNIT   EXCPS BLKSZ|DDNAME   UNIT   EXCPS BLKSZ|DDNAME   UNIT   EXCPS BLKSZ|DD
---------------------+---------------------------+---------------------------+--
   8016       1 27920|TOTAL:              1 *****|                           | 
********************************************************************************
STEP/STEP001 /START 2013210.0815                                               
STEP/STEP001 /STOP  2013210.0815                                               
CPU:     0 HR  00 MIN  00.00 SEC    SRB:     0 HR  00 MIN  00.00 SEC           
VIRT:   200K  SYS:   324K  EXT:        4K  SYS:    11656K                       
********************************************************************************
  01.12.00 SYSTEM 2097       (2050) :    SMF STATISTICS                    DATE=
********************************************************************************
                                                                               
EDIT JOB (TIWMVS),INCLUDE                                                       
                                                                               
                             TOTAL     VIO      TCB      SRB     INIT  ELAPSED 
EPNAME PROCSTEP PROGRAM     EXCP'S  EXCP'S CPU-TIME CPU-TIME CPU-TIME     TIME 
                                                                               
EP001           IEBEDIT          1       0    0.00S    0.00S    0.01S    0.04S 
--------------------------------------------------------------------------------
M (WITH JOB OVERHEAD):           1       0    0.00S    0.00S    0.01S    0.04S 
================================================================================
E SECTION | USED PRIVATE AREA BELOW 16MB:            200K | ALLOWED PRIVATE AREA
          | USED PRIVATE AREA ABOVE 16MB:              0M | ALLOWED PRIVATE AREA
          |                                               | MAX. ALLOWED MEMLIMI
--------------------------------------------------------------------------------
CTION     | WORKLOAD NAME                        BATCH    | SERVICE CLASS NAME 
          | RESOURCE GROUP NAME                           | REPORT CLASS NAME   
********************************************************************************
 JOB/WEAPEDIT/START 2013210.0815                                               
 JOB/WEAPEDIT/STOP  2013210.0815                                               
CPU:     0 HR  00 MIN  00.00 SEC    SRB:     0 HR  00 MIN  00.00 SEC           
******************************** BOTTOM OF DATA ********************************

Code'd, Please use 'Code' tags while posting code
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 -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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 Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm
No new posts Don't allow CICS to submit batch jobs prino JCL & VSAM 5 Mon Jul 25, 2016 3:26 pm
No new posts Single step utility for compare and u... ramprakashn JCL & VSAM 5 Fri Apr 29, 2016 3:43 pm


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