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
 

 

S000 u4038 abend - Flow of control beyond last line

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging
View previous topic :: :: View next topic  
Author Message
lakshmi_ta

New User


Joined: 23 Aug 2006
Posts: 13

PostPosted: Tue Jul 31, 2007 1:15 pm    Post subject: S000 u4038 abend - Flow of control beyond last line
Reply with quote

Hi, I got s000 u4038 abend with the description, The flow of control in program MYREPPGM proceeded beyond the last line of the program. what does it mean? iam sure, there is no logical error. It is a report program with simple file definitions and very simple logic.

awaiting your reply

Lakshmi
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Jul 31, 2007 4:26 pm    Post subject:
Reply with quote

What language is the program written in?
What does it mean? just what it says, your logic allowed program flow to drop out of the bottem of the program.
The logic error may be very minor, such as a missing period or doing a go to instead of a perform.....
Back to top
View user's profile Send private message
lakshmi_ta

New User


Joined: 23 Aug 2006
Posts: 13

PostPosted: Tue Jul 31, 2007 8:55 pm    Post subject: Re: S000 u4038 abend - Flow of control beyond last line
Reply with quote

Iam writing a cobol report program.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Jul 31, 2007 11:34 pm    Post subject:
Reply with quote

Hello and welcome to the forums,

Quote:
Iam writing a cobol report program


O.K.

Look at your code and determine how you might be "falling out the bottom" - that is a common way to get the error you are seeing.

If you post the last 20 lines of code in your program, we may be able to offer suggestions. When posting your code, it is good to use the "Code" tag near the top of the reply panel. Once you have created your reply, click Preview to ensure that your post looks like you want. Then click Submit.
Back to top
View user's profile Send private message
lakshmi_ta

New User


Joined: 23 Aug 2006
Posts: 13

PostPosted: Sun Aug 05, 2007 1:37 pm    Post subject:
Reply with quote

Hi Friend,


Iam giving you the code also, pls try it out.
Code:

   PROCEDURE DIVISION.                               
     PERFORM 1000-INITIALIZATION.                   
     PERFORM 2000-PROGRAM-LOGIC.                   
     PERFORM 9000-TERMINATION.                     
