Problem with Subsystem Interface to JESx, Function 80

2005-11-25 Thread Wolfgang Rupprath
Hello,

we have an application that submits jobs using the VSAM-Interface
(Macros GENCB, MODCB, SHOWCB etc.) to the internal reader and then
obtains the submitted job's id using the ENDREQ-Makro. This all works
fine and we always get a job id when the input stream contains a valid
job and no garbage.

Now we added some code to optionally wait for the submitted job to
complete. For that, we use the subsystem interface (IEFSSREQ) with
function code 80 (extended status call). We use the job id returned from
the ENDREQ as a filter to return only information for this job.

Depending on the load on the JES subsystem, the first calls trying to
obtain the job status using IEFSSREQ always fail to provide information
on this job id. It takes some time (sometimes several seconds) until the
job appears in the output of IEFSSREQ. From my understanding, as the job
has already been assigned a job id, it should appear on one of the JES
queues, for example somewhere in the JES input processing phase.

As the program has no influence on the type of job submitted, there is
no way to decide whether the job has not yet appeared on the JES queues
or whether it has already disappeared after PURGE processing.

So my question is: Is there a foolproof way to obtain information about
a job that has been assigned an id during submit and has not yet
appeared on the JES queues ?

Our system is the z/OS 1.4 Summer with JES2 from the preconfigured ADCD.

Any comments are welcome.

Regards

Wolfgang Rupprath
FSP GmbH
Cologne/Germany

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Started Task written in C ?

2005-06-07 Thread Wolfgang Rupprath
Hi all,
 
 Can you provide s short segment of source about how to use these
two
 functions? I just tried to use __console() send message to console but
got
 nothing.
  Thx!

here is a small test program using the __console() function to display a
message on the console and/or the system log, then wait for either a
MODIFY or a STOP command and then terminate.

I don't have a running program for the __console2() function. We simply
did not need the enhanced capabilities of routing code specifications
etc., so we settled with the __console().

Wolfgang 

- cut here -
#include stdio.h
#include string.h
#include errno.h
#include sys/__messag.h

static char szHelloMessage[] = TEST Program for console() started ;

extern int main ( int argc , char *argv[] )
{
   struct __cons_msg  consoleMessage;
   int rc;
   char caCommandString[200];
   int  iConsoleCommand;

   consoleMessage.__format.__f1.__msg_length = strlen(szHelloMessage);
   consoleMessage.__format.__f1.__msg= szHelloMessage;

   printf ( Calling __console() function\n );

   rc = __console(consoleMessage,caCommandString,iConsoleCommand);

   if ( rc == 0 )
   {
  switch ( iConsoleCommand )
  {
 case _CC_modify:
printf ( Modify command received, CMD = %s\n ,
 caCommandString );
break;

 case _CC_stop:
printf ( Stop command received\n );
break;

 default:
printf ( Invalid command type received from __console(),
  type = %d\n , iConsoleCommand );
break;
  }
   }
   else
   {
  printf ( Call to __console() failed, errno = %d\n , errno );
   }
}

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html


Re: Started Task written in C ?

2005-06-06 Thread Wolfgang Rupprath
Hi Michael,

we have implemented a started task in C. There are two functions in the
C library that deal with operator commands, __console() and
__console2(). Both functions will block when you try to intercept MODIFY
or STOP commands, so they should be placed in a special application
thread to have the main thread available to process your application
logic. 

See the C/C++ Run-Time Library Reference for details.

Wolfgang

-Original Message-
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Michael Knigge
Sent: Monday, June 06, 2005 9:38 AM
To: IBM-MAIN@BAMA.UA.EDU
Subject: Started Task written in C ?

All,

is it possible to write a started task in C? Ok, surely I know it is 
possible to write a program that never ends ;-), but I need to catch 
the operator command for stopping the started task (/P command if I 
remember correctly).

Can this be done? Maybe with signal() ?

Thank you,
   Michael

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

--
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html