Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : All available storage is assigned to the job or jobstep, If REGION is coded 0K or 0M

Google
 
Web mainframegurukul.com

ABENDED S000 U4038

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> COBOL
  View previous topic :: View next topic  
Author Message
Gurugars
Active Member


Joined: 23 Oct 2010
Posts: 106
Location: Chennai,India.

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri Dec 03, 2010 5:50 pm    Post subject: ABENDED S000 U4038 Reply with quote

Hi dear friends,

i'm running a simple cobol program and i'm getting the abend

ABENDED S000 U4038..

but still getting the output correctly... can any one please tell me the reason..


my coding is


IDENTIFICATION DIVISION.
PROGRAM-ID. GURUARR.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-MAR.
05 WS-MARK PIC 99 OCCURS 5.
77 WS-SUM PIC 999 VALUE ZEROS.
77 WS-SUB PIC 9 VALUE ZERO.
PROCEDURE DIVISION.
0000-MAIN-PARA.
PERFORM VARYING WS-SUB FROM 1 BY 1 UNTIL WS-SUB > 5
ACCEPT WS-MARK(WS-SUB)
END-PERFORM.
PERFORM VARYING WS-SUB FROM 1 BY 1
UNTIL WS-SUB > 5
DISPLAY WS-MARK(WS-SUB)
COMPUTE WS-SUM = WS-SUM +(WS-MARK(WS-SUB)) END-PERFORM.
IF (WS-SUM / 5) > 35
DISPLAY 'PASS'
ELSE
DISPLAY 'FAIL'
GOBACK.


i'm having error due to that highlighted line i guess.. please help me to know the thing..


the output for the inputs(64,88,23,43,92)



********************************* TOP OF DATA **********************************
64
88
23
43
92
PASS
IGZ0037S The flow of control in program GURUARR proceeded beyond the last line o
From compile unit GURUARR at entry point GURUARR at compile unit offset
at address 17A78196.
_________________
Guru:-)

You're never fully dressed without a smile Smile
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.

Krishna
Site Admin


Joined: 27 Jan 2006
Posts: 1051

Answer was approved by Question owner.
Useful Post
1 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri Dec 03, 2010 6:15 pm    Post subject: Reply with quote

Do you have STOP RUN after IF condition in your program?
Back to top
View user's profile Send private message Send e-mail
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Gurugars
Active Member


Joined: 23 Oct 2010
Posts: 106
Location: Chennai,India.

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri Dec 03, 2010 6:29 pm    Post subject: Reply with quote

just now saw that and corrcted the thing yaar.. thanks for the reply krishna..
_________________
Guru:-)

You're never fully dressed without a smile Smile
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Anuj Dhawan
Moderator


Joined: 09 Aug 2008
Posts: 1631
Location: Mumbai, India

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon Dec 06, 2010 2:46 pm    Post subject: Reply with quote

Well, this is 21st century - how would STOP RUN make a difference compared to GOBACK, from the prespective of this thread, I wonder!

You are missing a "end-scope terminator" in your IF construct - you've the following choices:

1. Use specifically END-IF or
2. A period (.) after the word "FAIL" in your code.

Pick up one of the choices above, use GOBACK and tell us what happens?
_________________
Regards,
Anuj
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Krishna
Site Admin


Joined: 27 Jan 2006
Posts: 1051

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon Dec 06, 2010 6:19 pm    Post subject: Reply with quote

He has GO BACK in the ELSE part. It won't work for first IF condition part. ( Pass )

without modifing the original code.. just add STOP RUN (or) GO BACK will make the code work.
Back to top
View user's profile Send private message Send e-mail
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Anuj Dhawan
Moderator


Joined: 09 Aug 2008
Posts: 1631
Location: Mumbai, India

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Dec 07, 2010 1:00 pm    Post subject: Reply with quote

This code
Code:
 IDENTIFICATION DIVISION.                                         
 PROGRAM-ID. GURUARR.                                             
 DATA DIVISION.                                                   
*                                                                 
 WORKING-STORAGE SECTION.                                         
   01 WS-MAR.                                                     
   05 WS-MARK PIC 99 OCCURS 5.                                   
   77 WS-SUM PIC 999 VALUE ZEROS.                                 
   77 WS-SUB PIC 9 VALUE ZERO.                                   
*                                                                 
 PROCEDURE DIVISION.                                             
   0000-MAIN-PARA.                                               
       PERFORM VARYING WS-SUB FROM 1 BY 1 UNTIL WS-SUB > 5       
       ACCEPT WS-MARK(WS-SUB)                                     
       END-PERFORM.                                               
       PERFORM VARYING WS-SUB FROM 1 BY 1                         
                              UNTIL WS-SUB > 5                   
          DISPLAY WS-MARK(WS-SUB)                                 
          COMPUTE WS-SUM = WS-SUM +(WS-MARK(WS-SUB)) END-PERFORM. 
        IF (WS-SUM / 5) > 35   
           DISPLAY 'PASS'     
        ELSE                   
           DISPLAY 'FAIL'     
        END-IF                 
        GOBACK.               
*       STOP RUN.
and this JCL:
Code:
//STEP001 EXEC PGM=TEMP     
//SYSIN    DD *             
64                           
88                           
23                           
43                           
92                           
//*                         
//SYSOUT DD SYSOUT=*         
//*                         
gives this:
Code:
   Display  Filter  View  Print  Options  Help                                 
 -------------------------------------------------------------------------------
 SDSF OUTPUT DISPLAY ZTEMPCMN JOB18909  DSID   102 LINE 0       COLUMNS 02- 81 
 COMMAND INPUT ===>                                            SCROLL ===> CSR 
