VSAM FILES WITH COBOL PROGRAMS ***** PS TO RRDS CLUSTER (WRITING) ***** IDENTIFICATION DIVISION. ...
VSAM FILES WITH COBOL PROGRAMS
***** PS TO RRDS CLUSTER (WRITING) *****
IDENTIFICATION DIVISION.
PROGRAM-ID. MEM3.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT PSFILE ASSIGN TO DD1.
SELECT RRDSFILE ASSIGN TO DD2
ORGANIZATION IS RELATIVE
RELATIVE KEY IS WS-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 RRDSFILE.
01 RRDSREC.
02 RS-EC PIC 9(4).
02 RS-EN PIC X(4).
02 FILLER PIC X(72).
WORKING-STORAGE SECTION.
01 WS-DATA.
02 WS-EC PIC 9(4).
02 WS-EN PIC X(4).
77 FS1 PIC X(2).
PROCEDURE DIVISION.
OPEN INPUT PSFILE.
OPEN OUTPUT RRDSFILE.
PERFORM READ-PARA.
READ-PARA.
READ PSFILE AT END CLOSE PSFILE, RRDSFILE
MOVE PSREC TO RRDSREC.
WRITE RRDSREC.
DISPLAY RRDSREC.
GO TO READ-PARA.
STOP RUN.
File Program's in COBOL:
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
No comments
Post a Comment