IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

what will be value of EIBCALEN when no data is passed


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sajjan jindal
Warnings : 1

New User


Joined: 09 Sep 2007
Posts: 60
Location: india

PostPosted: Sat Aug 01, 2009 11:53 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sun Aug 02, 2009 1:11 am
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Sun Aug 02, 2009 1:36 am
Reply with quote

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. icon_wink.gif

Bill

Light travels faster than sound.

That's why some people appear bright until you hear them speak.
Back to top
View user's profile Send private message
sajjan jindal
Warnings : 1

New User


Joined: 09 Sep 2007
Posts: 60
Location: india

PostPosted: Sun Aug 02, 2009 6:55 am
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sun Aug 02, 2009 8:08 am
Reply with quote

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
View user's profile Send private message
sajjan jindal
Warnings : 1

New User


Joined: 09 Sep 2007
Posts: 60
Location: india

PostPosted: Sun Aug 02, 2009 9:45 am
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sun Aug 02, 2009 6:38 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
No new posts JCL EXEC PARM data in C Java & MQSeries 2
Search our Forums:

Back to Top