You are not logged in.

#1 2012-01-09 09:42:14

vital_parsley
Member
172 posts

temp and global variables

What is the difference between the
context.temp which is defined in a job
and the other
globalMap.put("temp",input_row.sal)  and to fetch that value use globalMap.get("temp",input_row.sal) ?


which is a hash table of value and key if i m not mistaken.

Offline

#2 2012-01-09 09:45:36

pedro
Member
3682 posts

Re: temp and global variables

Hi

globalMap is a hashtable which has been declared in Java code.
A context variable is just a basic data type.
For example, temp here is just an Integer value.

BTW, don't delete topic.

Regards
Pedro


Only Paranoid Survive.

Offline

#3 2012-01-09 09:54:56

vital_parsley
Member
172 posts

Re: temp and global variables

alrit ,Thanx. and point noted.

Could a context.temp or globalMap.get("temp",1) be accessed in sme other job ?

Last edited by vital_parsley (2012-01-09 09:56:31)

Offline

#4 2012-01-09 10:48:57

pedro
Member
3682 posts

Re: temp and global variables

Yes.

They can both be available in one job.

Regards
Pedro


Only Paranoid Survive.

Offline

#5 2012-01-09 11:16:43

vital_parsley
Member
172 posts

Re: temp and global variables

No.. what i mean is could a context.temp or globalMap.get("temp",1)  created in job1 be available or accessible in job2 ?

Offline

#6 2012-01-10 09:05:38

lijolawrance
Member
375 posts

Re: temp and global variables

Hi

globalMap can be accesed inside the job only where as the context variable can be accessed in other jobs.


Regards
Lijo Lawrance

Offline

#7 2012-01-10 10:04:10

vital_parsley
Member
172 posts

Re: temp and global variables

Thanx for the reply.....Lijo

Just to confirm could you just tell me the difference in the context Variables in the beow pics....

Offline

#8 2012-01-10 11:00:56

lijolawrance
Member
375 posts

Re: temp and global variables

Hi

Its seems like you are confusing urself.

Pic 1. This is like assigning a value to the globalMap acc_no1, this value can be used whithin the job using globalMap.get("acc_no1")

Pic 2. This is the context window for creating context variable for the job.The variable created here cannot be used in any other job until the other        has same variable created in the context window.

Pic 3. This is a repository context window. The variable created here can be imported into the local job using the import button in the job specific context tab.This one helps if you have to use the same variable in two jobs there by eliminating the manual creation process.


Regards
Lijo Lawrance

Offline

#9 2012-01-10 11:39:51

vital_parsley
Member
172 posts

Re: temp and global variables

awesome! Thanx for reply lijo!

Offline

Board footer