I would like to build a job that polls a mailbox for one of several emails with attachments (don't ask me why the business won't fork out for the web service, but there we are). The emails can appear in arbitrary order, and the process will poll the mailbox, download the attachments it finds, and then return a status code that contains a bit mask of status bits based on which files were encountered.
I want the autosys batch to then kick off a processing job for each file, depending on whether the relevant bit in the status result was set. A fallback position for a small number of jobs is that we check for each unique combination of bits and kick off the appropriate jobs that correspond to the number returned. However, beyond 2-3 status bits this will start to get unwieldy.
Is it possible for Autosys to look at specific bits in a return value in some manner - equivalent to:
- If bit 0 is set (result & 0x01 = 0x01) then run Job A
- If bit 1 is set (result & 0x02 = 0x02) then run Job B
- If bit 2 is set (result & 0x04 = 0x04) then run Job C
... and so on?