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

How to prompt a message in JCL


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mr.Niceguy

New User


Joined: 16 Jun 2005
Posts: 63

PostPosted: Wed Jan 09, 2008 5:30 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Jan 09, 2008 5:36 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Jan 09, 2008 5:37 pm
Reply with quote

I'm sorry, but you've lost me.

What program/utility are you running in STEP02?
Back to top
View user's profile Send private message
Mr.Niceguy

New User


Joined: 16 Jun 2005
Posts: 63

PostPosted: Wed Jan 09, 2008 6:22 pm
Reply with quote

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
View user's profile Send private message
Srihari Gonugunta

Active User


Joined: 14 Sep 2007
Posts: 295
Location: Singapore

PostPosted: Wed Jan 09, 2008 7:49 pm
Reply with quote

//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
View user's profile Send private message
Ganesh.Deokar

New User


Joined: 30 Sep 2005
Posts: 26
Location: Buffalo,NY

PostPosted: Wed Jan 09, 2008 8:01 pm
Reply with quote

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
View user's profile Send private message
Mr.Niceguy

New User


Joined: 16 Jun 2005
Posts: 63

PostPosted: Thu Jan 10, 2008 5:17 pm
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Thu Jan 10, 2008 6:39 pm
Reply with quote

You need to generate this input card on the fly.

O.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Jan 10, 2008 6:52 pm
Reply with quote

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
View user's profile Send private message
Mr.Niceguy

New User


Joined: 16 Jun 2005
Posts: 63

PostPosted: Thu Jan 10, 2008 7:03 pm
Reply with quote

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
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
This topic is locked: you cannot edit posts or make replies. how can I proof that message was post... Java & MQSeries 1
No new posts IMS Message : DFS3577A IMS DB/DC 4
No new posts dsnrexx fails without error message CLIST & REXX 9
No new posts Print out all lines with 'IBM' compil... CLIST & REXX 8
No new posts How to get the message id thats trigg... Java & MQSeries 0
Search our Forums:

Back to Top