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

How to send msg to user using Rexx after successful of job


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rakeshdsire4u

New User


Joined: 26 May 2009
Posts: 11
Location: Bangalore

PostPosted: Wed May 27, 2009 4:06 pm
Reply with quote

Hi,
How to send the msg to user after succesful or failure of the job status.

e.g I am trying to read one file and writing to another file and i want to send the user a msg that job went file or it abended using TSO send msg cmd.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 27, 2009 4:07 pm
Reply with quote

NOTIFY=userid on the jobcard
Back to top
View user's profile Send private message
rakeshdsire4u

New User


Joined: 26 May 2009
Posts: 11
Location: Bangalore

PostPosted: Thu May 28, 2009 1:54 pm
Reply with quote

i am asking abt to send msg using rexx code

Below is the ex:-

=======================================
ADDRESS TSO "ALLOC DA("INT1")FI(INDD1)SHR REUSE"
"EXECIO * DISKR INDD1(FINIS STEM IN1."
"FREE FI(INDD1)"
"END"
ADDRESS TSO "ALLOC DA("INT2")FI(INDD1)SHR REUSE"
"EXECIO * DISKW OUTDD1(FINIS STEM IN1."
"FREE FI(OUTDD1)"
"END"
IF RC=0 THEN
TSO SEND 'FILE CREATED' USER(USERID)
ELSE
TSO SEND 'FILE ERROR' USER(USERID)
EXIT

=======================================


TSO send cmd is not working in rexx.

can u help me in this.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu May 28, 2009 2:01 pm
Reply with quote

looks like You have discovered a bug icon_cool.gif

by the way, Your rexx should give You an error
for the write You allocate INDD1 but You use OUTDD1

it is a good practice also to specify the number of record to be written like
Code:
"EXECIO " in1.0 " DISKW OUTDD1(FINIS STEM IN1."
Back to top
View user's profile Send private message
rakeshdsire4u

New User


Joined: 26 May 2009
Posts: 11
Location: Bangalore

PostPosted: Thu May 28, 2009 2:17 pm
Reply with quote

By mistake i have mentioned INDD1 instead of OUTDD1.
code is worikinf fine upto reading and writing to a file but giving error in msg cmd.
=============================================

+++ TSO SEND 'FILE CREATED' USER(USERID)

Error running REXX4, line 15: Routine not found

============================================
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu May 28, 2009 2:36 pm
Reply with quote

when you type in your code instead of cut & paste
and
you don't PREVIEW your post,
why do you think we would believe anything you say?

you don't even bother to debug you script..., use: trace ?R

now, what do you think 'ROUTINE NOT FOUND' means?

maybe, TSO SEND is not a command (routine)?????

You only preface commands with TSO in a FOREGROUND session at the command line.

In a REXX Script, you address the environment and then invoke the command.

ADDRESS TSO
SEND..................................
Back to top
View user's profile Send private message
rakeshdsire4u

New User


Joined: 26 May 2009
Posts: 11
Location: Bangalore

PostPosted: Thu May 28, 2009 2:46 pm
Reply with quote

thanks for the reply,
since i am beginner in the rexx, i don't know the use of trace and second the difference between TSO cmd in foreground and in rexx script.

Code is working fine after initiliaze with ADDRESS icon_smile.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu May 28, 2009 2:48 pm
Reply with quote

Quote:
since i am beginner in the rexx, i don't know the use of trace and second the difference between TSO cmd in foreground and in rexx script.

that was obvious. spend less time explaining why you don't know something
and spend a little more time reading:

REXX Reference

REXX User Guide
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu May 28, 2009 2:53 pm
Reply with quote

The reason that I suggested using NOTIFY instead of the "wheel reinvention" method is that the NOTIFY option will also notify the recipient of a JCL error as well as the sucess or failure of a job.

Also, it is so much easier to change the NOTIFY parameter than to insert a whole new step into a job. Well, most places that I have worked this only needed s simple change notification rather than a full change notice, test plan, and results review. But maybe your change control is a lot more lax than most other.

Are you going to have a different REXX EXEC for each job to specify the jobname or just a generic message to be sent.

I suppose that you could have a PARM on the IKJEFT01 EXEC card with the jobname, or of course you could go chasing z/OS control blocks to get the information.

Sigh ........ All this when all it would take is merely a change to the NOTIFY parm on the jobcard.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu May 28, 2009 2:58 pm
Reply with quote

Expat,

don't confuse people with facts!

he has developed a Tool, he wants to use it.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu May 28, 2009 3:22 pm
Reply with quote

dbzTHEdinosauer wrote:
Expat,
don't confuse people with facts!
he has developed a Tool, he wants to use it.

Yes, how remiss of me.

Wonder how much they charge to subscribe to the wheel reinvention society icon_rolleyes.gif
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top