Page 1 of 1

ABEND U4038 reason 0

PostPosted: Mon Sep 20, 2010 7:59 pm
by GUI1504
hello guys, i've got these abend, can someone help me?

COBOL
000001        IDENTIFICATION DIVISION.       
000002        PROGRAM-ID. ELSEIF.           
000003       *                               
000004        ENVIRONMENT DIVISION.         
000005       *                               
000006       *CONFIGURATION SECTION.         
000007       *    SPECIAL NAMES.             
000008       *    DECIMAL-POINT IS COMMA.   
000009       *                               
000010        DATA DIVISION.                 
000011       *                               
000012        WORKING-STORAGE SECTION.       
000013        77 WS-VAR1 PIC 9(4) VALUE 1357.
000014        77 WS-VAR2 PIC 9(4) VALUE 0864.
000015        77 WS-RES1 PIC 9(8).           
000016        77 WS-RES2 PIC S9(2)V99.       
000017        77 WS-RESF PIC S9(8)V9(3).     
000018        77 WS-RESE PIC +Z(8),Z(3).     
000019       *                               
000020        PROCEDURE DIVISION.                               
000021        CONTA-1.                                         
000022            IF WS-VAR1 GREATER THAN WS-VAR2               
000023               COMPUTE WS-RES1 = (WS-VAR1 + WS-VAR2) * 3 
000024            ELSE                                         
000025               COMPUTE WS-RES1 = (WS-VAR1 - WS-VAR2) * 3.
000026       *                                                 
000027        CONTA-2.                                         
000028            IF WS-VAR2 LESS THAN WS-VAR1                 
000029               COMPUTE WS-RES2 = (WS-VAR2 - WS-VAR1) / 3 
000030            ELSE                                         
000031               COMPUTE WS-RES2 = (WS-VAR2 + WS-VAR1) / 3.
000032       *                                                 
000033        CONTA-FINAL.                                     
000034            IF WS-RES1 GREATER THAN WS-RES2               
000035               COMPUTE WS-RESF = (WS-RES1 * WS-RES2) * 6 
000036            ELSE                                         
000037               COMPUTE WS-RESF = (WS-RES2 / WS-RES1) * 6.
000038       *                                                 
000039            MOVE WS-RESF TO WS-RESE.                     
000040            DISPLAY WS-RESE.


SYSOUT
-    2571,784                                                                   
IGZ0037S The flow of control in program ELSEIF proceeded beyond the last line of  the program.
From compile unit ELSEIF at entry point ELSEIF at compile unit offset +00000516 at entry offset +00000516 at address 118AD516.                                                     


JESYSMSG
IEF472I GUI1504C GO STEP1 - COMPLETION CODE - SYSTEM=000 USER=4038 REASON=00000000


Thank you!

Re: ABEND U4038 reason 0

PostPosted: Mon Sep 20, 2010 8:20 pm
by Robert Sample
IGZ0037S The flow of control in program ELSEIF proceeded beyond the last line of the program.
From compile unit ELSEIF at entry point ELSEIF at compile unit offset +00000516 at entry offset +00000516 at address 118AD516.
This is very specific as to what your problem is. COBOL requires a terminator verb (STOP RUN, EXIT PROGRAM or GOBACK) and if none of these are present, you get the IGZ0037S abend.

Re: ABEND U4038 reason 0

PostPosted: Mon Sep 20, 2010 10:03 pm
by GUI1504
@Robert Sample

Thank you!