View previous topic :: View next topic
|
Author |
Message |
Mr.Niceguy
New User
Joined: 16 Jun 2005 Posts: 63
|
|
|
|
Hi all,
Let us say I have two steps in a job.
//STEP01 -------
//STEP02 ------ In this step I just want to code a message especially in JCL, based on the condition code of STEP01. Of course we can use condition parameter to handle condition code, but how to send a message to the user after throwing an error in screen in JCL
The message should prompt below the MAXXCC which we use to throw in screen. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
You will need to write a Rexx script to be executed wich
needs to scan the control blocks of the previous steps,
extract the needed info and send the message..
unless there is such a facility in Your automated scheduler
( much better from any point of view - no dependency on the mvs control block structure ) |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I'm sorry, but you've lost me.
What program/utility are you running in STEP02? |
|
Back to top |
|
|
Mr.Niceguy
New User
Joined: 16 Jun 2005 Posts: 63
|
|
|
|
SuperK,
I wanted to throw an error message.
Let us say, In STEP01 I wanted to copy members from 24 source PDS to Destination PDS using IEBCOPY utility. All the 24 PDS have been coded in STEP01. Sometimes, there may not be even a single member in some PDS. At that time, obviously it will end up with MAXCC of 8. In this case, I want to handle the condition in STEP02 to make user to be aware by throwing some message like "Some PDS are not having even single member'. So I wanted to know what are the possible conditions to handle it.
Please let me know if you need some more information regarding this.
Thanks alot for your support. |
|
Back to top |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
//STEP2 EXEC PGM=IKJEFT01
//SYSTSPRT DD DUMMY
//SYSPRINT DD DUMMY
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
//SYSTSIN DD *
SEND 'IEBCOPY FAILED with RETURN CODE 8' +
USER (USERID) LOGON
/*
make STEP2 to run when return code is 8 using IF ENDIF in JCL. |
|
Back to top |
|
|
Ganesh.Deokar
New User
Joined: 30 Sep 2005 Posts: 26 Location: Buffalo,NY
|
|
|
|
I think you can try IKJEFT01 and IF ENDIF combination to send the message. But the limitation is you have to write multiple steps to handle each CC thrown by the previous step.
Code: |
//COND01 IF STEP01.RC=8 THEN
//STEP010 EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
SEND 'Some PDS does not have a single member',USER(userid) LOGON
/*
// ENDIF |
You can use COND parameter also instead of IF ENDIF. |
|
Back to top |
|
|
Mr.Niceguy
New User
Joined: 16 Jun 2005 Posts: 63
|
|
|
|
Hi All,
Thanks for your response. This would be really helpful for me to code. But it is prompting me if I code my ID in the place of USERID.
SEND 'Some PDS does not have a single member',USER(userid) LOGON
This is common job which we are going to use. So it should prompt to the user, whoever they may be. So I tried with &Sysuid in SYSIN parameter. But It returned with RC of 92 with the description
INVALID USERID, &SYSUID
MISSING USERID(S) TO WHOM MESSAGE IS TO BE SENT+
MISSING USERID(S) OF MESSAGE DESTINATION
So please suggest me.
Thanks in advance. |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
You need to generate this input card on the fly.
O. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
If you use USER(*) then it will send a message to the user that submitted the job, is that what you want. |
|
Back to top |
|
|
Mr.Niceguy
New User
Joined: 16 Jun 2005 Posts: 63
|
|
|
|
Thanks alot! Craq,
The small idea you gave is helped me alot.
Thanks once again.
Thanks for all for your kind co-operation. :-) |
|
Back to top |
|
|
|