*                                                   
 1000-INITIALIZATION.                               
         INITIALIZE WS-REC.                         
         OPEN INPUT IN-FILE.                       
         IF INFILE-STATUS NOT = '00'               
             DISPLAY 'ERROR IN OPENING INPUT FILE' 
             PERFORM 9000-TERMINATION               
         END-IF.                                   
         OPEN OUTPUT OUT-FILE.                     
         IF OUTFILE-STATUS NOT = '00'               
             DISPLAY 'ERROR IN OPENING OUTPUT FILE'
             PERFORM 9000-TERMINATION               
         END-IF.                                   
                                                   
        ACCEPT WS-DATE             FROM DATE.           
                                                       
  2000-PROGRAM-LOGIC.                                   
        PERFORM 2500-WRITE-HEADINGS.                   
        PERFORM 8000-READ-IN-FILE UNTIL EOF-IN.         
                                                       
  2500-WRITE-HEADINGS.                                 
       STRING WC-REPORT-DATE-LIT WS-DATE FARMERS-HEAD   
        DELIMITED BY SIZE                               
         INTO OUT-REC.                                 
       PERFORM 8500-WRITE-REC.                         
       MOVE WS-DASH TO OUT-REC.                         
       PERFORM 8500-WRITE-REC.                         
       MOVE WC-HEADING-LINE-02 TO OUT-REC.             
       PERFORM 8500-WRITE-REC.                         
       MOVE WS-DASH TO OUT-REC.                         
       PERFORM 8500-WRITE-REC.                         
       MOVE WC-HEADING-LINE-03 TO OUT-REC.             
       PERFORM 8500-WRITE-REC.                         
       MOVE 5 TO WS-REC-CNT.                           
                 
  8000-READ-IN-FILE.                       
     READ IN-FILE RECORD INTO WS-INPUT-REC
       AT END MOVE 'Y' TO WS-IN-EOF-FLAG   
     END-READ.                             
     IF INFILE-STATUS NOT = '00' AND '23' 
        DISPLAY ' END OF FILE EMP  FILE ' 
     END-IF.                               
     MOVE WS1-F-NAME TO WS-F-NAME.         
     MOVE WS1-L-NAME TO WS-L-NAME.         
     MOVE WS1-AGE    TO WS-AGE.           
     MOVE WS1-SEX    TO WS-SEX.           
     MOVE WS1-SALARY TO WS-SALARY.         
     MOVE WS-REC TO OUT-REC.               
     PERFORM 8500-WRITE-REC.               
     ADD SALARY TO WS-TOTAL-SALARY         
     END-ADD.                             
     IF SEX = 'M'                         
         ADD 1 TO WS-MALE-CNT             
         END-ADD                           
     ELSE                                 
                                 
      ADD 1 TO WS-FEMALE-CNT     
      END-ADD                   
  END-IF.                       
  ADD 1 TO WS-IN-REC-CNT         
  END-ADD.                       
  ADD 1 TO WS-REC-CNT           
  END-ADD.                       
  IF WS-REC-CNT = 50 OR EOF-IN   
      PERFORM 8700-PRINT-FOOTING
  END-IF.                       
                                                                                       
                                             
  8700-PRINT-FOOTING.                       
      MOVE ZERO TO WS-REC-CNT.               
      ADD 1 TO WS-PAGE-CNT                   
      END-ADD.                               
      MOVE WS-TOTAL-SALARY TO WS-TOT-SALARY.
      STRING WS-FOOTING-01 WS-TOT-SALARY     
             DELIMITED BY SIZE               
             INTO OUT-REC.                   
   PERFORM 8500-WRITE-REC.           
   STRING WS-FOOTING-02 WS-FEMALE-CNT
          DELIMITED BY SIZE           
          INTO OUT-REC.               
   PERFORM 8500-WRITE-REC.           
   STRING WS-FOOTING-03 WS-MALE-CNT   
           DELIMITED BY SIZE         
           INTO OUT-REC.             
   PERFORM 8500-WRITE-REC.           
   STRING WS-FOOTING-04 WS-IN-REC-CNT
           DELIMITED BY SIZE         
           INTO OUT-REC.             
   PERFORM 8500-WRITE-REC.           
   STRING WS-FOOTING-05 WS-PAGE-CNT   
          DELIMITED BY SIZE           
          INTO OUT-REC.               
   PERFORM 8500-WRITE-REC.           
   IF NOT EOF-IN                     
        PERFORM 2500-WRITE-HEADINGS   
   END-IF.                           
                                                 
 8500-WRITE-REC.                                 
      WRITE OUTPUT-REC.                           
      IF OUTFILE-STATUS NOT = '00'               
            DISPLAY ' ERROR IN WRITING RECORD '   
            PERFORM 9000-TERMINATION             
      END-IF.                                     
 9000-TERMINATION.                               
        CLOSE IN-FILE                             
              OUT-FILE.                           
 STOP-RUN.                                       
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Sun Aug 05, 2007 2:36 pm    Post subject:
Reply with quote

You might check, it looks like the STOP-RUN is a paragraph name when it should be a COBOL verb.....
And genjerally, GOBACK it the verb of choice....
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sun Aug 05, 2007 8:47 pm    Post subject:
Reply with quote

Hello,

You have misspelled STOP RUN. It has no hyphen ''-'.

You also placed it in the "A" margin making it a paragraph name and your program "fell out the bottom".

As mentioned by Bill, it is better practice to use GOBACK.
Back to top
View user's profile Send private message
lakshmi_ta

New User


Joined: 23 Aug 2006
Posts: 13

PostPosted: Tue Aug 07, 2007 1:04 pm    Post subject:
Reply with quote

Hi Thank you.
I run the program successfully.

Regards,
lakshmi
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Aug 07, 2007 6:28 pm    Post subject:
Reply with quote

You're welcome - thanks for letting us know icon_smile.gif
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 -> ABENDS & Debugging All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


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