MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Notify multiple users
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 699
Topics: 63
Location: USA

PostPosted: Fri May 21, 2004 3:07 am    Post subject: Notify multiple users Reply with quote

Is it possible to give multiple userid's to notify in the jobcard. Otherwise, how else can this be acheived.

Thanks,
Diba.
Back to top
View user's profile Send private message Send e-mail
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Fri May 21, 2004 3:26 am    Post subject: Reply with quote

No. NOTIFY uses a single user id for notification.

However, you can code a step at the end to notify muktiple users, thus:

Code:

//NOTIFY   EXEC PGM=IKJEFT01
//SYSTSIN DD *
 SE 'JOB COMPLETED' U(ID1, ID2)
/*
//SYSTSPRT DD SYSOUT=*


I do not know how to notify the return-code, though.
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Fri May 21, 2004 5:21 am    Post subject: Reply with quote

Ravi,

Try running the job with IKJEFT1A or IKJEFT1B which will return the return code.

Code:

//NOTIFY   EXEC PGM=IKJEFT1A
//SYSTSIN DD *
SE 'JOB COMPLETED' U(ID1, ID2)
/*
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*


Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Fri May 21, 2004 9:02 am    Post subject: Reply with quote

Ravi,

I looked up at your request more closely. You want to format the message. That message you are receiving now is actually hardcoded in the SEND command. The SE is nothing but a send command which is given as input to SYSTSIN DD statement.

So if you really wanted the message like you mentioned , you need to generate the message.

So using the translator utility EZACFSM1 you can generate the message. Remove the Intrdr statement and see how the system symbols are translated.

Code:

//STEP0100 EXEC PGM=EZACFSM1                           
//SYSOUT   DD SYSOUT=(*,INTRDR),RECFM=FB,LRECL=80     
//SYSIN    DD DATA,DLM=@@                             
//LASTSTEP EXEC PGM=IKJEFT01                           
//SYSTSPRT DD SYSOUT=*                                 
//SYSTSIN  DD *                                       
SE '&HR:&MIN:&SEC $HASP165 &JOBNAME ENDED -           
 AT &SYSNAME MAXCC=0 CN(INTERNAL)' U(ID1, ID2)         
@@                                                     
//*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Fri May 21, 2004 9:36 am    Post subject: Reply with quote

Ravi,

I just realized that using &HR, &MIN, &SEC will give the GMT time. If you want the local time then you need to use &LHR &LMIN &LSEC where L stands for local.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Fri May 21, 2004 11:33 am    Post subject: Reply with quote

Of course, Ravi. As I mentioned, I do not know how to pass the return code. Yes, the message that I am sending is just a "message"; definitely nothing to do with the way the reporting of completion of jobs happen. And, I am using SEND command itself! The string 'SE' is an abbreviation for SEND.

The lack of atuhority is strange. You do not have access to do the same in TSO too? Try using TSO SE at command line.

Kolusu,
The generated message still uses hard-coded return code.

One can code the step that I posted above as the last step based on proper COND parameters. This way, the generated message can be sent to multiple users which will automatically convey the meaning.
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Fri May 21, 2004 12:55 pm    Post subject: Reply with quote

So, you could get EZACFSM1 working? I could not as I am getting S806 ABEND and, I am too lazy to find the hlq.SEZAsomething PDS where it would be available. Mr. Green

Personally, I think, the excercise to get the MAXCC from previous steps, JOBID etc. should be academic. Job schedulers, $AVRS and other such s/w are meant for this purpose only.
_________________
ALL opinions are welcome.

Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes.
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Fri May 21, 2004 12:57 pm    Post subject: Reply with quote

I'm pretty sure I've posted this REXX code before, but here it is again. This will list all of the steps and their return codes for the given job:

Code:

/* REXX                              */                               
/* GET THE STEP NAME AND RETURN CODE */                               
NUMERIC DIGITS(32) /* ENSURE MAX PRECISION */                         
TCB=STORAGE(D2X(540),4) /* PSATOLD IN PSA */                           
JSCB =STORAGE(D2X(C2D(TCB)+180),4) /* TCBJSCB IN TCB */               
JCT = STORAGE(D2X(C2D(JSCB)+261),3) /* JSCBJCTA IN JSCB */             
THIS_STEP_NO = X2D(C2X(STORAGE(D2X(C2D(JSCB)+228),1)))                 
/* THIS STEP NO. */                                                   
FSCT = STORAGE(D2X(C2D(JCT)+48),3) /* JCTSDKAD IN JCT */               
/* IS FIRST SCT */                                                     
TEMP_SCT = FSCT                                                       
DO I = 1 TO (THIS_STEP_NO - 1)                                         
  STEP = STORAGE(D2X(C2D(TEMP_SCT)+68),8)                             
  RCSTEP = X2D(C2X(STORAGE(D2X(C2D(TEMP_SCT)+24),2)))                 
  /* SCTSEXEC IN SCT */                                               
  BYPASS = STORAGE(D2X(C2D(TEMP_SCT)+188),1)                           
  IF X2D(C2X(BYPASS)) = 80 THEN /* CHECK IF STEP WAS NOT EXECUTED */   
    DO                                                                 
      RCSTEP = 'FLUSHED '                                             
    END                                                 
  SAY 'STEP ==>' STEP ' RC ==>' RCSTEP                   
  TEMP_SCT = STORAGE(D2X(C2D(TEMP_SCT)+36),3)           
