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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: How to send msg to user using Rexx after successful of job
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: 8593
Location: Back in jolly old England

PostPosted: Wed May 27, 2009 4:07 pm    Post subject:
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10278
Location: italy

PostPosted: Thu May 28, 2009 2:01 pm    Post subject: Reply to: How to send msg to user using Rexx after successfu
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    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Thu May 28, 2009 2:36 pm    Post subject:
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    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Thu May 28, 2009 2:48 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu May 28, 2009 2:53 pm    Post subject:
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: 6968
Location: porcelain throne

PostPosted: Thu May 28, 2009 2:58 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu May 28, 2009 3:22 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Iterative use of a REXX script causin... bryonyh CLIST & REXX 3 Fri Jul 28, 2017 12:52 pm
No new posts Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm


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