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
 

 

getting u4038 abend

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
VinayCM

New User


Joined: 06 Nov 2007
Posts: 36
Location: Bengaluru

PostPosted: Wed Nov 14, 2007 11:28 am    Post subject: getting u4038 abend
Reply with quote

Hi,
I'm running a cobol-sort prog using IGYWCLG. I'm getting correct result.. but only last record is repeating in output file. and also getting S000 U4038 abend code. Please help me to solve this.

thanks in advance
Back to top
View user's profile Send private message

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Nov 14, 2007 11:43 am    Post subject: Reply to: getting u4038 abend
Reply with quote

Vinay,

Please post few more details displayed in the sysout. Also, check this link.

http://ibmmainframes.com/viewtopic.php?t=4431&highlight=4038
Back to top
View user's profile Send private message
VinayCM

New User


Joined: 06 Nov 2007
Posts: 36
Location: Bengaluru

PostPosted: Wed Nov 14, 2007 12:04 pm    Post subject:
Reply with quote

I had 40 recs in input file... it's writing 41 recs in output file...
The message i'm getting in CEEDUMP is-- "SORT2 was not compiled with the SYM suboption of the TEST option. A formatted variable dump cannot be produced".
and in sysout is-- "The flow of control in program SORT2 proceeded beyond the last line of the program. From compile unit SORT2 at entry point SORT2 at compile unit offset +000008BE at address 00006DFE.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Wed Nov 14, 2007 12:12 pm    Post subject: Reply to: getting u4038 abend
Reply with quote

look at the jcl log to see the original abend,
U4038 is a generic abend which comes at the end of LE abend processing
if You need more help post the relevant lined form the log
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: Wed Nov 14, 2007 8:32 pm    Post subject:
Reply with quote

Hello,

You may be getting the last record twice due to some processing after end of file. This might also cause the abend.
Back to top
View user's profile Send private message
VinayCM

New User


Joined: 06 Nov 2007
Posts: 36
Location: Bengaluru

PostPosted: Thu Nov 15, 2007 10:06 am    Post subject:
Reply with quote

dick,
You are right dick,same thing happening here... Still I'm trying..
Back to top
View user's profile Send private message
revel

Active User


Joined: 05 Apr 2005
Posts: 135
Location: Bangalore/Chennai-INDIA

PostPosted: Thu Nov 15, 2007 2:53 pm    Post subject:
Reply with quote

Hi Vinay,

May be the Loop is not correct, if you send code, we can help you

Quote:
I had 40 recs in input file... it's writing 41 recs in output file...


Any how use following logic

Code:
PROCEDURE DIVISION
0000-MAIN.
       .
        .

       OPEN INPUT INPUT-FILE
               OUTPUT OUT-FILE

      READ INPUT-FILE
      PERFORM PARA-1 UNTIL EOF
      STOP RUN

PARA-1
        WRITE OUT-REC FROM INPUT-REC
        READ INPUT-FILE AT END SET EOF TO TRUE
Back to top
View user's profile Send private message
VinayCM

New User


Joined: 06 Nov 2007
Posts: 36
Location: Bengaluru

PostPosted: Thu Nov 15, 2007 4:09 pm    Post subject:
Reply with quote

Code:

PROCEDURE DIVISION USING LS-FIELD.                   
    ACCEPT LS-FIELD.                                 
    PERFORM A00-OPEN-FILES.                           
    IF LS-FIELD = 'A'                                 
        DISPLAY 'ASCENDING ORDER SELECTED'           
        SORT SYS-FILE ON ASCENDING KEY S-TELNO       
             INPUT PROCEDURE IS A10-INPUT-PROCEDURE   
             OUTPUT PROCEDURE IS B10-OUTPUT-PROCEDURE
END-IF.                                           
IF LS-FIELD = 'D'                                 
    DISPLAY 'DESCENDING ORDER SELECTED'           
    SORT SYS-FILE ON DESCENDING KEY S-TELNO       
         INPUT PROCEDURE IS A10-INPUT-PROCEDURE   
         OUTPUT PROCEDURE IS B10-OUTPUT-PROCEDURE
END-IF.                                           
PERFORM C00-CLOSE-FILES.                         
STOP RUN.                                         
A00-OPEN-FILES.                               
    OPEN INPUT IN-FILE.                       
    OPEN OUTPUT OUT-FILE.                     
                                               
