View previous topic :: View next topic
|
Author |
Message |
rakeshdsire4u
New User
Joined: 26 May 2009 Posts: 11 Location: Bangalore
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
NOTIFY=userid on the jobcard |
|
Back to top |
|
|
rakeshdsire4u
New User
Joined: 26 May 2009 Posts: 11 Location: Bangalore
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
looks like You have discovered a bug
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 |
|
|
rakeshdsire4u
New User
Joined: 26 May 2009 Posts: 11 Location: Bangalore
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
rakeshdsire4u
New User
Joined: 26 May 2009 Posts: 11 Location: Bangalore
|
|
|
|
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 |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Expat,
don't confuse people with facts!
he has developed a Tool, he wants to use it. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
Back to top |
|
|
|