********************************* TOP OF DATA **********************************
64                                                                             
88                                                                             
23                                                                             
43                                                                             
92                                                                             
PASS                                                                           
******************************** BOTTOM OF DATA ********************************
Please note - STOP RUN is commented out in the code posted above.
_________________
Regards,
Anuj


Last edited by Anuj Dhawan on Tue Dec 07, 2010 2:57 pm; edited 1 time in total
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Anuj Dhawan
Moderator


Joined: 09 Aug 2008
Posts: 1631
Location: Mumbai, India

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Dec 07, 2010 2:54 pm    Post subject: Reply with quote

On ther other hand if you change the IF construct of the code as:
Code:
         DISPLAY'WS-SUM: 'WS-SUM
        IF (WS-SUM / 5) > 35     
           DISPLAY 'PASS'       
        ELSE                     
           DISPLAY 'FAIL'       
*       END-IF                   
*       GOBACK.                 
        STOP RUN.
note, END-IF and GOBACK are commented out, then with the JCL:
Code:
//STEP001 EXEC PGM=TEMP   
//SYSIN    DD *           
64                       
88                       
23                       
43                       
92                       
//*                       
//SYSOUT DD SYSOUT=*     
//*                       
You get:
Code:
   Display  Filter  View  Print  Options  Help                                 
 -------------------------------------------------------------------------------
 SDSF OUTPUT DISPLAY ZTEMPCMN JOB26364  DSID   102 LINE 0       COLUMNS 02- 81 
 COMMAND INPUT ===>                                            SCROLL ===> CSR 
********************************* TOP OF DATA **********************************
64                                                                             
88                                                                             
23                                                                             
43                                                                             
92                                                                             
WS-SUM: 310                                                                     
PASS                                                                           
IGZ0037S The flow of control in program GURUARR proceeded beyond the last line o
         From compile unit GURUARR at entry point GURUARR at compile unit offset
         at address 43F01150.                                                   
<> LEAID ENTERED (LEVEL 04/01/2008 AT 12.32)                                   
<> LEAID PROCESSING COMPLETE. RC=0                                             
******************************** BOTTOM OF DATA ********************************

_________________
Regards,
Anuj
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Krishna
Site Admin


Joined: 27 Jan 2006
Posts: 1051

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Tue Dec 07, 2010 4:40 pm    Post subject: Reply with quote

Anuj - We both are on the same page. Just suggestions are different.
Back to top
View user's profile Send private message Send e-mail
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Anuj Dhawan
Moderator


Joined: 09 Aug 2008
Posts: 1631
Location: Mumbai, India

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Dec 08, 2010 1:45 pm    Post subject: Reply with quote

Hi Krishna,

I'd like to believe that that we are...

have a good one, Smile
_________________
Regards,
Anuj
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Gurugars
Active Member


Joined: 23 Oct 2010
Posts: 106
Location: Chennai,India.

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Dec 08, 2010 11:10 pm    Post subject: Reply with quote

Hi krishna and anuj,

thank u so much for your valuable suggestions.


Guru:-)
_________________
Guru:-)

You're never fully dressed without a smile Smile
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Anuj Dhawan
Moderator


Joined: 09 Aug 2008
Posts: 1631
Location: Mumbai, India

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Dec 09, 2010 12:36 pm    Post subject: Reply with quote

You're welcome. Smile
_________________
Regards,
Anuj
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
academyindia4
Guest





Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Mon Feb 01, 2016 1:22 am    Post subject: Topic deleted by Admin Reply with quote

<< Content deleted By Admin >>
Back to top
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
academyindia4
Guest





Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Feb 03, 2016 12:38 am    Post subject: Topic deleted by Admin Reply with quote

<< Content deleted By Admin >>
Back to top
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> COBOL All times are GMT + 5 Hours
Page 1 of 1



 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts Getting no of records in a file 13 Rajapriyaa 14580 Wed Feb 03, 2016 12:44 am
academyindia4 View latest post
No new posts Replacing characters Using JCL 7 rachitsethcse 13827 Wed Feb 03, 2016 12:41 am
academyindia4 View latest post
No new posts Getting Error while using ICEMAN tool 6 giri211 13153 Wed Feb 03, 2016 12:40 am
academyindia4 View latest post
No new posts Calling COBOL from C - getting SOC1 2 balajiiinx 9049 Mon Feb 01, 2016 1:26 am
academyindia4 View latest post
No new posts Easytrieve program for getting Recound counts. 1 prakash.subramaniam 7197 Mon Oct 05, 2009 5:09 pm
Natarajan View latest post
 


Cobol Tutorial
This cobol tutorial covers most of the important topics like STRING, UNSTRING, COMP, COMP-3.....
DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. Explains in simple language. Some Chapters are locked, Forum members have free access to these chapters
CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming...
JCL Tutorial
This is most popular JCL tutorial from mainframegurukul. It does contain important jcl ....
SORT Tutorial
This Tutorial covers all important aspects of DFSORT. Has more SORT examples
INTERVIEW Questions
This page covers important interview questions
Mainframe Jobs
Mainframe Jobs posted by members of mainframegurukul forum
FaceBook Page
MainframeGurukul FaceBook Page
LinkedIn Page
MainframeGurkul Linkedin Page

This widget requires Flash Player 9 or better







Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials || Mainframe CICS tutorial|| Mainframe COBOL Tutorial

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB

mainframetopic-5491.html