How to capture system messages 
Author Message
 How to capture system messages

Hi all,

I have a rexx program which submits a batch program

/*****************************REXX*******************************/
SAY 'I AM RUNNING'                                                
X=OUTTRAP('TEST.')                                                
"SUBMIT 'TSOABCD.LIST.TEMPLATE(TEST2)'"                          
X=OUTTRAP('OFF')
SAY "NO OF TEST VARIABLES"TEST.0
IF RC = 0 THEN                                                    
   SAY 'LAST COMMAND EXECUTED SUCCESSFULLY'                      
ELSE                                                              
   SAY 'LAST COMMAND FAILED'                                      
SAY 'I AM COMING OUT'    

/***************************************************************/

However this does not capture the system message  
05.42.48 JOB16908 $HASP165 TSOABCDL ENDED AT PERSTEST  MAXCC=0
CN(INTERNAL)

which gives the return code of submitted batch.

Is there anyway to capture this message into a REXX program variable?
I need to automatically document the Return codes of the jobs
submitted thru the REXX program. Or can I use the JOB-ID and extract
the return code from SDSF?

Thanks in advance,
Arun



Fri, 17 Dec 2004 17:47:07 GMT  
 How to capture system messages


Quote:
> However this does not capture the system message  
> 05.42.48 JOB16908 $HASP165 TSOABCDL ENDED AT PERSTEST  MAXCC=0
> CN(INTERNAL)

Usually monitoring of job return-codes is handled by a production job
scheduling package.

It can also be done by operator automation (via NetView etc).

There's no practical efficient way to do it from a TSO user address
space, partly because you can't have that address space busily consuming
CPU while waiting for a job to finish.

In any case the job might never start...  

You can use SDSF to look at a finished job's output on the spool,
provided that the output is still there.  However to do that you need to
know that the job has finished.

A reasonable compromise is to put step(s) at the end of a job which only
run if the highest cc so far is 0, or something else, or if there has
been an abend, and have those steps write suitable messages somewhere.
That's not much use if there's many possible return codes.  

You know, you're not the first person to want to do this sort of thing.
Oddly enough, there's a standard solution.  It's called a PRODUCTION
JOB SCHEDULING PACKAGE.  And, still, this has nothing to do with rexx.

--
Jeremy C B Nicoll - my opinions are my own.



Fri, 17 Dec 2004 22:23:49 GMT  
 How to capture system messages


Quote:
>I have a rexx program which submits a batch program

This is not a REXX issue. I would suggest that you pursue it in
IBM-MAIN or TSO-REXX.

In general, the SUBMIT command does not return any information about
the submitted job beyond the jobid.

Quote:
>Is there anyway to capture this message into a REXX program
>variable? I need to automatically document the Return codes of the
>jobs submitted thru the REXX program. Or can I use the JOB-ID and
>extract the return code from SDSF?

SDSF or TSO OUTPUT would let you capture a SYSOUT file to a DASD file;
you'd still have to scan for the messages of interest. There is no way
to simply extract the return code of a step within the job, even the
RC of the last step.

If you are already processing console messages with, e.g., CONSOLE,
you could scan for $HASP165. Again, you would have to extract the RC
from the message. Note that there is too much overhead for this to be
reasonable if you're not already doing it for other reasons.

--
     Shmuel (Seymour J.) Metz, SysProg and JOAT
     Atid/2, Team OS/2, Team PL/I

Any unsolicited commercial junk E-mail will be subject to legal
action.  I reserve the right to publicly post or ridicule any
abusive E-mail.

I mangled my E-mail address to foil automated spammers; reply to
domain Patriot dot net user shmuel+news to contact me.  Do not



Sat, 18 Dec 2004 23:42:33 GMT  
 How to capture system messages


Quote:
>You can use SDSF to look at a finished job's output on the spool,
>provided that the output is still there.  However to do that you need
>to know that the job has finished.

He will know if he includes a NOTIFY keyword on his JOB statement.

--
     Shmuel (Seymour J.) Metz, SysProg and JOAT
     Atid/2, Team OS/2, Team PL/I

Any unsolicited commercial junk E-mail will be subject to legal
action.  I reserve the right to publicly post or ridicule any
abusive E-mail.

I mangled my E-mail address to foil automated spammers; reply to
domain Patriot dot net user shmuel+news to contact me.  Do not



Sat, 18 Dec 2004 23:43:42 GMT  
 How to capture system messages


Quote:
> He will know if he includes a NOTIFY keyword on his JOB statement.

Sure, but I think it's more a case of an unattended TSO session knowing
than a person watching the terminal...

--
Jeremy C B Nicoll - my opinions are my own.



Sun, 19 Dec 2004 02:11:11 GMT  
 How to capture system messages


% you'd still have to scan for the messages of interest. There is no way
% to simply extract the return code of a step within the job, even the
% RC of the last step.

How about with pipes? Or isn't that available on MVS?

[don't mind me, I haven't signed on to an MVS machine since 1988]
--

