Move -1 to the length field.

All sort of Mainframes Interview Questions.
Previous topicNext topic

Topic Author
Ramnath
Registered Member
Posts: 20
Joined: Thu Aug 01, 2013 6:57 pm
Zodiac: Capricorn

Move -1 to the length field.

Post by Ramnath » Mon May 23, 2016 2:34 pm

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.



Tags:


nicc
Global Moderator
Global Moderator
Posts: 583
Joined: Wed Apr 23, 2014 8:45 pm

Re: Move -1 to the length field.

Post by nicc » Mon May 23, 2016 4:04 pm

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?


Regards
Nic


Topic Author
Ramnath
Registered Member
Posts: 20
Joined: Thu Aug 01, 2013 6:57 pm
Zodiac: Capricorn

Re: Move -1 to the length field.

Post by Ramnath » Mon May 23, 2016 5:02 pm

Sorry nicc but I did not get you? Can you please explain again?



User avatar

Robert Sample
Global Moderator
Global Moderator
Posts: 1340
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
Zodiac: Virgo

Re: Move -1 to the length field.

Post by Robert Sample » Mon May 23, 2016 6:21 pm

The length field is binary.  What is -1 as a binary value?




nicc
Global Moderator
Global Moderator
Posts: 583
Joined: Wed Apr 23, 2014 8:45 pm

Re: Move -1 to the length field.

Post by nicc » Mon May 23, 2016 8:44 pm

CICS is just another program. The designers decided that, for this situation, -1 should be passed.


Regards
Nic


Topic Author
Ramnath
Registered Member
Posts: 20
Joined: Thu Aug 01, 2013 6:57 pm
Zodiac: Capricorn

Re: Move -1 to the length field.

Post by Ramnath » Tue May 24, 2016 1:47 pm

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?




Topic Author
Ramnath
Registered Member
Posts: 20
Joined: Thu Aug 01, 2013 6:57 pm
Zodiac: Capricorn

Re: Move -1 to the length field.

Post by Ramnath » Tue May 24, 2016 1:49 pm

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.



Previous topicNext topic

Return to “Interview Questions.”