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
 

 

Capturing JCL errors - forcing a message to console

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
rsodergren

New User


Joined: 18 Mar 2006
Posts: 4

PostPosted: Sat Mar 18, 2006 2:46 am    Post subject: Capturing JCL errors - forcing a message to console
Reply with quote

Hello out there, anyone know of a way to 'capture' a jcl error and force it to display a message to the console. This can be done easily when a job abends using cond code checking or if then else statements, but to the best of my knowledge, if the error is a JCL error the job just STOPS and no further steps will execute. I am particularly concerned in a case whereby we get a JCL error 'space requested not available' - we have procs that run that have the potential to get this error and we need to know about it right away if this condition is encountered...any ideas.

Thanks!

Russ
Back to top
View user's profile Send private message

dneufarth

Active User


Joined: 27 Apr 2005
Posts: 247
Location: Cincinnati OH USA

PostPosted: Sat Mar 18, 2006 4:29 am    Post subject:
Reply with quote

job scheduling tools handle this problem
Back to top
View user's profile Send private message
prasanth_thavva

New User


Joined: 28 Jul 2005
Posts: 86
Location: Chennai

PostPosted: Sun Mar 19, 2006 2:41 pm    Post subject: Capturing JCL errors - forcing a message to console
Reply with quote

hi ,

is there any way for this other than scheduler,,i too have same doubt,,with out execution of jcl you can't do it ...but how ...

Thanks and Regards,
Venkata Prasanth.
infy
Back to top
View user's profile Send private message
rsodergren

New User


Joined: 18 Mar 2006
Posts: 4

PostPosted: Mon Mar 20, 2006 7:16 pm    Post subject: Re: Capturing JCL errors - forcing a message to console
Reply with quote

We have job scheduling tools (ca7 to be exact)...in this case, however, the 'job' in question is actually forced by a user exit in our ADABAS database...so there is no control by CA7 unfortunately. Anybody else have any ideas?
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 290
Location: Basel, Switzerland

PostPosted: Mon Mar 20, 2006 9:02 pm    Post subject:
Reply with quote

hy rsodergren,

if you have any scheduler, then you should not submit
any other job directly without control of your scheduler.
check how your scheduler schedules defined applications,
then create one job that will schedule a scheduler application,
which includes your job as you wanted, but then under control of
your scheduler...

martin9
Back to top
View user's profile Send private message
rsodergren

New User


Joined: 18 Mar 2006
Posts: 4

PostPosted: Tue Mar 21, 2006 1:11 am    Post subject:
Reply with quote

I am sort of in a catch-22 with the scheduler tho because if I allow the scheduler to submit this job, then my database will 'think' that it has copied off its protection logs when in fact it may not have. The user exit handles all the business between the protection logs and the database. This would not be a good situation to be in. I guess bottom line, there is no way to capture jcl errors and cause another even to take place...unless I go the job scheduler route...which in this case I can't do.
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Mar 21, 2006 3:54 am    Post subject: Re: Capturing JCL errors - forcing a message to console
Reply with quote

rsodergren,

What kind of JCL errors are you trying capture?

Invalid syntax that is captured by the interpreter there is not much that can be done because the job is never started.

If the job will start, and then fail on a JCL error, we can probably capture, in a round about way. Let me know what you are trying to capture and I?ll see if I can come up with something.

Dave
Back to top
View user's profile Send private message
rsodergren

New User


Joined: 18 Mar 2006
Posts: 4

PostPosted: Tue Mar 21, 2006 6:59 pm    Post subject:
Reply with quote

Hi DavidtK,

I am trying to capture JCL errors after the job has started (not syntax errors). My biggest concern is a 'space requested not available' jcl error. This happens once in a blue moon. I am allocating a rather large first extent in a couple of my procsteps and if the SMS pool of volumes is rather fragmented or full due to a busy batch window this can spell trouble.

Thanks much,

Russ
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Mar 21, 2006 7:39 pm    Post subject: Re: Capturing JCL errors - forcing a message to console
Reply with quote

Russ,

Let me test a couple of ideas today. The direction that I'm thinking will require the addition of a couple of small steps in your job. Cannot guarentee anything, but I'll test my idea.

Dave
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Mar 21, 2006 9:37 pm    Post subject: Re: Capturing JCL errors - forcing a message to console
Reply with quote

Russ,

