Hi Everyone,
Is it possible to check if an environment variable or a parameter is null? Because on job properties variables dont have nullability option.
Hope you can help me.
Thanks.
Null Handling Function on Environment Variable.
Moderators: chulett, rschirm, roy
Job parameters can't be null, your job will abort if they are.
To check if the parameters are given or not by the main program you can initialize them with a default value and in the job, check for that value. Ex:
Parameter : LPAR_TMP -> Default value : 'NULL'
On a Transformer :
Hope that can help you.
To check if the parameters are given or not by the main program you can initialize them with a default value and in the job, check for that value. Ex:
Parameter : LPAR_TMP -> Default value : 'NULL'
On a Transformer :
Code: Select all
If LPAR_TMP = 'NULL'
Then 'The parameter LPAR_TMP is null'
Else 'The parameter LPAR_TMP is not null'
From what I recall that's mostly true, it depends on the data type. Some are required while others (like String) are not. Unless this is something they've changed in recent versions.Thomas.B wrote:Job parameters can't be null, your job will abort if they are.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
I think that using a string "NULL" can be confusing and potentially introduce problems, I prefer something less ambiguous such as "NotDefined" or "Undefined".
NULL handling ranks up there with date/time formatting in my top 10 list of "things that cause problems, but shouldn't". Although I suppose that exactly those issues pay for my lifestyle
NULL handling ranks up there with date/time formatting in my top 10 list of "things that cause problems, but shouldn't". Although I suppose that exactly those issues pay for my lifestyle
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>