END                                                     
EXIT                                                   
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Fri May 21, 2004 1:35 pm    Post subject: Reply with quote

Ravi,

The Topic discusses about how to get the job information within the Rexx program?

http://www.mvsforums.com/helpboards/viewtopic.php?t=44&highlight=return

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 699
Topics: 63
Location: USA

PostPosted: Sun May 23, 2004 11:54 pm    Post subject: Reply with quote

Thanks everybody,

Now I have multiple solutions to try.
Back to top
View user's profile Send private message Send e-mail
Arturo
Beginner


Joined: 09 Jun 2004
Posts: 13
Topics: 6
Location: Miami, Florida

PostPosted: Sat Mar 05, 2005 12:14 am    Post subject: Reply with quote

Great Solutions... can we use this to send a notification to someones email address?
_________________
Regards,
Arturo
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Sun Mar 06, 2005 9:34 pm    Post subject: Reply with quote

Quote:

can we use this to send a notification to someones email address?


Arturo,

Check this link which explains in detail about sending emails

http://www.mvsforums.com/helpboards/viewtopic.php?t=439&highlight=email

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
kok328
Beginner


Joined: 05 Nov 2003
Posts: 19
Topics: 0
Location: MI, USA

PostPosted: Mon Mar 07, 2005 11:11 pm    Post subject: Reply with quote

You may want to check the options within your scheduling package.
I know for sure that Control-M will allow you to notify mulitiple users of successful and unsuccessful job completions.
Back to top
View user's profile Send private message Send e-mail AIM Address
mf_user
Intermediate


Joined: 01 Jun 2003
Posts: 372
Topics: 105

PostPosted: Sat Apr 15, 2006 3:20 am    Post subject: Reply with quote

Hi,

Is it true that using the EZACFSM1 we can create an output dataset with data, time and system names as dataset name?

Any examples please?
_________________
MF
==
Any training that does not include the emotions, mind and body is incomplete; knowledge fades without feeling.
==
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Sat Apr 15, 2006 6:23 am    Post subject: Reply with quote

Quote:

Is it true that using the EZACFSM1 we can create an output dataset with data, time and system names as dataset name?

Any examples please?


mf_user,

Please SEARCH before posting. Check these links

http://mvsforums.com/helpboards/viewtopic.php?t=2101&highlight=ezacfsm1

http://mvsforums.com/helpboards/viewtopic.php?t=3041&highlight=ezacfsm1

http://mvsforums.com/helpboards/viewtopic.php?t=2752&highlight=ezacfsm1

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group