Hi dear friends, i'm running a simple cobol program

This is a Mainframe COBOL forum - you can post your queries on Mainframe COBOL, VS COBOL II, COBOL/370 , Enterprise COBOL

Moderators: dbzTHEdinosauer, Moderator Group

Post Reply
raghu497
Member
Posts: 1
Joined: Mon Jun 02, 2014 8:27 am

Hi dear friends, i'm running a simple cobol program

Post by raghu497 » Mon Jun 02, 2014 8:37 am

i got S000 U4038
this is my code.
ID DIVISION.
PROGRAM-ID. READFILE.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT IN-PUT ASSIGN TO OUTDD
ORGANIZATION IS SEQUENTIAL
ACCESS MODE IS SEQUENTIAL.
DATA DIVISION.
FILE SECTION.
FD IN-PUT.
01 STU-REC.
05 SID PIC 9(2) VALUE 11.
05 NAME PIC X(10) VALUE 'RAGHU'.
05 FILLER PIC X(68).
WORKING-STORAGE SECTION.
01 WS-EOF PIC X(3) VALUE 'NO'.
PROCEDURE DIVISION.
PERFORM OPEN-PARA.
PERFORM PROCESS-PARA UNTIL WS-EOF ='
PERFORM CLOSE-PARA.
OPEN-PARA.
OPEN INPUT IN-PUT.
PROCESS-PARA.
READ IN-PUT
AT END
MOVE 'YES' TO WS-EOF
NOT AT END
DISPLAY STU-REC
END-READ.
CLOSE-PARA.
CLOSE IN-PUT.
STOP RUN.

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Mon Jun 02, 2014 11:26 am

There is more information in your output than you have shown.

Once you locate that information, it should make it easier.

dhiraj
Member
Posts: 48
Joined: Tue May 06, 2014 11:22 am

Post by dhiraj » Mon Jun 02, 2014 3:48 pm

Not clear with your discription what you have given. please paste complete Abend details. BTW may be this is something(S000 U4038) improper open-close error.
Thanks,
--Dhiraj Mishra

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Tue Jun 03, 2014 1:43 pm

Is this a typo:
PERFORM PROCESS-PARA UNTIL WS-EOF ='
?
Regards,
Anuj

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Thu Jun 05, 2014 12:53 pm

You should use the code tags when posting code, data etc. This will preserve spacing and make the code easier to read.

On coding style: why do you give an input file a DDname of OUTDD? This is confusing - especially to anyone reading the JCL.

If you DID retype the whole program note that it is easier and more accurate to cut and paste and provide the error messages. I am not going to look up the error code as I am on holiday and do not have manuals to hand and do not have time to look up on the internet.
Regards
Nic

Post Reply

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



Other References
Mainframe Tools and others