Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Run the job using Internal Reader
Goto page Previous  1, 2
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Anuj Dhawan

Senior Member


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

PostPosted: Fri Jun 17, 2011 2:48 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
Reply with quote

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

Senior Member


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

PostPosted: Fri Jun 17, 2011 3:07 pm    Post subject:
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: 2470
Location: Netherlands, Amstelveen

PostPosted: Fri Jun 17, 2011 3:09 pm    Post subject:
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    Post subject:
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: 2236
Location: Hampshire, UK

PostPosted: Fri Jun 17, 2011 3:14 pm    Post subject:
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: 2236
Location: Hampshire, UK

PostPosted: Fri Jun 17, 2011 3:22 pm    Post subject:
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

Site Director


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

PostPosted: Fri Jun 17, 2011 8:12 pm    Post subject:
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    Post subject: Reply to: Run the job using Internal Reader
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

Site Director


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

PostPosted: Sat Jun 18, 2011 8:44 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Getting soc4 on internal table in cobol abdulrafi COBOL Programming 13 Fri May 06, 2016 3:39 pm
No new posts Skipping a record from Internal SORT Keanehelp COBOL Programming 4 Tue Jul 28, 2015 9:15 pm
This topic is locked: you cannot edit posts or make replies. How to Compare two values in an inter... ritnihi COBOL Programming 6 Wed Jun 10, 2015 11:49 am
No new posts DB2 Load using DSNUTILB with FORMAT I... yogi.47eie DB2 4 Wed May 28, 2014 4:54 pm
No new posts Array overflow on Internal table - An... scdinesh COBOL Programming 13 Thu May 22, 2014 2:55 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us