FALSE

Page Nav

HIDE

Grid

GRID_STYLE

REWRITE A RECORD IN KSDS CLUSTER

***** REWRITE A RECORD IN KSDS CLUSTER *****  IDENTIFICATION DIVISION.           PROGRAM-ID. DELR.      ...


***** REWRITE A RECORD IN KSDS CLUSTER *****

 IDENTIFICATION DIVISION.         
 PROGRAM-ID. DELR.                
 ENVIRONMENT DIVISION.            
 INPUT-OUTPUT SECTION.            
 FILE-CONTROL.                    
         SELECT IN-FILE ASSIGN TO DD1
         ORGANIZATION IS INDEXED    
         ACCESS MODE IS RANDOM      
         RECORD KEY IS ENO          
         FILE STATUS IS FS1.        
 DATA DIVISION.                   
 FILE SECTION.                    
 FD IN-FILE.                      
 01 IN-REC.                       
    05 ENO PIC 9(4).              
    05 ENAME PIC X(4).            
    05 SAL PIC 9(5).  
    05 FILLER PIC X(67).                                   
 WORKING-STORAGE SECTION.                                  
 01 FS1  PIC 9(2).                                         
 PROCEDURE DIVISION.                                        
           OPEN I-O IN-FILE.                                   
           DISPLAY "FS1: " FS1.                                
           MOVE 0003 TO ENO.                                   
           MOVE "HHHH" TO ENAME.                                
           MOVE 70000 TO SAL.                                  
           DISPLAY "FS1: " FS1.                                
           REWRITE IN-REC INVALID KEY DISPLAY "NOT DONE".      
           CLOSE IN-FILE.                                       
           STOP RUN.                                            


File Program's in COBOL:                          
  1. PS TO RRDS CLUSTER (WRITING)
  2. PS TO KSDS CLUSTER (WRITE) 
  3. RUNJCL TO RRDS (WRITE) 
  4. RUNJCL TO RRDS (WRITE) 
  5. RUNJCL TO KSDS CLUSTER(WRITE) 
  6. FETCH A RECORD BY USING RANDOM IN RRDS CLUSTER 
  7. FETCH A RECORD BY USING RANDOM IN KSDS CLUSTER
  8. FETCHING RECORDS BY USING DYNAMIC IN RRDS CLUSTER
  9. FETCH RECORDS BY USIING DYNAMIC IN KSDS CLUSTER 
  10. INSERT A RECORD IN RRDS CLUSTER
  11. INSERT A RECORD IN KSDS CLUSTER 
  12. REWRITE A RECORD IN RRDS CLUSTER 
  13. REWRITE A RECORD IN KSDS CLUSTER
  14. DELETE A RECORD IN RRDS CLUSTER   

2 comments

Anonymous said...

Can anyone help me with a cobol code for rewriting the records in the KSDS cluster with the PS records.

Rikdeb said...

listcat command in VSAM
http://mframes.blogspot.in/