A10-INPUT-PROCEDURE.                           
    PERFORM UNTIL WS-FLAG = 'Y'               
       READ IN-FILE AT END MOVE 'Y' TO WS-FLAG
            NOT AT END MOVE IN-REC TO SYS-REC 
       END-READ                               
       RELEASE SYS-REC                         
     END-PERFORM.                       
 B10-OUTPUT-PROCEDURE.                   
     RETURN SYS-FILE                     
          AT END GO TO C00-CLOSE-FILES. 
     MOVE SYS-REC TO OUT-REC.           
     WRITE OUT-REC.                     
     GO TO B10-OUTPUT-PROCEDURE.         
C00-CLOSE-FILES.           
    CLOSE IN-FILE, OUT-FILE.


And this my comp,run jcl....
[/code]
//CKP1SA JOB '283597','VINAY',NOTIFY=&SYSUID,
// MSGCLASS=Y,PRTY=15
//STEP1 EXEC IGYWCLG,PARM.COBOL='FASTSRT'
//COBOL.SYSIN DD DSN=E1682.VINAY.COBOL(SORT2),DISP=SHR
//LKED.SYSLMOD DD DSN=E1682.VINAY.LOADLIB(SORT2),DISP=SHR
//LKED.SYSLIB DD DSN=CEE.SCEELKED,DISP=SHR
//GO.INP DD DSN=E1682.VINAY.INP,DISP=SHR
//GO.OUTP DD DSN=E1682.VINAY.OUTP,DISP=SHR
//GO.SYST DD DSN=&TEMP,DISP=(,PASS),SPACE=(TRK,(10,10),RLSE)
//GO.SYSIN DD *
A
Back to top
View user's profile Send private message
revel

Active User


Joined: 05 Apr 2005
Posts: 135
Location: Bangalore/Chennai-INDIA

PostPosted: Thu Nov 15, 2007 5:21 pm    Post subject:
Reply with quote

Vinay,

Code:
PROCEDURE DIVISION USING LS-FIELD.                   
    ACCEPT LS-FIELD.                                 
    PERFORM A00-OPEN-FILES.                           
    IF LS-FIELD = 'A'                                 
        DISPLAY 'ASCENDING ORDER SELECTED'           
        SORT SYS-FILE ON ASCENDING KEY S-TELNO       
             INPUT PROCEDURE IS A10-INPUT-PROCEDURE   
             OUTPUT PROCEDURE IS B10-OUTPUT-PROCEDURE
     END-IF.                                           
    IF LS-FIELD = 'D'                                 
      DISPLAY 'DESCENDING ORDER SELECTED'           
      SORT SYS-FILE ON DESCENDING KEY S-TELNO       
         INPUT PROCEDURE IS A10-INPUT-PROCEDURE   
         OUTPUT PROCEDURE IS B10-OUTPUT-PROCEDURE
    END-IF.                                           
    PERFORM C00-CLOSE-FILES.                     
    STOP RUN.                                         
A00-OPEN-FILES.                               
    OPEN INPUT IN-FILE.                       
    OPEN OUTPUT OUT-FILE.                     
                                               
A10-INPUT-PROCEDURE.                           
    PERFORM UNTIL WS-FLAG = 'Y'               
       READ IN-FILE AT END MOVE 'Y' TO WS-FLAG
            NOT AT END MOVE IN-REC TO SYS-REC 
       END-READ                               
       RELEASE SYS-REC                         
     END-PERFORM.                       
 B10-OUTPUT-PROCEDURE.                   
     RETURN SYS-FILE                     
          AT END GO TO C00-CLOSE-FILES. 
     MOVE SYS-REC TO OUT-REC.           
     WRITE OUT-REC.                     
     GO TO B10-OUTPUT-PROCEDURE.         
C00-CLOSE-FILES.           
    CLOSE IN-FILE, OUT-FILE.



Chnage program like this

Vinay,

