Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Return Code in Easytrieve

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Thu Feb 06, 2014 12:56 pm    Post subject: Return Code in Easytrieve
Reply with quote

Hi All,

I was wrongly setting the RETURN-CODE by using move statement.
Referring to the below post

http://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
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Thu Feb 06, 2014 7:34 pm    Post subject: Reply to: Return Code in Easytrieve
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Feb 06, 2014 9:45 pm    Post subject: Reply to: Return Code in Easytrieve
Reply with quote

Bill,

In COBOL, the RETURN-CODE Special Register is treated as a binary-halfword.

HTH....
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Thu Feb 06, 2014 9:55 pm    Post subject:
Reply with quote

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
View user's profile Send private message
saurabh39
Warnings : 1

Active User


Joined: 11 Apr 2008
Posts: 144
Location: Jamshedpur

PostPosted: Thu Feb 06, 2014 10:11 pm    Post subject: Reply to: Return Code in Easytrieve
Reply with quote

@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
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Thu Feb 06, 2014 10:12 pm    Post subject: Reply to: Return Code in Easytrieve
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm
No new posts DFHWS2LS return value divated CICS 4 Mon Nov 07, 2016 5:44 pm
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us