Showing posts with label job streams. Show all posts
Showing posts with label job streams. Show all posts

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

Tuesday, May 26, 2015

"conman" commands & syntax


conman commands are user to manage objects in PLAN (composer commands are used to manage objects in DATABASE)

Below are some very useful conman commands syntaxes grouped is several categories:

1. Jobs & Job Streams:

# display the stdlist (job log) of a specific job with jobid=job_number
conman sj "@#$job_number;stdlist;single" 
# add job steam scheduled time / date in the search query
conman "sj @#@ (0000).@" ; conman "ss @#@ (2204 05/25)" 
# count EXEC jobs, `echo "Yes"` before the command if conman parameters aren't set up
conman "sj @#@+state=EXEC;short" | grep "EXEC +" | wc -l 
# change job stream priority to 0
conman "ap @#JS1;0;noask" 
# change job stream limit to 0
conman "ls @#JS1;0;noask" 
# displays prompt messages
conman recall 
# displays information about files
conman showfiles 
# update windows user "username" password in the current plan
conman altpass username 
# display job details from plan
conman "dj @#@" 
# display job stream syntax from plan
conman "ds @#@" 
# display user launching the job
conman "sj @#@;logon" 
# display script / command used by job
conman "sj @#@;info" 
# display info using unique id for JS
conman "sj @#@;keys;extended" | uniq 

2. FTA Agents:

# change limit to 100
conman "lc @;100"
# change fence to 0, no ask
conman "fence @;0;noask"
# additional details about workstations (including netman port)
conman "sc;link"
# display agent version / fixpack and OS details
conman "sc @;info"
# to start monman, for event rules
conman startmon

3. Symphony:

# to check the agent health status (including symphony corruption)
conman "chs XYZ"
# to reset symphony of a corrupted agent
conman "resetfta XYZ"

4. Event rules:

# to list active event rules
conman "sc;getmon"
# to deploy the event rules
conman "deploy"

Control Characters:
You can enter the following control characters to interrupt conman.
Control+c   Conman stops executing the current command at the next step that can be interrupted, and returns a command prompt.
Control+d   Conman quits after executing the current command.

Wildcards:
@ Replaces one or more alphanumeric characters.
?   Replaces one alphabetic character.
% Replaces one numeric character.

Delimiters and special characters:
&amp Command delimiter.
+   A delimiter used to select objects for commands. It adds an attribute the object must have. For example: sked1.@+priority=0
~   A delimiter used to select objects for commands. It adds an attribute the object must not have. For example: sked1.@~priority=0
;    Argument delimiter. For example: ;info;offline
,    Repetition and range delimiter. For example: state=hold,sked,pend
=   Value delimiter. For example: state=hold
: !  Command prefixes that pass the command on to the system. These prefixes are optional; if Conman does not recognize the command, it is passed automatically to the system. For example: !ls or :ls
<<>> Comment brackets. For example: sj @#@.@ <>
*** Comment prefix. The prefix must be the first character on a command line or following a command delimiter. For example: *comment or sj & *comment**
>  Redirects command output to a file and overwrites the contents of the file. If the file does not exist, it is created. For example: sj > joblist
>> Redirects command output to a file and appends the output to the end of file. If the file does not exist, it is created. For example: sj >> joblist
|   Pipes command output to a system command or process. The system command is run whether or not output is generated. For example:  sj| grep ABEND
||  Pipes command output to a system command or process. The system command is not run if there is no output. For example: sj || grep ABEND



!!!! Note: I only described a fraction of conman commands available, to see all of them used THIS link.