Monday, February 8, 2016

Select job streams with a specific Time Zone (TZ)

Selecting a job stream with a specific time zone set-up is a bit challenging as there is no out of the box option, the simplest method is to use direct SQL queries as below:
       
alter session set current_schema=<TWS DB user>;

SELECT DISTINCT WKS.WKS_NAME, STREAM.AJS_NAME, TZ.JST_TIMEZONE_ID
   FROM WKS_WORKSTATIONS WKS, AJS_ABSTRACT_JOB_STREAMS STREAM, JST_JOB_STREAMS TZ
WHERE WKS.WKC_ID=STREAM.WKC_ID AND WKS.WKS_NAME like '%<FTA name>%' AND 
      STREAM.AJS_ID=TZ.AJS_ID AND TZ.JST_TIMEZONE_ID = 'Europe/Bucharest'


where:
<TWS DB user> --> the DB user for TWS schema
<FTA name> --> FTA name (eider full or partial, % is a wild card like @)
TZ.JST_TIMEZONE_ID = 'Europe/Bucharest' --> jobs streams with time zone 'Europe/Bucharest'

Select job streams with / without Carry Forward (CF)

Selecting a job stream with carry forward on / off is a bit challenging as there is no out of the box option, the simplest method is to use direct SQL queries as below:
       
alter session set current_schema=<TWS DB user>;

SELECT DISTINCT WKS.WKS_NAME, STREAM.AJS_NAME, CF.JST_CARRY_FORWARD
   FROM WKS_WORKSTATIONS WKS, AJS_ABSTRACT_JOB_STREAMS STREAM, JST_JOB_STREAMS CF
WHERE WKS.WKC_ID=STREAM.WKC_ID AND WKS.WKS_NAME like '%<FTA name>%' AND 
      STREAM.AJS_ID=CF.AJS_ID AND CF.JST_CARRY_FORWARD = 'N'


where:
<TWS DB user> --> the DB user for TWS schema
<FTA name> --> FTA name (eider full or partial, % is a wild card like @)
CF.JST_CARRY_FORWARD = 'N' --> jobs streams without CF, and 'Y' with