What does NOTIFY=&SYSUID mean? - jcl

What does NOTIFY=&SYSUID mean on the first line of a JCL? For example in the below declaration:
//DEV1000D JOB (0998,DEV,000,US),'TEST',
// CLASS=D,MSGCLASS=V,NOTIFY=&SYSUID

NOTIFY=&SYSUID indicates that the user who submitted the job should be notified when it completes.
From the MVS JCL manual:
NOTIFY:
In a non-APPC scheduling environment, requests that the system send a message to a
userid when this background job completes.
&SYSUID
The system replaces &SYSUID with the user ID under whose authority the job will run, which is normally one of the following:
The USER parameter from the JOB statement, if specified, or
The user ID from which the job was submitted.

Let me explain what is NOTIFY
NOTIFY statement is to direct the system ,where it has to send the success failure message after completing the job.
syntax :NOTIFY=userid/&SYSUID
Simply it says to which user the notification has to be send &SYSID is the userid from which the jcl is submitted
eg: NOTIFY=TRC033 will send success/failure message to trc033
NOTIFY=&SYSUID will send send/failure message to user submitting the job

Related

Resequencing of workflow events

Looking for suggestion or solution on the following usecase
Application receives messages ordered by change time identified by a
functional key (e.g. employee id). There can be multiple messages
for a functional key
Each message triggers a workflow. If there is a pending workflow for an employee would like to queue the new messages until the
pending workflow is complete.
Is there any way in cadence to resequence the messages to process them as a group identified by a functional key in the message?
I would have a single workflow per employee which receives a message (possibly with SignalWithStart) and queues it up in a variable if there is already processing going for a message. The processing can be implemented as a child workflow or directly as part of the employee workflow. When the processing is done the new one is kicked off if there is a buffered request. If there are no buffered requests and processing is done the employee workflow can exit.

How to send queue message to multipule receiver in freeRTOS?

I'm looking for a method to broadcast a message using queue in freeRTOS and i come up with different ideas but each one has a different problem.
what i have:
the item type for the queue is a struct with an attribute to indicate if the message is a broadcast or for a specific task.
a broadcast task that will write a message to the queue.
a queue manager task that will peek on the queue if any new message was received and if the message has a destination then it will resume that specific task or resume all tasks if it's an broadcast.
and for the Receiver task i come up with those ideas:
if i used the receive function xQueueReceive only the first task in task-queue will read the message and remove it from queue and with this, the other tasks will not be able to read that broadcast message. in the other hand, it's the perfect why for directed message (message for a specific task).
if i use the peedk function xQueuePeek the message will never be removed from queue unless i use xQueueReceive which is kinda redundant (peek and receive in the same task, meeh, ugly coding) and i can't use any other delete function because it will remove the whole queue. but that will solve the message for a specific task, and to solve the broadcast message i need to set a priority for each receive task and only the task with the lowest priority will use xQueueReceive to remove that message from queue and all receive tasks will suspend themselves after peeking or reading so they don't read again the message (i'm not sure what to do about the queue manager task because i can't suspend it and it will keep notified about a new message in queue until the last task receive it), but the whole system will need to wait for that low priority task to run to remove that message and any new message received in that time, it will not be read in the real time.
i'm still thinking about other methods like using new queue or a queue for each receive task but i'm not sure yet which method is the best one. and i don't know if there any other why to broadcast a message even without using the queue technique.
i need to tell you that this program is not for a specific project. i'm just trying to use the Queue technique in different ways. and i already found other post about broadcasting a message but it was for a specific problem where they solve it without using the queue technique. i just want to send "this is a broadcast message" to the queue and all receiver be able to read it once (just one time).
thank you.
Event groups are the only broadcast mechanism in FreeRTOS. You could use an event group to unblock all tasks that should read from a queue using the queue peek function, then xEventGroupSync() to know when all tasks had read the data so the data should them be removed.

Does recieving message id (future) indicate message is sent in PubSub?

