View previous topic :: View next topic
|
Author |
Message |
saurabh39 Warnings : 1 Active User
Joined: 11 Apr 2008 Posts: 144 Location: Jamshedpur
|
|
|
|
Hi All,
I was wrongly setting the RETURN-CODE by using move statement.
Referring to the below post
ibmmainframes.com/viewtopic.php?t=58460&highlight=returncode
I was able to set return code correctly, but I still have a question regarding how MAXCC was calculated.
As per one of the post, the MAXCC is decided by return-code mod 4096.
The value of return code was 1044200508. Mod of 4096 was 3132. The MAXCC displayed was 964, which is 4096 - 3132. I checked that this is true for other values too. So I wanted to know more about MAXCC and how it is set, I tried to find some manual on same but I couldnt. Request you to please let me know which manual should i refer to. I have checked LE programming guide, easytrieve,JCL & cobol but cudnt find any information.
Btw, when I displayed the hex value for return code, I got C1C2C3C4 and 964 is nothing but last 3 nibble ie 3C4. This again is true for other values too, but since I am not sure about MAXCC, I am no sure of my calculation too. SO request you to please provide me link to manual where i can get information about MAXCC.
Regards,
Tushar |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
By MAXCC I assume you mean on the NOTIFY message you receive?
0-4095 can be expressed with 24 bits, which is your three low-order nybbles. If your results show consistenly that only the last three nybbles of the four-byte binary value which Easytrieve Plus uses then that is what Easytrieve Plus does, or what z/OS does.
To find out which is truncating, make a small COBOL program that sets the RETURN-CODE to values >= 4096.
I'm not sure how well "return code/condition code" is documented as far as what you want to know, but I'd start with the JCL Reference. Other than recognising when you have a trashed value, I'm not sure how useful your researches will be, directly, but always fun to know... |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Bill,
In COBOL, the RETURN-CODE Special Register is treated as a binary-halfword.
HTH.... |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
I think you are looking at apples, oranges, and persimmons. X'C1C2C3C4' is ABCD -- which is not numeric and not a return code / condition code. How 1044200508 is related to ABCD is not clear.
And terminology is critical in IT, where similar terms may mean very different things. And as far as I am aware, the ONLY place MAXCC is used is IDCAMS control statements. A search of the JCL manuals will not find this term used. Hence you are not using the term correctly since you have not mentioned IDCAMS at all. |
|
Back to top |
|
|
saurabh39 Warnings : 1 Active User
Joined: 11 Apr 2008 Posts: 144 Location: Jamshedpur
|
|
|
|
@Robert - I was just playing and trying to find out whether my calculation is consistent thats why I passed ABCD.
If we find out the 16 complement of X'C1C2C3C4' then we get the number 1044200508.If I am not wrong if the MSB contains anything greater than or equal to 8, then we need to find out the sixteen complement to get the actual number.
when I mentioned MAXCC, i was referring to the return code in notify message.
@Bill - 4095 in hex is FFF, so its 12 bits or am I missing something. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Bill,
Yes, and you can't just blat it with anything you feel like.
An Easytrieve Plus MOVE is an MVC/MVCL. Curiously, Easytrieve Plus allows MOVE ... TO RETURN-CODE, so with no data-conversion. Instead should be coded as RETURN-CODE = ....
However, because, as you point out, the field in COBOL is so small, it will not be possible to determine from the values whether it truncates or "mods" as the results would be the same :-)
So, forget that suggestion.... |
|
Back to top |
|
|
|