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

Send an email when SAS abends in previous step of JCL


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

New User


Joined: 30 Dec 2007
Posts: 13
Location: delhi

PostPosted: Sun Jan 17, 2010 8:09 pm
Reply with quote

Hi,

I am trying to send an Email to support when the SAS code in the previous step abends.

Can anybody guide me , if we can do this...

If the Program is in Cobol. Email is going succesfully..
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Sun Jan 17, 2010 9:02 pm
Reply with quote

Give us more info on conditions checked by email step : condition code, reading a file, seeing in data areas ???

We are not seer !
Back to top
View user's profile Send private message
sanjida

New User


Joined: 30 Dec 2007
Posts: 13
Location: delhi

PostPosted: Mon Jan 18, 2010 10:32 am
Reply with quote

Hi Below I have pasted a code in whech if SAS abends i.e RC ne to zero. Email will be sent. This code is not working.

But if in place of SAS it is cobol code it works.

Code:
//STEP010 EXEC SAS8,OPTIONS='ALTLOG=SASLOG,MACRO,DQUOTE'           
//MIDMONTH DD DSN=BNK.TEST.ZGZG10.INDFCM.G0134.TEST,               
//         DISP=SHR                                               
//MONTHEND DD DSN=BNK.TEST.ZGZG10.INDFCM.G0133.TEST,               
//         DISP=SHR                                               
//NPBSOUT DD DSN=DBK.TEST.SX6691.BUREAU.EVENTS1.DT070110,         
//         DISP=SHR                                               
//PBSOUT  DD DSN=DBK.TEST.SX6691.BUREAU.EVENTS2.DT070110,         
//         DISP=SHR                                               
//BUROUT  DD DSN=DBK.TEST.ZGZG19A.EVENTSM.INCUASS.BUREAU.DT07,     
//         DISP=SHR                                               
//SYSPRINT DD  SYSOUT=*,DCB=BLKSIZE=133                           
//SYSUDUMP DD  SYSOUT=*                                           
//*SYSIN DD DSN=ALC.PROD.PARMLIB(PZG290M1),DISP=SHR               
//SYSIN DD DSN=BNK.TEST.WR091574.COPY(SASPGM1),                   
//         DISP=SHR                                               
//*                                                               
//STEP10A  EXEC PGM=IKJEFT01,         
//             COND=((0,EQ,STEP010),ONLY)                               
//SYSPROC  DD DISP=SHR,DSN=SYS3.SPF.PROCS                               
//         DD DISP=SHR,DSN=BNK.TEST.EMAIL.LIB ** REXX routine for email
//ISPPROF  DD UNIT=SYSDA,                                               
//            SPACE=(TRK,(2,1,2),RLSE),                                 
//            LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PO                     
//ISPLOG   DD UNIT=SYSDA,                                               
//            SPACE=(TRK,(2,1,2),RLSE),                                 
//            LRECL=80,BLKSIZE=0,RECFM=FB,DSORG=PO                     
//SYSPRINT DD SYSOUT=*                                         
//SYSTSPRT DD SYSOUT=*                                         
//SYSOUT   DD SYSOUT=*                                         
//SYSTSIN DD *                                                 
 XMITIP (xxx  +                           
    xxxx)  -                               
    MSGDS 'BNK.TEST.PARMLIB(FP125EML)' +                       
    FORMAT CSV   +                                             
    FROM xxxxx  +                           
    SUBJECT 'SAS CODE ABENDS - PLEASE SEE THE ATTACHED DOC'  + 
    IMPORTANCE NORMAL +                                         
    PRIORITY NORMAL +                                           
    FILENAME (TEST)                                             
//*
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jan 18, 2010 1:36 pm
Reply with quote

Quote:
if SAS abends i.e RC ne to zero.

review Your understanding of the abend and RC terms concepts and the difference between them

strong postulate
given two steps STEPA and STEPB, where STEPB is the successor of STEPA

jcl processing of STEPA Abends/RC when deciding to execute STEPB does not depend on the program being executed in STEPA

in other words JCL at COND processing time does not care about what was executing

You posted anyway the wrong info, nobody cares about the step abending or issuing a return code
it would have been better to post the step depending on the prevoius one
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Mon Jan 18, 2010 1:49 pm
Reply with quote

Hi,

what exactly is the error, the code is not working is insufficient.

Post the output from the run.

Please do not confuse an abend with a return code.

From what I can see STEP010 is executing a PROC. hence when testing a cond code against this step it should be
Code:
COND=((0,EQ,STEP010.procstepname),


Gerry
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: Tue Jan 19, 2010 6:18 am
Reply with quote

Hello,

And FWIW, it would be better to fix the code so there is no abend rather than adding other "stuff" to be maintained to handle a situation that is (or should not be) acceptable.
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

 


Similar Topics
Topic Forum Replies
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
No new posts How to extract the data for current y... DFSORT/ICETOOL 8
No new posts Forcing a step to run (even if abended) JCL & VSAM 8
Search our Forums:

Back to Top