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

Run the job using Internal Reader


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Anuj Dhawan

Superior Member


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

PostPosted: Fri Jun 17, 2011 2:48 pm
Reply with quote

Looks like you've edited your post about IEBEDIT.

Well, if you insist have a Job B:

As you said, if the job abends or not GDG is always calaloged anyways, when it reachs to you for a solution. Do the following:

- first step will take the GDG(0) to copy to a QSAM-file(flat file).
- copy step from your Job A as-it-is and make use of this QSAM file instead of GDG.
- In Job A have a step to submit above two steps using INTRDR (via Job B) only when there is an abend.
Back to top
View user's profile Send private message
sanupadh

New User


Joined: 29 Jun 2010
Posts: 11
Location: chennai

PostPosted: Fri Jun 17, 2011 2:55 pm
Reply with quote

job B is nothing but a monitoring tool.
Below is my JCL.

Code:
//*RETRIEVE THE JOB DETAILS FROM SAR (SPOOL) - FOR THE JOB  ZFV1710     
//********************************************************
//STEP02   EXEC PGM=SARBCH                                             
//SYSOUT   DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*   
//SYSPRINT DD SYSOUT=*                                     
//OUTDS    DD DSN=FVTEST.W.TRUST.ZFV1710.SPOOL,             
//         DISP=(NEW,CATLG,DELETE),SPACE=(CYL,(50,10),RLSE),
//         UNIT=SYSDA,                                     
//         LRECL=133,RECFM=FBA,BLKSIZE=27930               
//SYSIN    DD  *                                           
/DBASE NAME=VW.W.J.VWDBASE                                 
/PRINT ID=ZFV1710  DDNAME=OUTDS
//***********************************************************
//*PICK RETURN CODE OF ALL STEPS                                       
//****************************************************************     
//STEP03   EXEC PGM=SORT                                               
//SYSOUT   DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*                                                 
//SYSPRINT DD SYSOUT=*                                                 
//SORTIN   DD DSN=FVTEST.W.TRUST.ZFV1710.SPOOL,DISP=SHR                 
//SORTOUT  DD DSN=FVTEST.W.TRUST.ZFV1710.ALLSTEPS.RCODE,   
//            DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,                   
//            SPACE=(CYL,(90,100),RLSE),                             
//            DCB=(LRECL=133,RECFM=FB)                               
//SYSIN    DD  *                                                     
  INCLUDE COND=((27,10,CH,EQ,C'1I ZFV1710'),AND,(39,5,CH,NE,C'ENDED')
  OUTREC FIELDS=(39,23,133:X)                                       
  SORT FIELDS=COPY,                                                 
  STOPAFT=200         
//***************************************************************
//*CREATE FILE BY VALIDATING RETURN CODE                         
//*OMITTING RETURN CODE '00','08','FLUSH'                       
//**************************************************************
//STEP04   EXEC PGM=SORT                                         
//SYSOUT   DD SYSOUT=*                                           
//SYSUDUMP DD SYSOUT=*                                           
//SYSPRINT DD SYSOUT=*                                           
//SORTIN   DD DSN=FVTEST.W.TRUST.ZFV1710.ALLSTEPS.RCODE,DISP=SHR
//SORTOUT  DD DSN=FVTEST.W.TRUST.ZFV1710.RCODE.ABEND,             
//            DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,                 
//            SPACE=(CYL,(90,100),RLSE),                         
//            DCB=(LRECL=133,RECFM=FB)                           
//SYSIN    DD  *                                                 
  OMIT COND=((19,5,CH,EQ,C'   08'),OR,(19,5,CH,EQ,C'   00'),     
               OR,(19,5,CH,EQ,C'FLUSH'))                         
  OUTREC FIELDS=(1,23,133:X)                                     
  SORT FIELDS=COPY                                               
//****************************************************************
//*CHECKS FOR EMPTY DATASET CREATED IN STEP04                     
//****************************************************************
//CHKEMPT1 EXEC PGM=ICETOOL                                       
//TOOLMSG  DD SYSOUT=D                                           
//DFSMSG  DD SYSOUT=D                                             
//IN1     DD DSN=FVTEST.W.TRUST.ZFV1710.RCODE.ABEND,DISP=SHR     
//TOOLIN   DD *                                                   
  COUNT FROM(IN1) EMPTY RC4                                         
//*                                                                 
//****************************************************************   
//*SEND NOTIFICATION MAIL TO TRUST TEAM 'JOB RUN SUCCESSFULLY'       
//****************************************************************   
//  IF (CHKEMPT1.RC EQ 4) THEN                                       
//STEP05   EXEC SAS,OPTIONS='EMAILHOST=SMTP.BNYMELLON.NET'           
//SYSTCPD DD  DSN=FVTEST.W.ADCXZNK.CARDLIB(TCPDATA),DISP=SHR         
//SAS.SYSIN DD DSN=FVTEST.W.ADCXZNK.CARDLIB(MAIL1),DISP=SHR         
//******************************************************************
//*CREATE FILE IF ABEND 'U0617' IS IN STEP 'C5171035'               
//******************************************************************
//  ELSE                                                             
//STEP06   EXEC PGM=SORT                                             
//SYSOUT   DD SYSOUT=*                                               
//SYSUDUMP DD SYSOUT=*                                               
//SYSPRINT DD SYSOUT=*                                               
//SORTIN   DD DSN=FVTEST.W.TRUST.ZFV1710.RCODE.ABEND,DISP=SHR     
//SORTOUT  DD DSN=FVTEST.W.TRUST.ZFV1710.ABEND.OUT,               
//            DISP=(NEW,CATLG,DELETE),UNIT=SYSDA,                 
//            SPACE=(CYL,(90,100),RLSE),                         
//            DCB=(LRECL=133,RECFM=FB)                           
//SYSIN    DD  *                                                 
  INCLUDE COND=((1,8,CH,EQ,C'C5171035'),AND,(19,5,CH,EQ,C'U0617'))
  SORT FIELDS=COPY                                               
//****************************************************************
//*CHECKS FOR EMPTY DATASET CREATED IN STEP06                     
//****************************************************************
//CHKEMPT2 EXEC PGM=ICETOOL                                       
//TOOLMSG  DD SYSOUT=D                                           
//DFSMSG  DD SYSOUT=D                                             
//IN1     DD DSN=FVTEST.W.TRUST.ZFV1710.ABEND.OUT,DISP=SHR       
//TOOLIN   DD *                                                   
  COUNT FROM(IN1) EMPTY RC4 
//*                                                               
//****************************************************************
//*RERUN JOB ZFV1710 FROM STEP C5171035                           
//****************************************************************
// IF (CHKEMPT2.RC EQ 0) THEN                                     
//STEP07   EXEC PGM=IEBGENER                                     
//SYSPRINT DD SYSOUT=*                                           
//SYSUT1   DD DSN=FVTEST.W.ADCXZNK.CARDLIB(DUMMY),DISP=SHR       
//SYSUT2   DD SYSOUT=(,INTRDR)                                   
//SYSIN DD DUMMY                                                 
//*                                                               
//****************************************************************
//*SEND NOTIFICATION MAIL TO TRUST TEAM 'OTHER ABEND'             
//****************************************************************
//  ELSE                                                         
//STEP08   EXEC SAS,OPTIONS='EMAILHOST=SMTP.BNYMELLON.NET'       
//SYSTCPD DD  DSN=FVTEST.W.ADCXZNK.CARDLIB(TCPDATA),DISP=SHR     
//SAS.SYSIN DD DSN=FVTEST.W.ADCXZNK.CARDLIB(MAIL2),DISP=SHR   
//  ENDIF                                                     
//  ENDIF


Edited: Please use BBcode when You post some code/error, that's rather readable, Thanks... Anuj
Back to top
View user's profile Send private message
sanupadh

New User


Joined: 29 Jun 2010
Posts: 11
Location: chennai

PostPosted: Fri Jun 17, 2011 3:00 pm
Reply with quote

problem is in STEP07 where now I am running a dummy jcl.
if abend occurs.
but I need to replace the dummy job by job ZFV1710 from step C5171035 with GDG(0)
how can I do this?
Back to top
View user's profile Send private message
sanupadh

New User


Joined: 29 Jun 2010
Posts: 11
Location: chennai

PostPosted: Fri Jun 17, 2011 3:02 pm
Reply with quote

Please dont confuse with return code 08.Its OK
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Fri Jun 17, 2011 3:07 pm
Reply with quote

Show us, what is there in: FVTEST.W.ADCXZNK.CARDLIB(DUMMY)?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Fri Jun 17, 2011 3:09 pm
Reply with quote

I guess a job running iefbr14
Back to top
View user's profile Send private message
sanupadh

New User


Joined: 29 Jun 2010
Posts: 11
Location: chennai

PostPosted: Fri Jun 17, 2011 3:14 pm
Reply with quote

Its a dummy job I have created to test the JCL only.
but I need to replace this by job ZFV1710 (abended job)
and start it from step C5171035 with GDG(0)
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Jun 17, 2011 3:14 pm
Reply with quote

Ignore - hadn't read the second page.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Jun 17, 2011 3:22 pm
Reply with quote

Why not split job A so that it stops after STEP04. Then run STEP05 to the end as a seperate job. Then you can restart this job automatically. No need to change the GDG from +1 to 0.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Jun 17, 2011 8:12 pm
Reply with quote

Hello,

What causes this "acceptable abend"? How does it magically get corrected? As Vasanthz asked - "What if the job A never runs successfully?"

From what little that has been posted, it sounds like the cause of the abend is also a scheduling opportunity. . .
Back to top
View user's profile Send private message
prasanth_thavva

New User


Joined: 28 Jul 2005
Posts: 86
Location: Chennai

PostPosted: Sat Jun 18, 2011 7:38 am
Reply with quote

I don't think you need to schedule Job B using schedular, if yet all if the job down with specified return code in internal reader step just specify the condition and invoke the Job B and always has the required parameters set for this job,

pls let me know if i am wrong
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Sat Jun 18, 2011 8:44 am
Reply with quote

Hello,

Quote:
I don't think you need to schedule Job B using schedular, if yet all if the job down with specified return code in internal reader step just specify the condition and invoke the Job B and always has the required parameters set for this job,
I do not understand what this is suggesting . . . icon_confused.gif

Quote:
pls let me know if i am wrong
Yes, i believe this is incorrect.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts Search substring in internal table of... COBOL Programming 2
This topic is locked: you cannot edit posts or make replies. Internal Autonomous Stored Procedure ... DB2 6
No new posts Getting error S000 U0016 (Cn Internal... JCL & VSAM 4
No new posts "Output" internal table (OD... COBOL Programming 0
No new posts Trying to submit COBOL PGM - JCL ERRO... JCL & VSAM 5
Search our Forums:

Back to Top