Code:
    PROCEDURE DIVISION USING LS-FIELD.                   
    ACCEPT LS-FIELD.                                 
    PERFORM A00-OPEN-FILES.                           
    IF LS-FIELD = 'A'                                 
        DISPLAY 'ASCENDING ORDER SELECTED'           
        SORT SYS-FILE ON ASCENDING KEY S-TELNO       
             INPUT PROCEDURE IS A10-INPUT-PROCEDURE   
             OUTPUT PROCEDURE IS B10-OUTPUT-PROCEDURE
     END-IF.                                           
    IF LS-FIELD = 'D'                                 
      DISPLAY 'DESCENDING ORDER SELECTED'           
      SORT SYS-FILE ON DESCENDING KEY S-TELNO       
         INPUT PROCEDURE IS A10-INPUT-PROCEDURE   
         OUTPUT PROCEDURE IS B10-OUTPUT-PROCEDURE
    END-IF.                                           
    PERFORM C00-CLOSE-FILES.                       
    STOP RUN.                                         
A00-OPEN-FILES.                               
    OPEN INPUT IN-FILE.                       
    OPEN OUTPUT OUT-FILE.                     
                                               
A10-INPUT-PROCEDURE.   
       READ IN-FILE AT END MOVE 'Y' TO WS-FLAG
            NOT AT END MOVE IN-REC TO SYS-REC 
       END-READ                         
    PERFORM UNTIL WS-FLAG = 'Y'                                             
       RELEASE SYS-REC
       READ IN-FILE AT END MOVE 'Y' TO WS-FLAG
            NOT AT END MOVE IN-REC TO SYS-REC 
       END-READ                         
     END-PERFORM.   

--------------------------------------------------------------

This is why the record get repeated in output file

------------------------------------------------------------
Code:
 B10-OUTPUT-PROCEDURE.                   
     RETURN SYS-FILE                     
          AT END GO TO C00-CLOSE-FILES. 
     MOVE SYS-REC TO OUT-REC.           
     WRITE OUT-REC.                     
     GO TO B10-OUTPUT-PROCEDURE.         
C00-CLOSE-FILES.           
    CLOSE IN-FILE, OUT-FILE.



Why you are giving, its not necessary remove this code

Execute and let me know the result
Back to top
View user's profile Send private message
VinayCM

New User


Joined: 06 Nov 2007
Posts: 36
Location: Bengaluru

PostPosted: Fri Nov 16, 2007 11:05 am    Post subject:
Reply with quote

Raghu,
SYS-REC is temp file used for sorting. I need to write recs in out-file. So why i'm using B10-PARA. And i tried with your code also but i'm getting same abend.
Back to top
View user's profile Send private message
revel

Active User


Joined: 05 Apr 2005
Posts: 135
Location: Bangalore/Chennai-INDIA

PostPosted: Fri Nov 16, 2007 2:35 pm    Post subject:
Reply with quote

Hello Vinay,

Quote:
SYS-REC is temp file used for sorting. I need to write recs in out-file. So why i'm using B10-PARA


The code which you gave is a type of ADVANCED SORT,

What you doing there is

1) You are reading sequentially from INPUT-FILE then writing into the SORT-FILE using RELEASE command
2) Then you are reading record from SORT-FILE then writing into OUTPUT-FILE
( B10-PARA will do this)

Change program as i suggest below

-------------------------------------------------------------

Code:
    PROCEDURE DIVISION USING LS-FIELD.                   
    ACCEPT LS-FIELD.                                 
    PERFORM A00-OPEN-FILES.                           
    IF LS-FIELD = 'A'                                 
        DISPLAY 'ASCENDING ORDER SELECTED'           
        SORT SYS-FILE ON ASCENDING KEY S-TELNO       
             INPUT PROCEDURE IS A10-INPUT-PROCEDURE   
             OUTPUT PROCEDURE IS B10-OUTPUT-PROCEDURE
     END-IF.                                           
    IF LS-FIELD = 'D'                                 
      DISPLAY 'DESCENDING ORDER SELECTED'           
      SORT SYS-FILE ON DESCENDING KEY S-TELNO       
         INPUT PROCEDURE IS A10-INPUT-PROCEDURE   
         OUTPUT PROCEDURE IS B10-OUTPUT-PROCEDURE
    END-IF.                                           
                   
    STOP RUN.                                         
A00-OPEN-FILES.                               
    OPEN INPUT IN-FILE.                       
    OPEN OUTPUT OUT-FILE.                     
                                               
