View previous topic :: View next topic
|
Author |
Message |
sajjan jindal Warnings : 1 New User
Joined: 09 Sep 2007 Posts: 60 Location: india
|
|
|
|
Hi all,
what is the value of EIBCALEN when the transaction(Program) is executed for the first time?
I answered it zero.
then the question asked was what will be value of EIBCALEN when no data is passed?
I had read somewhere that CICS inset a value of one by default for subsequent executions.
I dont recollect where i had read or its just my confusion please help. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
If you don't pass a commarea, the value of EIBCALEN is zero. This is true the first time the transaction is invoked or if the transaction is invoked for the 17th time. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
What you're probably thinking of is when you have a CICS/COBOL program and you don't define DFHCOMMAREA, the translator will define one for you in LINKAGE as a PIC X(01).
You're interviewer is trying to trip you up.
So, instead of saying ZERO, say less than 1 (I always code it this way), which may leave him scratching his head. Then explain to him that EIBCALEN is a signed-halfword and a value less than 1 would cover ZERO as well as negative. IMHO, it's a better answer.
When ever I order a full pizza pie, I tell the guy "Slice it four pieces because I can't eat eight".
Some look at me like a grew another head out of my shoulder, while others say, yeah I can't eat eight either.
Bill
Light travels faster than sound.
That's why some people appear bright until you hear them speak. |
|
Back to top |
|
|
sajjan jindal Warnings : 1 New User
Joined: 09 Sep 2007 Posts: 60 Location: india
|
|
|
|
Hi Robert & Bill,
Thanks for your response.
Looking at your answer does it mean that we cant differentiate between a first time execution and an subsequent execution of an CICS transaction based on EIBCALEN, unless and until we design the program that way.
In our shop all the programs are coded to check the value of EIBCALEN to verify for the first time execution of the transaction.
Does it mean that the programmer himself has to take care that he passes atleast one byte to differentiate between first time and subsequent exe of a transaction.
Is there any way to differentiate between a transaction is executing for the first time or subsequent time.
Please excuse me for mistakes, will elucidate if i am not clear.
Regards,
Sajjan Jindal. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Yes, the program needs to pass at least one byte in commarea to distinguish between first and subsequent executions. There are other ways, such as using TWA or a TSQ, but commarea is probably the easiest. |
|
Back to top |
|
|
sajjan jindal Warnings : 1 New User
Joined: 09 Sep 2007 Posts: 60 Location: india
|
|
|
|
Thanks Robert,
Can someone plz help me with the following also:
We know that whenever transaction is started a task executes. A single transaction can be executed from multiple terminals at the same time. Each transaction is considered a task. Cics assigns system area and other stuff for each task. Each task will have a task number (probably EIBTASKN).
Please correct me if my understanding is wrong on the above.
I read somewhere that when a transaction return control to cics and is again resumed bcoz of (Transid) in the return command, separate task numbers will be assigned.
My question is will the task number be same in case of LINK and XCTL.
i think that the task number will be same.
Please guide me for the above. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
I do not know for sure but I suspect that task number will not change for a LINK command since you're going to a different level. XCTL may get a new task number since the transfer is at the same level and the program doing the XCTL is released. |
|
Back to top |
|
|
|