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 prompt a message in JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to prompt a message in JCL
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Wed Jan 09, 2008 5:36 pm    Post subject: Reply to: How to prompt a message in JCL
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

Moderator Team Head


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

PostPosted: Wed Jan 09, 2008 5:37 pm    Post subject: Reply to: How to prompt a message in JCL
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject: Reply to: How to prompt a message in JCL
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: 2360
Location: Israel

PostPosted: Thu Jan 10, 2008 6:39 pm    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts How to show message using batch jobs madprasy TSO/ISPF 7 Fri Sep 09, 2016 6:55 pm
No new posts Truncated error message after VERIFY ... David Sde TSO/ISPF 4 Mon Sep 05, 2016 11:26 pm
No new posts IEC999I MESSAGE ERROR Manshadi ABENDS & Debugging 3 Sun Apr 17, 2016 3:43 pm
No new posts Error message from the J2ee converter sivasaras IMS DB/DC 5 Thu Nov 26, 2015 3:20 pm


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