ABENDED S000 U4038
Moderators: dbzTHEdinosauer, Moderator Group
ABENDED S000 U4038
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.
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
You're never fully dressed without a smile
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
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?
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
Anuj
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
This codeand this JCL:
gives this:
Please note - STOP RUN is commented out in the code posted above.
Code: Select all
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.
Code: Select all
//STEP001 EXEC PGM=TEMP
//SYSIN DD *
64
88
23
43
92
//*
//SYSOUT DD SYSOUT=*
//*
Code: Select all
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 ********************************
Last edited by Anuj Dhawan on Tue Dec 07, 2010 2:57 pm, edited 1 time in total.
Regards,
Anuj
Anuj
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
On ther other hand if you change the IF construct of the code as:
note, END-IF and GOBACK are commented out, then with the JCL:
You get:
Code: Select all
DISPLAY'WS-SUM: 'WS-SUM
IF (WS-SUM / 5) > 35
DISPLAY 'PASS'
ELSE
DISPLAY 'FAIL'
* END-IF
* GOBACK.
STOP RUN.
Code: Select all
//STEP001 EXEC PGM=TEMP
//SYSIN DD *
64
88
23
43
92
//*
//SYSOUT DD SYSOUT=*
//*
Code: Select all
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
Anuj
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
-
- Moderator
- Posts: 1625
- Joined: Sat Aug 09, 2008 9:02 am
- Location: Mumbai, India
FREE TUTORIALS
Tutorials
Free tutorials from mainframegurukul
- JCL Tutorial
Covers all important JCL concepts. - Cobol Tutorial
This tutorials covers all Cobol Topics from STRING to COMP-3. - DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. - SORT Tutorial
This Tutorial covers all important aspects of DFSORT with examples - CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions
- Cobol Interview Questions
50+ Interview Questions - JCL Interview Questions
50+ Interview Questions - DB2 Interview Questions
100+ Interview Questions - CICS Interview Questions
70+ Interview Questions - VSAM Interview Questions
27 Interview Questions
Other References
Mainframe Tools and others
- XPEDITER Reference
Explains how we can debug a program - FILEAID Reference
Explains how to browse , edit and delete datasets - Change Man Reference
Quick Start tutorial on Changeman - Abend Reference
Important Abend codes explained - FaceBook Page
MainframeGurukul FaceBook Page - LinkedIn Page
MainframeGurkul Linkedin Page