Patrick TJ McPhee
East York  Canada



Sun, 19 Dec 2004 10:13:25 GMT  
 How to capture system messages
The message
Quote:
> 05.42.48 JOB16908 $HASP165 TSOABCDL ENDED AT PERSTEST  MAXCC=0
> CN(INTERNAL)

is the result of the NOTIFY option on your JOB statement (it may be
implicit - see the SUBMIT command for details).

It is an _asynchronous_ notification that may appear hours, days, months,
etc after your SUBMIT script is over. It may be sent when you're not logged
on, in which case you can poll for it. As a result, you cannot trap it with
your REXX, as you won't / can't have a REXX running.

BTW, When you receive the message is determined by the LISTBC command. Most
sites automatically call LISTBC as part of the "interactive logon script".


Quote:
> Hi all,

> I have a rexx program which submits a batch program

> /*****************************REXX*******************************/
> SAY 'I AM RUNNING'
> X=OUTTRAP('TEST.')
> "SUBMIT 'TSOABCD.LIST.TEMPLATE(TEST2)'"
> X=OUTTRAP('OFF')
> SAY "NO OF TEST VARIABLES"TEST.0
> IF RC = 0 THEN
>    SAY 'LAST COMMAND EXECUTED SUCCESSFULLY'
> ELSE
>    SAY 'LAST COMMAND FAILED'
> SAY 'I AM COMING OUT'

> /***************************************************************/

> However this does not capture the system message
> 05.42.48 JOB16908 $HASP165 TSOABCDL ENDED AT PERSTEST  MAXCC=0
> CN(INTERNAL)

> which gives the return code of submitted batch.

> Is there anyway to capture this message into a REXX program variable?
> I need to automatically document the Return codes of the jobs
> submitted thru the REXX program. Or can I use the JOB-ID and extract
> the return code from SDSF?

> Thanks in advance,
> Arun



Sun, 19 Dec 2004 13:45:31 GMT  
 How to capture system messages


Quote:
>How about with pipes?

How would they help?

Quote:
>Or isn't that available on MVS?

Not bundled, but available.

--
     Shmuel (Seymour J.) Metz, SysProg and JOAT
     Atid/2, Team OS/2, Team PL/I

Any unsolicited commercial junk E-mail will be subject to legal
action.  I reserve the right to publicly post or ridicule any
abusive E-mail.

I mangled my E-mail address to foil automated spammers; reply to
domain Patriot dot net user shmuel+news to contact me.  Do not



Mon, 20 Dec 2004 01:43:10 GMT  
 How to capture system messages


Quote:



> >How about with pipes?

> How would they help?

CMS Pipelines can be set up to wait for, and respond to, asynchronous
messages. I haven't the foggiest whether TSO Pipelines can do the same
thing. Go ask on CMSPIP-L at Marist.edu.

Quote:
> >Or isn't that available on MVS?

> Not bundled, but available.

Idiots! With all the power there is in Pipelines, why the heck doesn't
IBM include them with MVS? (Not Invented Here comes to mind). They did
eventually come around and admit that REXX was better than that stupid
CLIST language!


Fri, 31 Dec 2004 01:01:38 GMT  
 How to capture system messages

07/14/2002

Quote:
>CMS Pipelines can be set up to wait for, and respond to, asynchronous
> messages.

Not, however, to asynchronous messages from a different virtual
machine.

Quote:
>I haven't the foggiest whether TSO Pipelines can do the same  thing.

It has the same limitation.

Quote:
>Idiots! With all the power there is in Pipelines, why the heck
>doesn't  IBM include them with MVS?

Why don't they include OREXX? Why is WSA "functionally stabilized"?

Quote:
>(Not Invented Here comes to mind).

No, it's the bean counters.

Quote:
>They did
>eventually come around and admit that REXX was better than that
>stupid  CLIST language!

Oddly enough, there are actually things in REXX, or in EXEC and EXEC2,
that are easier than in REXX.

--
     Shmuel (Seymour J.) Metz, SysProg and JOAT
     Atid/2, Team OS/2, Team PL/I

Any unsolicited commercial junk E-mail will be subject to legal
action.  I reserve the right to publicly post or ridicule any
abusive E-mail.

I mangled my E-mail address to foil automated spammers; reply to
domain Patriot dot net user shmuel+news to contact me.  Do not



Sun, 02 Jan 2005 01:19:43 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. Capturing Windows messages registered using RegisterWindowsMessage

2. Capturing system Ctrl-Alt-Del

3. Capturing System Command Output (was: SH Backquote)

4. Capturing System Command Output (was: SH Backquote)

5. Capturing System Command Output

6. Capturing output from Kernel#system

7. capturing output of os.system() into a list?

8. capturing stdout and stderr of system()

9. capture 'system' output

10. capturing a call system() output into a variable

11. capturing output from os.system() in Windows?

12. Unexpected error message of the Dolphin licencing system

 

 
Powered by phpBB® Forum Software