***** PS TO KSDS CLUSTER (WRITE) ***** IDENTIFICATION DIVISION. PROGRAM-ID. MEM3. ...
***** PS TO KSDS CLUSTER (WRITE) *****
IDENTIFICATION DIVISION.
PROGRAM-ID. MEM3.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT PSFILE ASSIGN TO DD1.
SELECT KSDSFILE ASSIGN TO DD2
ORGANIZATION IS INDEXED
RECORD KEY IS KS-EC
FILE STATUS IS FS1.
DATA DIVISION.
FILE SECTION.
FD PSFILE.
01 PSREC.
02 PS-EC PIC 9(4).
02 PS-EN PIC X(4).
02 FILLER PIC X(72).
FD KSDSFILE.
01 KSDSREC.
02 KS-EC PIC 9(4).
02 KS-EN PIC X(4).
02 FILLER PIC X(72).
WORKING-STORAGE SECTION.
77 FS1 PIC X(2).
PROCEDURE DIVISION.
OPEN INPUT PSFILE.
OPEN OUTPUT KSDSFILE.
PERFORM READ-PARA.
READ-PARA.
READ PSFILE AT END CLOSE PSFILE, KSDSFILE
STOP RUN.
MOVE PSREC TO KSDSREC.
WRITE KSDSREC.
DISPLAY KSDSREC.
GO TO READ-PARA. File Program's in COBOL:
- PS TO RRDS CLUSTER (WRITING)
- PS TO KSDS CLUSTER (WRITE)
- RUNJCL TO RRDS (WRITE)
- RUNJCL TO RRDS (WRITE)
- RUNJCL TO KSDS CLUSTER(WRITE)
- FETCH A RECORD BY USING RANDOM IN RRDS CLUSTER
- FETCH A RECORD BY USING RANDOM IN KSDS CLUSTER
- FETCHING RECORDS BY USING DYNAMIC IN RRDS CLUSTER
- FETCH RECORDS BY USIING DYNAMIC IN KSDS CLUSTER
- INSERT A RECORD IN RRDS CLUSTER
- INSERT A RECORD IN KSDS CLUSTER
- REWRITE A RECORD IN RRDS CLUSTER
- REWRITE A RECORD IN KSDS CLUSTER
- DELETE A RECORD IN RRDS CLUSTER
2 comments
Hi,
How about addidng a logic to keep a check on duplicate records?
What happens when I try to sum a record, whose alternate key fields contain zero or space, null. Is the index created?
Post a Comment