A10-INPUT-PROCEDURE.   
       READ IN-FILE AT END MOVE 'Y' TO WS-FLAG
            NOT AT END MOVE IN-REC TO SYS-REC 
       END-READ                         
    PERFORM UNTIL WS-FLAG = 'Y'                                             
       RELEASE SYS-REC
       READ IN-FILE AT END MOVE 'Y' TO WS-FLAG
            NOT AT END MOVE IN-REC TO SYS-REC 
       END-READ                         
     END-PERFORM. 
B10-OUTPUT-PROCEDURE.                   
     RETURN SYS-FILE                     
          AT END GO TO C00-CLOSE-FILES. 
     MOVE SYS-REC TO OUT-REC.           
     WRITE OUT-REC.                     
     GO TO B10-OUTPUT-PROCEDURE.         
C00-CLOSE-FILES.           
    CLOSE IN-FILE, OUT-FILE.



Execute and let me know the result
Back to top
View user's profile Send private message
VinayCM

New User


Joined: 06 Nov 2007
Posts: 36
Location: Bengaluru

PostPosted: Fri Nov 16, 2007 5:14 pm    Post subject: Reply to: getting u4038 abend
Reply with quote

Raghu,
I used the code sent by you. Now I'm getting correct result i.e last rec is not repeating but still i'm getting abend.
Back to top
View user's profile Send private message
revel

Active User


Joined: 05 Apr 2005
Posts: 135
Location: Bangalore/Chennai-INDIA

PostPosted: Fri Nov 16, 2007 5:21 pm    Post subject:
Reply with quote

Hi Vinay,

Did you removed
Code:

PERFORM C00-CLOSE-FILES.
from before STOP RUN

Go through manual first, really it will help you

Execute once again and let me know result, if it still throw error send me JCL
Back to top
View user's profile Send private message
revel

Active User


Joined: 05 Apr 2005
Posts: 135
Location: Bangalore/Chennai-INDIA

PostPosted: Fri Nov 16, 2007 5:26 pm    Post subject:
Reply with quote

Hi vinay,

Quote:
I used the code sent by you. Now I'm getting correct result i.e last rec is not repeating but still i'm getting abend.


What did u mean, You are getting result correctly but it still get abended
Back to top
View user's profile Send private message
VinayCM

New User


Joined: 06 Nov 2007
Posts: 36
Location: Bengaluru

PostPosted: Fri Nov 16, 2007 6:01 pm    Post subject:
Reply with quote

Ya i removed that also. Now i'm sending my JCL also... i think it's already in this topic....
Code:
//CKP1SA JOB '283597','VINAY',NOTIFY=&SYSUID,                     
//          MSGCLASS=Y,PRTY=15                                     
//STEP1 EXEC IGYWCLG,PARM.COBOL='FASTSRT'                         
//COBOL.SYSIN DD DSN=E1682.VINAY.PDS(SORT2),DISP=SHR               
//LKED.SYSLMOD DD DSN=E1682.VINAY.LOADLIB(SORT2),DISP=SHR         
//GO.INP DD DSN=E1682.VINAY.INP,DISP=SHR                           
//GO.OUTP DD DSN=E1682.VINAY.OUTP,DISP=SHR                         
//GO.SYST DD DSN=&TEMP,DISP=(,PASS),SPACE=(TRK,(10,10),RLSE)       
//GO.SYSIN DD *                                                   
A                                                                 
Back to top
View user's profile Send private message
VinayCM

New User


Joined: 06 Nov 2007
Posts: 36
Location: Bengaluru

PostPosted: Fri Nov 16, 2007 6:08 pm    Post subject:
Reply with quote

Quote:
What did u mean, You are getting result correctly but it still get abended
I mean I'm getting correct no of recs in output file in correct sorted order.. But still job ending with S000 U4038 abend... and in sysout i'm getting msg as...
Code:
The flow of control in program SORT2 proceeded beyond the last line of the program. From compile unit SORT2 at entry point SORT2 at compile unit offset +00000890 at address 00006E00.
END OF DFSORT



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

New User


Joined: 06 Nov 2007
Posts: 36
Location: Bengaluru

PostPosted: Thu Nov 22, 2007 4:54 pm    Post subject:
Reply with quote

Anybody got any idea(solution) for my probs.......
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
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
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm
No new posts S213-14 ABEND explantion Apurva Mehta JCL & VSAM 5 Thu Jul 07, 2016 10:56 pm
No new posts How to determine where is error in ab... jackzhang75 PL/I & Assembler 13 Fri Apr 15, 2016 2:01 am


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