Move -1 to the length field.

All sort of Mainframes Interview Questions.

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

Move -1 to the length field.

Postby 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: 543
Joined: Wed Apr 23, 2014 8:45 pm
Been thanked: 11 times

Re: Move -1 to the length field.

Postby 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

Re: Move -1 to the length field.

Postby 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: 1267
Joined: Fri Jun 28, 2013 1:22 am
Location: East Dubuque Illinois
Has thanked: 2 times
Been thanked: 90 times

Re: Move -1 to the length field.

Postby 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: 543
Joined: Wed Apr 23, 2014 8:45 pm
Been thanked: 11 times

Re: Move -1 to the length field.

Postby 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

Re: Move -1 to the length field.

Postby 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

Re: Move -1 to the length field.

Postby 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.




Return to “Interview Questions.”

Who is online

Users browsing this forum: CommonCrawl [Bot] and 0 guests