Codes i have written :
TYPE-1 -
Result - Here when run in CHGMAN, it shouws account ACTIVATED but when run through JCL, o/p file is empty
IDENTIFICATION DIVISION.
PROGRAM-ID. FBAIDJCL.
AUTHOR. SUCHETA.
INSTALLATION. PACIFIC BELL.
DATE-WRITTEN. JUNE 19,2014.
DATE-COMPILED.
*************************************************************
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-370.
OBJECT-COMPUTER. IBM-370.
SPECIAL-NAMES.
*************************************************************
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT INPUT-FILE ASSIGN TO IFILE.
SELECT TABLE-FILE ASSIGN TO TFILE.
SELECT OUTPUT-FILE ASSIGN TO OFILE.
**********************************************************************
DATA DIVISION.
FILE SECTION.
FD INPUT-FILE.
01 INPUT-RECD.
05 BAID-NAME PIC X(04).
88 BVALUE VALUE "BAID".
05 FILLER PIC X(02).
05 BAID-NUMBER PIC X(12).
05 FILLER PIC X(42).
05 ORDER-NUMBER PIC X(08).
05 FILLER PIC X(12).
FD TABLE-FILE.
01 WS-TABLE-REC.
02 ORDERN PIC X(8).
02 FILLER PIC X(72).
FD OUTPUT-FILE.
01 WS-OUTPUT-REC.
02 BAID PIC X(12).
02 FILLER PIC X(5).
02 ORDERNUMBER PIC X(8).
02 FILLER PIC X(55).
WORKING-STORAGE SECTION.
01 WS-CFILE1-EOF-SW1 PIC X(01) VALUE 'N'.
88 WS-CFILE1-EOF1 VALUE 'Y'.
01 WS-END-OF-FILE-SW PIC X(01) VALUE 'N'.
88 WS-END-OF-FILE VALUE 'Y'.
****************************************************************
PROCEDURE DIVISION.
1000-MAIN-PARA.
PERFORM IFILE5.
PERFORM RINPTF THRU INNERF UNTIL WS-CFILE1-EOF1.
PERFORM CFILE.
STOP RUN.
2000-PROCESS-PARA.
IFILE5.
OPEN INPUT INPUT-FILE.
OPEN OUTPUT OUTPUT-FILE.
CFILE.
CLOSE INPUT-FILE.
CLOSE OUTPUT-FILE.
RINPTF.
READ INPUT-FILE
AT END MOVE 'Y' TO WS-CFILE1-EOF-SW1.
RTFILE.
READ TABLE-FILE
AT END MOVE 'Y' TO WS-END-OF-FILE-SW.
INNERF.
IF BVALUE
OPEN INPUT TABLE-FILE
PERFORM UNTIL WS-END-OF-FILE
READ TABLE-FILE AT END
MOVE 'Y' TO WS-END-OF-FILE-SW
IF ORDER-NUMBER = ORDERN
MOVE BAID-NUMBER TO BAID
MOVE ORDER-NUMBER TO ORDERNUMBER
WRITE WS-OUTPUT-REC
END-IF
END-READ
END-PERFORM
CLOSE TABLE-FILE
END-IF.
PROGRAM-ID. FBAIDJCL.
AUTHOR. SUCHETA.
INSTALLATION. PACIFIC BELL.
DATE-WRITTEN. JUNE 19,2014.
DATE-COMPILED.
*************************************************************
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-370.
OBJECT-COMPUTER. IBM-370.
SPECIAL-NAMES.
*************************************************************
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT INPUT-FILE ASSIGN TO IFILE.
SELECT TABLE-FILE ASSIGN TO TFILE.
SELECT OUTPUT-FILE ASSIGN TO OFILE.
**********************************************************************
DATA DIVISION.
FILE SECTION.
FD INPUT-FILE.
01 INPUT-RECD.
05 BAID-NAME PIC X(04).
88 BVALUE VALUE "BAID".
05 FILLER PIC X(02).
05 BAID-NUMBER PIC X(12).
05 FILLER PIC X(42).
05 ORDER-NUMBER PIC X(08).
05 FILLER PIC X(12).
FD TABLE-FILE.
01 WS-TABLE-REC.
02 ORDERN PIC X(8).
02 FILLER PIC X(72).
FD OUTPUT-FILE.
01 WS-OUTPUT-REC.
02 BAID PIC X(12).
02 FILLER PIC X(5).
02 ORDERNUMBER PIC X(8).
02 FILLER PIC X(55).
WORKING-STORAGE SECTION.
01 WS-CFILE1-EOF-SW1 PIC X(01) VALUE 'N'.
88 WS-CFILE1-EOF1 VALUE 'Y'.
01 WS-END-OF-FILE-SW PIC X(01) VALUE 'N'.
88 WS-END-OF-FILE VALUE 'Y'.
****************************************************************
PROCEDURE DIVISION.
1000-MAIN-PARA.
PERFORM IFILE5.
PERFORM RINPTF THRU INNERF UNTIL WS-CFILE1-EOF1.
PERFORM CFILE.
STOP RUN.
2000-PROCESS-PARA.
IFILE5.
OPEN INPUT INPUT-FILE.
OPEN OUTPUT OUTPUT-FILE.
CFILE.
CLOSE INPUT-FILE.
CLOSE OUTPUT-FILE.
RINPTF.
READ INPUT-FILE
AT END MOVE 'Y' TO WS-CFILE1-EOF-SW1.
RTFILE.
READ TABLE-FILE
AT END MOVE 'Y' TO WS-END-OF-FILE-SW.
INNERF.
IF BVALUE
OPEN INPUT TABLE-FILE
PERFORM UNTIL WS-END-OF-FILE
READ TABLE-FILE AT END
MOVE 'Y' TO WS-END-OF-FILE-SW
IF ORDER-NUMBER = ORDERN
MOVE BAID-NUMBER TO BAID
MOVE ORDER-NUMBER TO ORDERNUMBER
WRITE WS-OUTPUT-REC
END-IF
END-READ
END-PERFORM
CLOSE TABLE-FILE
END-IF.
TYPE-2
This code also got Activated but no real o/p required we get.
IDENTIFICATION DIVISION.
PROGRAM-ID. FBAIDJCL.
AUTHOR. SUCHETA.
INSTALLATION. PACIFIC BELL.
DATE-WRITTEN. JUNE 19,2014.
DATE-COMPILED. 06/25/14.
*********************************************************
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-370.
OBJECT-COMPUTER. IBM-370.
SPECIAL-NAMES.
*********************************************************
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT INPUT-FILE ASSIGN TO IFILE.
SELECT TABLE-FILE ASSIGN TO TFILE.
SELECT OUTPUT-FILE ASSIGN TO OFILE.
***************************************************************
DATA DIVISION.
FILE SECTION.
FD INPUT-FILE.
01 INPUT-RECD.
05 BAID-NAME PIC X(04).
88 BVALUE VALUE "BAID".
05 FILLER PIC X(02).
05 BAID-NUMBER PIC X(12).
05 FILLER PIC X(42).
05 ORDER-NUMBER PIC X(08).
05 FILLER PIC X(12).
FD TABLE-FILE.
01 WS-TABLE-REC.
02 ORDERN PIC X(8).
02 FILLER PIC X(72).
01 WS-OUTPUT-REC.
02 BAID PIC X(12).
02 FILLER PIC X(5).
02 ORDERNUMBER PIC X(8).
02 FILLER PIC X(55).
WORKING-STORAGE SECTION.
01 WS-CFILE1-EOF-SW1 PIC X(01) VALUE 'N'.
88 WS-CFILE1-EOF1 VALUE 'Y'.
01 WS-CFILE2-EOF-SW2 PIC X(01) VALUE 'N'.
88 WS-CFILE2-EOF2 VALUE 'Y'.
01 WS-END-OF-FILE-SW PIC X(01) VALUE 'N'.
88 WS-END-OF-FILE VALUE 'Y'.
****************************************************************
PROCEDURE DIVISION.
MAIN-PARA.
PERFORM IFILE.
PERFORM RFILE.
PERFORM PROCESS-INPUT-FILE UNTIL WS-CFILE1-EOF1.
PERFORM CFILE.
STOP RUN.
PROCESS-PARA.
IFILE.
OPEN INPUT INPUT-FILE.
OPEN INPUT TABLE-FILE.
OPEN OUTPUT OUTPUT-FILE.
RFILE.
READ INPUT-FILE
AT END MOVE 'Y' TO WS-CFILE1-EOF-SW1.
CFILE.
CLOSE INPUT-FILE.
CLOSE TABLE-FILE.
CLOSE OUTPUT-FILE.
READT.
READ TABLE-FILE
AT END MOVE 'Y' TO WS-CFILE2-EOF-SW2.
INNERF.
PERFORM READT
IF ORDER-NUMBER=ORDERN
MOVE BAID-NUMBER TO BAID
MOVE ORDER-NUMBER TO ORDERNUMBER
WRITE WS-OUTPUT-REC
ELSE
NEXT SENTENCE.
PROCESS-INPUT-FILE.
IF BVALUE
PERFORM INNERF
END-IF.
PERFORM RFILE.
PROGRAM-ID. FBAIDJCL.
AUTHOR. SUCHETA.
INSTALLATION. PACIFIC BELL.
DATE-WRITTEN. JUNE 19,2014.
DATE-COMPILED. 06/25/14.
*********************************************************
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-370.
OBJECT-COMPUTER. IBM-370.
SPECIAL-NAMES.
*********************************************************
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT INPUT-FILE ASSIGN TO IFILE.
SELECT TABLE-FILE ASSIGN TO TFILE.
SELECT OUTPUT-FILE ASSIGN TO OFILE.
***************************************************************
DATA DIVISION.
FILE SECTION.
FD INPUT-FILE.
01 INPUT-RECD.
05 BAID-NAME PIC X(04).
88 BVALUE VALUE "BAID".
05 FILLER PIC X(02).
05 BAID-NUMBER PIC X(12).
05 FILLER PIC X(42).
05 ORDER-NUMBER PIC X(08).
05 FILLER PIC X(12).
FD TABLE-FILE.
01 WS-TABLE-REC.
02 ORDERN PIC X(8).
02 FILLER PIC X(72).
01 WS-OUTPUT-REC.
02 BAID PIC X(12).
02 FILLER PIC X(5).
02 ORDERNUMBER PIC X(8).
02 FILLER PIC X(55).
WORKING-STORAGE SECTION.
01 WS-CFILE1-EOF-SW1 PIC X(01) VALUE 'N'.
88 WS-CFILE1-EOF1 VALUE 'Y'.
01 WS-CFILE2-EOF-SW2 PIC X(01) VALUE 'N'.
88 WS-CFILE2-EOF2 VALUE 'Y'.
01 WS-END-OF-FILE-SW PIC X(01) VALUE 'N'.
88 WS-END-OF-FILE VALUE 'Y'.
****************************************************************
PROCEDURE DIVISION.
MAIN-PARA.
PERFORM IFILE.
PERFORM RFILE.
PERFORM PROCESS-INPUT-FILE UNTIL WS-CFILE1-EOF1.
PERFORM CFILE.
STOP RUN.
PROCESS-PARA.
IFILE.
OPEN INPUT INPUT-FILE.
OPEN INPUT TABLE-FILE.
OPEN OUTPUT OUTPUT-FILE.
RFILE.
READ INPUT-FILE
AT END MOVE 'Y' TO WS-CFILE1-EOF-SW1.
CFILE.
CLOSE INPUT-FILE.
CLOSE TABLE-FILE.
CLOSE OUTPUT-FILE.
READT.
READ TABLE-FILE
AT END MOVE 'Y' TO WS-CFILE2-EOF-SW2.
INNERF.
PERFORM READT
IF ORDER-NUMBER=ORDERN
MOVE BAID-NUMBER TO BAID
MOVE ORDER-NUMBER TO ORDERNUMBER
WRITE WS-OUTPUT-REC
ELSE
NEXT SENTENCE.
PROCESS-INPUT-FILE.
IF BVALUE
PERFORM INNERF
END-IF.
PERFORM RFILE.
TYPE - 3
IDENTIFICATION DIVISION.
PROGRAM-ID. FBAIDJCL.
AUTHOR. SUCHETA.
INSTALLATION. PACIFIC BELL.
DATE-WRITTEN. JUNE 19,2014.
DATE-COMPILED. 06/26/14.
********************************************************
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-370.
OBJECT-COMPUTER. IBM-370.
SPECIAL-NAMES.
********************************************************
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT INPUT-FILE ASSIGN TO IFILE.
SELECT TABLE-FILE ASSIGN TO TFILE.
SELECT OUTPUT-FILE ASSIGN TO OFILE.
**************************************************************
DATA DIVISION.
FILE SECTION.
FD INPUT-FILE.
01 INPUT-RECD.
05 BAID-NAME PIC X(04).
88 BVALUE VALUE "BAID".
05 FILLER PIC X(02).
05 BAID-NUMBER PIC X(12).
05 FILLER PIC X(42).
05 ORDER-NUMBER PIC X(08).
05 FILLER PIC X(12).
FD TABLE-FILE.
01 WS-TABLE-REC.
02 ORDERN PIC X(8).
02 FILLER PIC X(72).
FD OUTPUT-FILE.
01 WS-OUTPUT-REC.
02 BAID PIC X(12).
02 FILLER PIC X(5).
02 ORDERNUMBER PIC X(8).
02 FILLER PIC X(55).
WORKING-STORAGE SECTION.
01 WS-CFILE1-EOF-SW1 PIC X(01) VALUE 'N'.
88 WS-CFILE1-EOF1 VALUE 'Y'.
01 WS-END-OF-FILE-SW PIC X(01) VALUE 'N'.
88 WS-END-OF-FILE VALUE 'Y'.
******************************************************************
PROCEDURE DIVISION.
1000-MAIN-PARA.
PERFORM IFILE.
PERFORM RINPTF THRU INNERF UNTIL WS-CFILE1-EOF1.
PERFORM CFILE.
STOP RUN.
2000-PROCESS-PARA.
IFILE.
OPEN INPUT INPUT-FILE.
OPEN INPUT TABLE-FILE.
OPEN OUTPUT OUTPUT-FILE.
CFILE.
CLOSE INPUT-FILE.
CLOSE TABLE-FILE.
CLOSE OUTPUT-FILE.
RINPTF.
READ INPUT-FILE
AT END MOVE 'Y' TO WS-CFILE1-EOF-SW1.
RTFILE.
READ TABLE-FILE
AT END MOVE 'Y' TO WS-END-OF-FILE-SW.
INNERF.
IF BVALUE
PERFORM RTFILE UNTIL WS-END-OF-FILE
IF ORDER-NUMBER = ORDERN
MOVE BAID-NUMBER TO BAID
MOVE ORDER-NUMBER TO ORDERNUMBER
WRITE WS-OUTPUT-REC
END-IF
END-PERFORM.
END-IF.
PERFORM RINPTF.
PROGRAM-ID. FBAIDJCL.
AUTHOR. SUCHETA.
INSTALLATION. PACIFIC BELL.
DATE-WRITTEN. JUNE 19,2014.
DATE-COMPILED. 06/26/14.
********************************************************
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-370.
OBJECT-COMPUTER. IBM-370.
SPECIAL-NAMES.
********************************************************
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT INPUT-FILE ASSIGN TO IFILE.
SELECT TABLE-FILE ASSIGN TO TFILE.
SELECT OUTPUT-FILE ASSIGN TO OFILE.
**************************************************************
DATA DIVISION.
FILE SECTION.
FD INPUT-FILE.
01 INPUT-RECD.
05 BAID-NAME PIC X(04).
88 BVALUE VALUE "BAID".
05 FILLER PIC X(02).
05 BAID-NUMBER PIC X(12).
05 FILLER PIC X(42).
05 ORDER-NUMBER PIC X(08).
05 FILLER PIC X(12).
FD TABLE-FILE.
01 WS-TABLE-REC.
02 ORDERN PIC X(8).
02 FILLER PIC X(72).
FD OUTPUT-FILE.
01 WS-OUTPUT-REC.
02 BAID PIC X(12).
02 FILLER PIC X(5).
02 ORDERNUMBER PIC X(8).
02 FILLER PIC X(55).
WORKING-STORAGE SECTION.
01 WS-CFILE1-EOF-SW1 PIC X(01) VALUE 'N'.
88 WS-CFILE1-EOF1 VALUE 'Y'.
01 WS-END-OF-FILE-SW PIC X(01) VALUE 'N'.
88 WS-END-OF-FILE VALUE 'Y'.
******************************************************************
PROCEDURE DIVISION.
1000-MAIN-PARA.
PERFORM IFILE.
PERFORM RINPTF THRU INNERF UNTIL WS-CFILE1-EOF1.
PERFORM CFILE.
STOP RUN.
2000-PROCESS-PARA.
IFILE.
OPEN INPUT INPUT-FILE.
OPEN INPUT TABLE-FILE.
OPEN OUTPUT OUTPUT-FILE.
CFILE.
CLOSE INPUT-FILE.
CLOSE TABLE-FILE.
CLOSE OUTPUT-FILE.
RINPTF.
READ INPUT-FILE
AT END MOVE 'Y' TO WS-CFILE1-EOF-SW1.
RTFILE.
READ TABLE-FILE
AT END MOVE 'Y' TO WS-END-OF-FILE-SW.
INNERF.
IF BVALUE
PERFORM RTFILE UNTIL WS-END-OF-FILE
IF ORDER-NUMBER = ORDERN
MOVE BAID-NUMBER TO BAID
MOVE ORDER-NUMBER TO ORDERNUMBER
WRITE WS-OUTPUT-REC
END-IF
END-PERFORM.
END-IF.
PERFORM RINPTF.
Errors-P.S -
[1] THE EXPLICIT SCOPE TERMINATOR "END-PERFORM" WAS FOUND WITHOUT A MATCHING VERB. THE SCOPE TERMINATOR WAS DISCARDED.
[2] THE EXPLICIT SCOPE TERMINATOR "END-IF" WAS FOUND WITHOUT A MATCHING VERB. THE SCOPE TERMINATOR WAS DISCARDED.
Guys i tried to debug the type -3 code/ above one..but removing period '.' ...all the permutations combinations possible..its still ain't working.
Please Please Help IMPROVISE any of the types cobol code asoon as possible