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
 

 

Abend S000 U4038

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

New User


Joined: 12 Jun 2010
Posts: 31
Location: India

PostPosted: Tue Oct 12, 2010 12:58 pm    Post subject: Abend S000 U4038
Reply with quote

Code:
IDENTIFICATION DIVISION.
PROGRAM-ID. STU.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
    SELECT STU-DETAIL1 ASSIGN TO FLAT1.
    SELECT STU-DETAIL2 ASSIGN TO FLAT2.
    SELECT STU-DETAIL0 ASSIGN TO FLAT3.
DATA DIVISION.
FILE SECTION.
FD  STU-DETAIL1.
01  STU-DETAIL1-REC.
    05  NAME                     PIC X(10).
    05  ROLLNO                   PIC 9(4).
    05  DEPT                     PIC X(4).
    05  FILLER                   PIC X(62).
FD  STU-DETAIL2.
01  STU-DETAIL2-REC.
    05  NAME2                    PIC X(10).
    05  ROLLNO2                  PIC 9(4).
    05  VEHNO                    PIC X(2).
    05  FILLER                   PIC X(64).
FD  STU-DETAIL0.
01  STU-DETAIL0-REC.
    05  NAME0                    PIC X(10).
    05  ROLLNO0                  PIC 9(4).
    05  DEPT0                    PIC X(4).
    05  VEHNO0                   PIC X(2).
    05  FILLER                   PIC X(60).
PROCEDURE DIVISION.
0000-MAIN-PARA.
     PERFORM 1000-INITIALIZATION.
     PERFORM 2000-PROCESS.
      PERFORM 3000-CLOSE.
      PERFORM 9999-EXIT.
 1000-INITIALIZATION.
      OPEN INPUT STU-DETAIL1.
      OPEN INPUT STU-DETAIL2.
      OPEN OUTPUT STU-DETAIL0.
 2000-PROCESS.
      READ STU-DETAIL1
      READ STU-DETAIL2
      IF ROLLNO = ROLLNO2
      MOVE NAME TO NAME0
      MOVE ROLLNO TO ROLLNO0
      MOVE DEPT TO DEPT0
      MOVE VEHNO TO VEHNO0
      WRITE STU-DETAIL0-REC.
      END-IF.
 3000-CLOSE.
      CLOSE STU-DETAIL1.
      CLOSE STU-DETAIL2.
      CLOSE STU-DETAIL0.
 9999-EXIT.
      STOP RUN.

I am using the above cobol code, but getting an abend saying
Code:
********************************* TOP OF DATA **********************************
IGZ0035S There was an unsuccessful OPEN or CLOSE of file FLAT1 in program STU at
         FILE STATUS nor an ERROR declarative were specified. The status code wa
         From compile unit STU at entry point STU at compile unit offset +000004
         address 1CD009BE.
******************************** BOTTOM OF DATA ********************************
Back to top
View user's profile Send private message

Joel.B

New User


Joined: 13 Oct 2007
Posts: 5
Location: India

PostPosted: Tue Oct 12, 2010 1:02 pm    Post subject: Reply to: Abend S000 U4038
Reply with quote

Check to make sure there is a ddname defined for the indicated file.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2429
Location: Netherlands, Amstelveen

PostPosted: Tue Oct 12, 2010 1:16 pm    Post subject:
Reply with quote

http://ibmmainframes.com/viewtopic.php?t=51649&start=15

Already mentioned in your previous post : you are not fit for IT.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7996
Location: Bellevue, IA

PostPosted: Tue Oct 12, 2010 4:09 pm    Post subject:
Reply with quote

There is a manual link at the top of the page. Click on it, find the COBOL Language Reference manual, and read it -- cover to cover -- then go back and rewrite your program to include file status clauses for every file. Then put code in to actually look at the file status codes when you do an open, read, write, or anything else with a file.
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 962
Location: Richmond, Virginia

PostPosted: Tue Oct 12, 2010 5:15 pm    Post subject:
Reply with quote

You seem to be attempting to write/learn COBOL and JCL on the fly.

Seriously - my rec is that you take an actual class (or 2 (or 3 ...)) with a human instructor.

Your errors above (both posts) are very elemental. Linking the file name in COBOL to the dataset in the JCL is covered early in any intro class.

This may be too complicated to learn otherwise.

Good luck.
Back to top
View user's profile Send private message
ankoo

New User


Joined: 12 Jun 2010
Posts: 31
Location: India

PostPosted: Wed Oct 13, 2010 10:54 am    Post subject:
Reply with quote

I used File Status in the cobol code like this
Code:
SELECT STU-DETAIL1 ASSIGN TO FLAT1
       STATUS IS FS1.
SELECT STU-DETAIL2 ASSIGN TO FLAT2
       STATUS IS FS2.
SELECT STU-DETAIL0 ASSIGN TO FLAT3
       STATUS IS FS3.

Now after the runjcl MaxCC=0 is coming, but after using the LABEL RECORDS as below MAXCC=12 is coming
Code:
FD  STU-DETAIL1.
    LABEL RECORDS ARE STANDARD
--1----+----2----+----3----+----4----+----5----+
    LABEL RECORDS ARE STANDARD
    RECORDING MODE IS F
    BLOCK CONTAINS 0 RECORDS.
01  STU-DETAIL1-REC.
    05  NAME                     PIC X(10).
    05  ROLLNO                   PIC 9(4).
    05  DEPT                     PIC X(4).
    05  FILLER                   PIC X(62).
FD  STU-DETAIL2.
    LABEL RECORDS ARE STANDARD
    RECORDING MODE IS F
    BLOCK CONTAINS 0 RECORDS.
01  STU-DETAIL2-REC.
    05  NAME2                    PIC X(10).
    05  ROLLNO2                  PIC 9(4).
    05  VEHNO                    PIC X(2).


and the messsage in spool is
Code:
15  IGYDS1089-S   "LABEL" was invalid.  Scanning was resumed at the next are was resumed at the next area "A" item, level-number, or the start of the next clause.
Back to top
View user's profile Send private message
ankoo

New User


Joined: 12 Jun 2010
Posts: 31
Location: India

PostPosted: Wed Oct 13, 2010 11:02 am    Post subject:
Reply with quote

And look who's new to the post of GOD "PeterHolland!!!!"
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 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
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


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