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
 

 

Send an email when SAS abends in previous step of JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Send an email when SAS abends in previous step of JCL
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: 456
Location: Belgium

PostPosted: Sun Jan 17, 2010 9:02 pm    Post subject:
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    Post subject: Reply to: Send an email when SAS abends in previous step of
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Mon Jan 18, 2010 1:36 pm    Post subject: Reply to: Send an email when SAS abends in previous step of
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: 1703
Location: Australia

PostPosted: Mon Jan 18, 2010 1:49 pm    Post subject:
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

Site Director


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

PostPosted: Tue Jan 19, 2010 6:18 am    Post subject:
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    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 how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts How to get previous month in SYMNAMES Suganya87 SYNCSORT 9 Fri Oct 28, 2016 1:37 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Reading data from PS file and send it... rajatbagga All Other Mainframe Topics 18 Fri Sep 23, 2016 12:51 pm


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