I am sending messages to google pubsub using a callback function which reads back the message id from the future. Using the following code:
"""Publishes multiple messages to a Pub/Sub topic with an error handler."""
import time
from google.cloud import pubsub_v1
# ...
publisher = pubsub_v1.PublisherClient()
topic_path = publisher.topic_path(project_id, topic_name)
def get_callback(f, data):
def callback(f):
try:
print(f.result())
except: # noqa
print('Please handle {} for {}.'.format(f.exception(), data))
return callback
for i in range(10):
data = str('message')
# When you publish a message, the client returns a future.
future = publisher.publish(
topic_path, data=data.encode('utf-8') # data must be a bytestring.
)
# Publish failures shall be handled in the callback function.
future.add_done_callback(get_callback(future, data))
print('Published message with error handler.')
I am receiving back the message id successfully with now errors/exceptions, however I find that some messages are not read into pubsub (when viewing them from the GCP console).
The message id is printed in the line print(f.result()) within the callback function.
My question is:
Is it safe to assume that messages are sent to Pubsub successfully following the receipt of a messageid?
If so, what could be the cause for 'dropped' messages?
If publish has returned successfully with a message ID, then yes, Cloud Pub/Sub guarantees to deliver the message to subscribers. If you do not see the message, there are several things that could cause this:
The subscription did not exist at the time the message was published. Cloud Pub/Sub only delivers messages to subscribers if the subscription was created before the message was published.
Another subscriber for the subscription was already running and received the message. If you are using the GCP console to fetch messages while a subscriber is up and running, it is possible that subscriber got the messages.
If you got the message on the console once and then reloaded to get the messages again, you may not see the message again until the ack deadline has passed, which defaults to 10 seconds.
A single pull request (which is what the GCP console "View Messages" feature does), may not be sufficient to retrieve the message. If you click on it multiple times or start up a basic subscriber, you will likely see the message.

Quartz .net - Abort/Stop Current Execution of Job & Pause All the triggers

In My Project I am using Quartz.net Scheduler (3.0.7), Now There are some automated verification process which reads the DB and process it and generate output based on few conditions, (You can take example of Email Sending Mechanism which sends email read from DB and Send to Respective mail address) Now If we assume There are 300 Request to be processed and each will take long time to complete, Now There is one feature required which pause the current execution of the job, what i want is that if from 300 requests 25 is completed and currently 26 is running so the job should complete the 26th execution but should stop rest of the request.
What I have tried is to implement the Pause and Interrupt methods of Quartz.net
i.e. await scheduler.PauseJob(jobKey); &
await scheduler.Interrupt(jobKey);
Which Can Pause the upcoming executions, If I can get any Event or Token into Job Execution Class, I can achieve what i want.
IInterruptableJob Has been removed from the Quartz.net
If anyone can help me on this.
From the migration guide:
IInterruptableJob interface has been removed. You need to check for IJobExecutionContext’s CancellationToken.IsCancellationRequested to determine whether job interruption has been requested.
So combining the pause and observing the token should work.

SMTP protocol: multiple mails per connection

I need to implement support of multiple messages per one connection for my SMTP server.
Every message ends with:
data
<<content>>
.
And it's logically that protocol state should be reset to "after receive authentication" point. Is it correct?
The question: Is it possible that any client sends message content with multiple data commands? Does the standard allow it?
From RFC2821 ("Simple Mail Transfer Protocol"):
The mail data is terminated by a line containing only a period, that
is, the character sequence "." (see section 4.5.2).
...
Receipt of the end of mail data indication requires the server to process the stored mail transaction information. This processing consumes the information in the reverse-path buffer, the forward-path buffer, and the mail data buffer, and on the completion of this command these buffers are cleared.
i.e. after <CRLF>.<CRLF> is received, the server consumes the mail data and clears its buffers; hence the client cannot then send more content associated with the message, since the server will have forgotten about the message.
...
Once started, a mail transaction consists of a transaction beginning command, one or more RCPT commands, and a DATA command, in that order.
...
MAIL (or SEND, SOML, or SAML) MUST NOT be sent if a mail transaction is already open, i.e., it should be sent only if no mail transaction had been started in the session, or it the previous one successfully concluded with a successful DATA command, or if the previous one was aborted with a RSET.
i.e. MAIL begins a new mail transaction, and a successful DATA command (terminated by <CRLF>.<CRLF>) concludes it; the client may then send another message.
From RFC4954 ("SMTP Service Extension for Authentication"):
After an AUTH command has been successfully completed, no more AUTH commands may be issued in the same session. After a successful AUTH command completes, a server MUST reject any further AUTH commands with a 503 reply.
i.e. authentication takes place at most once per session, and applies until the end of that session.