Home > Return Code > Cobol Return Code Register

Cobol Return Code Register

Contents

GOBACK. 900-EXIT. Personally, I recommend setting the RETURN-CODE over calling ILBOABN0 or data-exception tehcniques. Join UsClose Google Grupları Tartışma Forumları'nı kullanmak için lütfen tarayıcı ayarlarınızda JavaScript'i etkinleştirin ve sonra bu sayfayı yenileyin. . DISPLAY ' ' DISPLAY 'PROGRAM WVCB900 ENDING: ' DB2-TIMESTAMP OF DCLCMSTPGLL. Check This Out

Your attention to this matter is appreciated, as we don't know how many programs, if any, set a return code before issuing a successful DB2 command." Myron _____________________________________________________________________ * IDUG North Mike -----Original Message----- From: IDUG DB2-L [mailto:[login to unmask email] On Behalf Of Myron Miller Sent: Monday, November 08, 2010 9:54 AM To: [login to unmask email] Subject: [DB2-L] COBOL return Joe One of our programmers sent me the following and asked me about it. Ever onward,jar RE: Set JCL cond code from within COBOL program TERMINATE (Programmer) (OP) 11 May 05 19:48 Thanks to 3gm and jrohrbach for their quick and helpful responses. http://publib.boulder.ibm.com/iseries/v5r1/ic2924/books/c0925392521.htm

How To Set Return Code In Jcl

Cancel Red Flag SubmittedThank you for helping keep Tek-Tips Forums free from inappropriate posts.The Tek-Tips staff will check this out and take appropriate action. Resolving the problem Please view the documentation in the Enterprise COBOL Language Reference near page 20. other COBOL statements ... The RETURN-CODE is set by MOVEing a numeric value to it.

Terms of Service | Privacy Policy | Contact×OKCancel GOBACK. 900-EXIT. Anyone have any ideas what is going on? "I'm encountering a strange situation which I hope someone can clarify. Jcl Cond Resources Join | Advertise Copyright © 1998-2017 ENGINEERING.com, Inc.

Already a member? I'm running a batch COBOL/DB2 program. Your attention to this matter is appreciated, as we don't know how many programs, if any, set a return code before issuing a successful DB2 command." Myron ________________________________ Independent, not-for-profit, User suppose I have an Input file having Header,Detail and Trailer records.

An example may be similar to this using the correct device names for your case OPERATOR-CONSOLE IS OUT-OP2 in special-names with DISPLAY "RUN ERROR - NO DETAIL RECORDS, ABORTING" UPON OUT-OP2 DISPLAY ' ' DISPLAY 'TOTAL RECORDS FETCHED: ' TOT-FET-CTR IF TOT-FET-CTR > 0 AND NOT UPDATE-CMS DISPLAY 'MOVING 1 TO RC' MOVE 1 TO RETURN-CODE. Is there a reason why similar or the same musical instruments would develop? I'm running a batch COBOL/DB2 program.

Ile Cobol Programmer's Guide

GOBACK. here I'm running a batch COBOL/DB2 program. How To Set Return Code In Jcl DISPLAY ' ' DISPLAY 'TOTAL RECORDS FETCHED: ' TOT-FET-CTR IF TOT-FET-CTR > 0 AND NOT UPDATE-CMS DISPLAY 'MOVING 1 TO RC' MOVE 1 TO RETURN-CODE. Ilboabn0 In Cobol more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed

Register now while it's still free! http://1pxcare.com/return-code/ach-return-code-03.html MOVE 4 TO RETURN-CODE. DISPLAY ' ' DISPLAY 'PROGRAM WVCB900 ENDING: ' DB2-TIMESTAMP OF DCLCMSTPGLL. GOBACK. 900-EXIT. Cee3abd

  1. SQL and lots of other statements assume that Register 15 is a general putpose register to use so the best solution is to move the return-code value to a working storage
  2. Finally, really old programs might have code in them to generate abends.
  3. For details, see: http://publib.boulder.ibm.com/infocenter/zvm/v6r2/index.jsp?topic=%2Fcom.ibm.zos.r12.ceea300%2Fcee3abd.htm http://publib.boulder.ibm.com/infocenter/zvm/v5r4/index.jsp?topic=/com.ibm.zos.r9.ceea400/ceea4150320.htm share|improve this answer edited Jan 31 '14 at 21:49 answered Sep 10 '13 at 21:52 Abacus 1,0011017 add a comment| up vote 0 down vote One

Browse other questions tagged cobol mainframe jcl or ask your own question. We have a need to set a non-zero RETURN-CODE under a certain situation. When I run the above code, the 'IF' statement logic to set the return code is true, the DISPLAY message is displayed, but the STEP returns a zero return code (even http://1pxcare.com/return-code/return-code-157.html All rights reserved.Unauthorized reproduction or linking forbidden without expressed written permission.

Here is the final paragraph... 900-EOJ. If any subroutine changes this value, RETURN-CODE will equal reg15. Anyone have any ideas what is going on? "I'm encountering a strange situation which I hope someone can clarify.

Close Reply To This Thread Posting in the Tek-Tips forums is a member-only feature.

Why would DB2 be modifying the special COBOL register RETURN-CODE? GOBACK. 900-EXIT. Cause The RETURN-CODE at the moment of the GOBACK or STOP RUN is simply register 15. EXIT.

Why would DB2 be modifying the special COBOL register RETURN-CODE? RE: Set JCL cond code from within COBOL program 3gm (Programmer) 10 May 05 22:34 I believe you can move the value you wish to set to the RETURN-CODE special register MOVE 4 TO RETURN-CODE. http://1pxcare.com/return-code/return-code-28.html When the main COBOL program terminates, and control returns to the operating system, the special register content is returned to the operating system as a user return code.

EXIT. When I run the above code, the 'IF' statement logic to set the return code is true, the DISPLAY message is displayed, but the STEP returns a zero return code (even Why would DB2 be modifying the special COBOL register RETURN-CODE? DISPLAY ' ' DISPLAY 'TOTAL RECORDS FETCHED: ' TOT-FET-CTR EXEC SQL SET :DCLCMSTPGLL.DB2-TIMESTAMP = CURRENT TIMESTAMP END-EXEC IF TOT-FET-CTR > 0 AND NOT UPDATE-CMS DISPLAY 'MOVING 1 TO RC' MOVE 1

Hacker used picture upload to get PHP code into my site How does changing metrics help to find solutions to a partial differential equation? I appreciate it. After changing around some things, I found out if I move the setting of the return code after the SQL statement, the return code is properly set for the STEP. 900-EOJ. Most teams will already have an accepted way to deliberately abend a program for a 'logic' reason.