Move -1 to the length field.

All sort of Mainframes Interview Questions.
Post Reply
Ramnath
Registered Member
Posts: 20
Joined: Thu Aug 01, 2013 6:57 pm

Move -1 to the length field.

Post 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.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Move -1 to the length field.

Post 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?
Regards
Nic
Ramnath
Registered Member
Posts: 20
Joined: Thu Aug 01, 2013 6:57 pm

Re: Move -1 to the length field.

Post by Ramnath »

Sorry nicc but I did not get you? Can you please explain again?
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1891
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

Re: Move -1 to the length field.

Post by Robert Sample »

The length field is binary.  What is -1 as a binary value?
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: Move -1 to the length field.

Post by nicc »

CICS is just another program. The designers decided that, for this situation, -1 should be passed.
Regards
Nic
Ramnath
Registered Member
Posts: 20
Joined: Thu Aug 01, 2013 6:57 pm

Re: Move -1 to the length field.

Post 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?
Ramnath
Registered Member
Posts: 20
Joined: Thu Aug 01, 2013 6:57 pm

Re: Move -1 to the length field.

Post 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.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Interview Questions.”