meaning of auto_hold variable in JIL files - job-scheduling

In Autosys JIL file, i would like to know the meaning of the variable auto_hold. And when giving auto_hold: 1, what it is meant?

The auto_hold attribute denotes whether a job should automatically be put in the ON_HOLD status when the box it is in starts. The value of 1 means it should be put ON_HOLD, where a value of 0 means it should not.
If the job is not in a box, this attribute is not used.

Related

Default value 1 is not returned when the default value is omitted

Reporting against Jmeter 5.3 on Mac
Referred to the JMeter Functions and Variables documentation.
___P function
JMeter was started through command with following options
jmeter -Jgroup1.threads=7 -Jhostname1=www.realhost.edu
Default value is not set to 1 when it is omitted.
${__P(group1.loops,)}
Did not return 1
As per documentation:
Unlike the __property function, there is no option to save the value in a variable, and if no default value is supplied, it is assumed to be 1. The value of 1 was chosen because it is valid for common test variables such as loops, thread count, ramp up etc.
In your example, you have added a default value by using ',' after group1.loops, meaning default value is empty:
${__P(group1.loops,)}
To get 1, just use:
${__P(group1.loops)}
Disclaimer: This answer is Felix's one, I am just waiting for him to create the answer and will ask #Janesh to unaccept this one and accept Felix's one.

How to check if excel sheets exists in Kettle ETL?

I'm looping a directory and load all excel files where sheet name is like "Data".
If no sheet is named like "Data", I'm expecting the transformation to abort or throw an error. I have tried to use "switch-case", set default step to "Abort" if the sheet name does not equal to "Data", but this does not work. The work flow would go to both "Abort" and "Data" direction.
So how I achieve this? Just like doing an if else in Kettle? In SSIS, I can manage to use the variable to determine the work direction, but it seems that I could not use variable in Kettle.
I've figured out a solution.
USING Simple Evaluation to check for a variable value.
SET this variable value within the job:
Get sheet name from Microsoft Excel Input
Output this variable at the end of the job using [Set Variable], give it a dummy variable value
Check this variable at the parent transformation, if it equals to specific value, then continue the work flow, else abort
You can't set and read Variables in the same transformation.
In your case, get count of "Data sheets" by "group by" step and next simply call Abort in case of count=0.

DSSetParam -4 error when filling a parameter with a routine

I'm building a Sequence job that contains a UserVariables activity (ParamLoading) and a Job activity (ExtractJob), in that order. ParamLoading creates 4 user variables and invokes a routine to fill each one with the correspondng value, then invokes ExtractJob pasiing it the parametes previously loaded.
ParamLoading invokes a server routine (GetParams) which simply executes a shell script (ShellQuery) and captures the result; that shell script executes an SQL query against an Oracle database and prints the result on screen.
As far as tests go, ShellQuery works as expected and GetParams returns the expected value. But when GetParams is invoked from the sequence job (no matter if it's in ParamLoading or ExtractJob) the job fails with the following error:
Test2..JobControl (#JOB033_TBK_026_EXT_PTLF): Controller problem: Error calling DSSetParam(RUTA_ORIGEN), code=-4
[ParamValue/Limitvalue is not appropriate]
I've checked data types, parameter names, all, without success or even a message saying what might be happening.
Code of ShellQuery:
value=$(sqlplus -s $1/$2#$3/$4 <<!
set heading off
set feedback off
set pages 0
select param_value from cfg_params where filter='$5' and param_name='$6';
!)
echo $value
Code of GetParams:
Call DSExecute("UNIX", Ruta_Programas:"getparams.sh ":Username:" ":Password:" ":Server:" ":ServiceId:" ":Filtro:" ":Parametro, Output, SystemReturnCode)
Ans = Output
Return(Ans)
What are you returning as values from GetParams?
Calling a function from a sequence expects an integer value back and any non-zero digit returned is evaluated as an error.
As a test, try changing the return value from the routines to values 0-4.
Solved. For those struggling with a similar problem, GetParams was returning the captured value from ShellQuery adding a special character called "field delimiter", and given that the character is a 254 in ASCII, any job receiving the parameter would complain of an invalid value, which was the error.
Changing the routine to the following solved it:
Call DSExecute("UNIX", Ruta_Programas:"getparams.sh ":Username:" ":Password:" ":Server:" ":ServiceId:" ":Filtro:" ":Parametro, Output, SystemReturnCode)
Ans = EReplace(Output, #FM, "")
Return(Ans)
Thanks to Matt Calderon for providing a clue for solving.

SPSS- assigning mulitple numeric codes to one variable

I am trying to assign multiple codes to existing variables. I am using the syntax below, but it will only assign the first code entered for that hosp.id.number.
Syntax example:
Do if (hosp.id.number=9037) or (hosp.id.number=1058) or (hosp.id.number=11256).
Compute role_EM_communication=10.
Else if (hosp.id.number=9037.
Compute role_EM_communication=11.
End if.
Execute.
hosp.id.number needs to be coded 10 and 11, but it will only code it at 10. Anyway to rephrase so that SPSS will accept 2 or more codes for a variable such as hosp.id.number?
Your role_EM_communication variable is a single variable, but from what you are saying, I think you need it to be a set (for the same record, it could take on more than just one code). So you need to create n variables named role_EM_communication_1 to role_EM_communication_n, where n is the maximum number of codes you estimate will be possible for one record.
For your example, it would translate like this:
create the 2 variables:
vector role_EM_communication_ (2, f2.0).
do the first recode:
if any(hosp.id.number,9037,1058,11256) role_EM_communication_1=10.
very important - execute the recode
exe.
check if the first variable has data, and populate the second variable if true:
if miss(role_EM_communication_1) and any(hosp.id.number,9037) role_EM_communication_1=11.
if ~miss(role_EM_communication_1) and any(hosp.id.number,9037) role_EM_communication_2=11.
exe.

Adding entry to task_struct and initializing to default value

I want to add an entry to process control block structure (task_struct). Let say a way to tag some process. I want to initialize this field to 0 for all the process except "some special processes", later by calling sched_setscheduler() I will set this flag for the "special processes".
Does anybody have an idea how to assign a default value to a member variable in task_struct?
I'm assuming you are talking about a recent Linux kernel, because implementation detail changes over time.
There are two options. The first - you can set the value of the variable in the init_task global. See how it is done in the linux/init_task.h header. The second option is to add code to copy_process, which you might want to do anyway in order to properly handle the fork() inheritance of the field you are adding.

Resources