OK, here?s what I cam up with. It?s kind of weird, but it does work.

Your original job with new steps, your original job replaces JS00200/JS00201. If you don?t want notification if your job abends, add COND=EVEN to JS00900:

Code:



//YOURXXX JOB (ACCNT,ROOM),DavidatK,                             
//      MSGCLASS=Y,NOTIFY=YOUR                                   
//JS00100  EXEC PGM=IEFBR14                                       
//*______________________________________________________________
//*        ALLOCATE CHECK DATASET                                 
//*______________________________________________________________
//JS00101  EXEC PGM=IEFBR14                                       
//ALLOCDD  DD  DSN=YOUR.PS.JCLVALID,                             
//             DISP=(,CATLG,DELETE),                             
//             SPACE=(80,(1,1),RLSE),AVGREC=U,                   
//             RECFM=FB,LRECL=80                                 
//*______________________________________________________________
//*        SUBMIT CHECK JOB                                       
//*______________________________________________________________
//*______________________________________________________________ 
//JS00103  EXEC PGM=IEBGENER                                       
//SYSPRINT DD SYSOUT=*                                             
//SYSUT1   DD DSN=YOUR.PDS.#TEST(JCLTEST2),DISP=SHR               
//SYSUT2   DD SYSOUT=(A,INTRDR)                                   
//SYSIN    DD DUMMY                                               
//*______________________________________________________________ 
//*        YOUR JOB REPLACES JS00200                               
//*        (BELOW CAUSED SPACE ALLOCATION ERROR)                   
//*______________________________________________________________ 
//JS00200  EXEC PGM=IEFBR14                                       
//JSLERROR DD DSN=YOUR.PS.TOBIG,                                 
//            DISP=(,CATLG,DELETE),                               
//            SPACE=(1000,(1000,1000),RLSE),AVGREC=M,             
//            RECFM=FB,LRECL=1000                                 
//*______________________________________________________________ 
//JS00201  EXEC PGM=IEFBR14                                         
//JSLERROR DD DSN=YOUR.PS.TOBIG,                                   
//            DISP=(OLD,DELETE,DELETE)                             
//*______________________________________________________________   
//*        REPRO 'COMPLETED' INTO CHECK DATASET                     
//*        WILL ONLY HAPPEN IF JOB RAN                             
//*______________________________________________________________   
//JS00900  EXEC PGM=IDCAMS                                         
//INDD     DD *                                                     
  COMPLETED                                                         
/*                                                                 
//OUTDD    DD DSN=YOUR.PS.JCLVALID,                               
//            DISP=SHR                                             
//SYSIN    DD *                                                     
 REPRO IFILE(INDD) OFILE(OUTDD)                                     
/*                                                                 
//SYSPRINT DD SYSOUT=*                                             


And a new job to check the outcome of the first job. Replace JS00200 with whatever processing you want to do if the first job fails. Note that the JOBNAME must be the same as the first job.

Code:


This is the job submitted on JS00103 above in PDS YOUR.PDS.#TEST(JCLTEST2)


//YOURXXX JOB (ACCNT,ROOM),DavidatK,                                 
//      MSGCLASS=Y,NOTIFY=YOUR                                       
//JS00100  EXEC PGM=IDCAMS                                           
//INDD     DD DSN=YOUR.PS.JCLVALID,                                 
//            DISP=(OLD,DELETE,DELETE)                               
//SYSIN DD *                                                         
 PRINT IFILE(INDD) COUNT(1)                                           
/*                                                                   
//SYSPRINT DD DUMMY,LRECL=133                                         
//*_______________________________________________________________   
//*       REPLACE JS00200 WITH YOUR EXCEPTION PROCESSING             
//*       IF THE CHECK FILE IS EMPTY (RC=4 FROM JS00100)             
//*_______________________________________________________________   
//JS00200 EXEC PGM=IEFBR14,                                           
//             COND=(0,EQ,JS00100)                                   


Let me know if this will serve your purpose,

Dave
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
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm
No new posts Display upon console bipinpeter COBOL Programming 1 Thu Jun 22, 2017 12:35 am
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm
No new posts How to show message using batch jobs madprasy TSO/ISPF 7 Fri Sep 09, 2016 6:55 pm
No new posts Truncated error message after VERIFY ... David Sde TSO/ISPF 4 Mon Sep 05, 2016 11:26 pm


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