Page 1 of 1

Move -1 to the length field.

Posted: Mon May 23, 2016 2:34 pm
by Ramnath
Hi,

I was asked that, we know that -1 is moved to the length field in when we use dynamic symbolic cursor positioning in CICS but the question is why do we do so? Why not move some other negative or a positive number ?

I just don't know the answer for it, can someone experienced please help.

Re: Move -1 to the length field.

Posted: Mon May 23, 2016 4:04 pm
by nicc
If you wrote a program that did something if -1 was passed to it as a paramdeter and something else if anything else was passed... Get the idea?

Re: Move -1 to the length field.

Posted: Mon May 23, 2016 5:02 pm
by Ramnath
Sorry nicc but I did not get you? Can you please explain again?

Re: Move -1 to the length field.

Posted: Mon May 23, 2016 6:21 pm
by Robert Sample
The length field is binary.  What is -1 as a binary value?

Re: Move -1 to the length field.

Posted: Mon May 23, 2016 8:44 pm
by nicc
CICS is just another program. The designers decided that, for this situation, -1 should be passed.

Re: Move -1 to the length field.

Posted: Tue May 24, 2016 1:47 pm
by Ramnath
Robert Sample wrote:The length field is binary.  What is -1 as a binary value?
Two's complement of 1?

As length would be S9(4) COMP - then it would have all 1s?

Re: Move -1 to the length field.

Posted: Tue May 24, 2016 1:49 pm
by Ramnath
nicc wrote:CICS is just another program. The designers decided that, for this situation, -1 should be passed.
I had said something similar like it's the rule, this is how it is done. But the question was why it is done? Which I could not answer to the interviewer's satisfaction.