PRABHATH Warnings : 1 New User
Joined: 08 Jun 2006 Posts: 28 Location: hyderabad
|
|
|
|
Hi i m new to COBOL and trying out with FILE HANDLING...I am not able to compile this pgm and not able to understand the proper reason for error...
I m pasting both my cobol pgm and the compile JCL i m using...also the error i m getting with this..can anyone please let me know the mistake i m doin here...
Code: |
IDENTIFICATION DIVISION.
PROGRAM-ID. SEQF.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT SEQFILE ASSIGN TO DD1
ORGANIZATION IS SEQUENTIAL.
DATA DIVISION.
FILE SECTION.
FD SEQFILE.
01 SEQREC.
02 EMPNO PIC X(6).
02 EMPNAME PIC X(15).
02 DESG PIC X(10).
02 AGE PIC 99.
02 DEPT PIC X(8).
02 FILLER PIC X(39).
WORKING-STORAGE SECTION.
01 EOF PIC X.
PROCEDURE DIVISION.
MAIN-PARA.
OPEN OUTPUT SEQFILE.
PERFORM ACCPARA 3 TIMES.
PERFORM CLOSEPARA.
ACCPARA.
ACCEPT EMPNO.
ACCEPT EMPNAME.
ACCEPT DESG.
ACCEPT AGE.
ACCEPT DEPT.
WRITE SEQREC.
CLOSEPARA.
CLOSE SEQFILE.
MOVE ZEROS TO RETURN-CODE.
STOP RUN.
|
Compile JCL:
Code: |
//*
/*JOBPARM L=999,SYSAFF=(Z05A)
//COMPILE EXEC PGM=IGYCRCTL,
// PARM='LIB,NOADV,APOST,DYNAM,NOFDUMP,RENT,RES,NOAWO',
// REGION=600K
//STEPLIB DD DSN=SYS1.COB2COMP,DISP=SHR
//*
//SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT2 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT5 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT6 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSUT7 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//*
//SYSIN DD DSN=TOSGPG.COBOL.PGM(SEQF),DISP=SHR
//SYSLIN DD DSN=&&SYSLIN,
// DISP=(,PASS),
// UNIT=SYSDA,SPACE=(CYL,(1,1)),
// DCB=BLKSIZE=3200
//SYSPRINT DD SYSOUT=*
//**********************************************************************
//* LINKEDIT *
//**********************************************************************
//LINK EXEC PGM=HEWL,
// PARM='XREF,AMODE=24,RMODE=24',
// COND=(5,LT)
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD SPACE=(CYL,(1,1)),UNIT=SYSDA
//SYSLIN DD DSN=&&SYSLIN,DISP=(OLD,DELETE)
//*
//SYSLIB DD DSN=SYS1.COB2LIB,DISP=SHR
//SYSLMOD DD DSN=TOSGPG.COBOL.LOAD(SEQF),DISP=SHR
//SYSIN DD DUMMY
|
here are the errors:
10 IGYGR1232-S No "SELECT" statement was specified for file "SEQFILE".The file definition was discarded.
22 IGYPS2052-S An error was found in the definition of file "SEQFILE".
The reference to this file was discarded.
Same message on line: 33
31 IGYPS2053-S An error was found in the definition of file "SEQFILE".
This input/output statement was discarded.
34 IGYSC0136-E Program "CBLPGM02" required an "END PROGRAM" statement at "END PROGRAM" statement at this point in the program. An "END PROGRAM" statement was assumed.
34 IGYSC0136-E Program "CBLPGM01" required an "END PROGRAM" statement at "END PROGRAM" statement at this point in the program. An "END PROGRAM"
Please let me know the problem for this...
statement was assumed. |
|