View previous topic :: View next topic
|
Author |
Message |
Purna Shankar
New User
Joined: 25 May 2010 Posts: 7 Location: Bangalore
|
|
|
|
Hi
I have a requirement as below.
Step1 will run a program and sets a return code accordingly.
Step2 has to check for Step1.RC = 4 and display a warning message in the JESMSGLG accordingly.
Can someone help me in coding Step2 please? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
And whic program / utility exactly did you have in mind for issuing the warning message.
What do you need halp with, the JCL for the utility / program that you wish to use or the conditional execution part.
Please try to give some detail of what it is that you want - psychic day was yesterday this week. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
I believe what you need is a WTO (Assembler), or a DISPLAY (Cobol/PL/1) in the program in Step2.
Garry. |
|
Back to top |
|
|
Purna Shankar
New User
Joined: 25 May 2010 Posts: 7 Location: Bangalore
|
|
|
|
I want to know, if we have a utility program that can be used in STEP2, which can display the message in JESMSGLG, and wont abend.
The below example program NUPARM (this is exclusive for our mainframe) will display the message "WARNING WARNING WARNING " in
JESMSGLG, but it abends the JOB.
// IF (STEP2.SCPROC.RC = 4) THEN
//SNUPARM EXEC PGM=NUPARM,
// PARM=',004, WARNING WARNING WARNING '
//SYSABEND DD SYSOUT=*
// ENDIF |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Purna Shankar wrote: |
I want to know, if we have a utility program that can be used in STEP2, which can display the message in JESMSGLG, and wont abend. |
How do you expect forum members thousands of miles away to have any conception of what is and is not installed at the site you are at.
Please ask your site support people as they are probably the only ones who know |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Purna Shankar wrote: |
Step2 has to check for Step1.RC = 4 and display a warning message in the JESMSGLG accordingly. |
Did you really mean JESMSGLG and not SYSOUT? |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1049 Location: Richmond, Virginia
|
|
|
|
I think he was asking is there some IBM feature that would do this.
A nifty idea, except that the JESlogs get quite crowded with all sorts of junk we usually don't need to see.
Isn't the RC setting enough of a clue? That could then direct you to look at the SYSOUT of some step to which you wuold have written messages. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Purna Shankar wrote: |
The below example program NUPARM (this is exclusive for our mainframe) will display the message "WARNING WARNING WARNING " in JESMSGLG, but it abends the JOB. |
I think your best bet would to find the source of NUPARM and create another version that does not abend.
Or, modify the existing version to allow another parm or the first value of the existing parm to decide not to abend. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Look at the source for NUPARM. Possibly the first parameter of the PARM (which is not used in the posted example) controls if the process is to abend or not. . .
If "noabend" is not an option in the current program, do as CG suggests - write a new module or change the existing one. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
You could use the following step if the rc of the previous step = 4
Code: |
//STEP1 EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSUT1 DD *
put your text here
//SYSUT2 DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
|
|
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
Quote: |
You could use the following step if the rc of the previous step = 4
Code:
//STEP1 EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSUT1 DD *
put your text here
//SYSUT2 DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
|
but that won;t put the message in JESMSGLG, only in SYSPRINT.
Garry. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Garry,
in this case it goes to SYSUT2 sysout.
That will put it in the JES2 joblog.
Is that different from JESMSGLG? |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
Peter,
If you put '?' beside job in SDSF you will see that the JESMSGLG is separate to the individual steps' SYSOUT entries.
Garry. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Garry,
i dont have any experience with SDSF (used to work with IOF).
I remember seeing all sysout output directed to the MSGCLASS
went to the JES2 joblog. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
Peter,
SDSF display for a job shows(e.g.)
Quote: |
JESMSGLG JES2
JESJCL JES2
JESYSMSG JES2
SYSTERM DB2PC
SYSOUT PLKED
SYSPRINT SUCCESS
PRINT2 PRINT
SYSPRINT COMPLST
SYSPRINT ILODLST |
Each of these corresponds with a separate output. JESMSGLG contains the job Start Time, JOBNAME STEPNAME PROCSTEP RC EXCP CPU and job End Time.
Garry. |
|
Back to top |
|
|
Purna Shankar
New User
Joined: 25 May 2010 Posts: 7 Location: Bangalore
|
|
|
|
All,
Many thnx for the help. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
- pardon my ignorance but what's the final solution you've used!? |
|
Back to top |
|
|
Purna Shankar
New User
Joined: 25 May 2010 Posts: 7 Location: Bangalore
|
|
|
|
As I could not find any readymade utility for displaying warning messages in JESMSGLG, I have decided to display a warning message in SYSPRINT itself and did it using IEBGENER.
Then I noticed, PeterHolland also proposed the same solution.
|
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Good, Thanks for the follow-up.
Good Luck |
|
Back to top |
|
|
|