FALSE

Page Nav

HIDE

Grid

GRID_STYLE

FETCH A RECORD BY USING RANDOM IN RRDS CLUSTER

***** FETCH A RECORD BY USING RANDOM IN RRDS CLUSTER *****  IDENTIFICATION DIVISION.          PROGRAM-ID...


***** FETCH A RECORD BY USING RANDOM IN RRDS CLUSTER *****

 IDENTIFICATION DIVISION.        
 PROGRAM-ID. SEARCHS.            
 ENVIRONMENT DIVISION.           
 INPUT-OUTPUT SECTION.           
 FILE-CONTROL.                   
         SELECT IN-FILE ASSIGN TO DD1
        ORGANIZATION IS RELATIVE    
        ACCESS MODE IS RANDOM       
        RELATIVE KEY IS ENO1        
        FILE STATUS IS FS1.         
 DATA DIVISION.                  
 FILE SECTION.                   
 FD IN-FILE.                     
 01 IN-REC.                      
   02 ENO PIC 9(4).              
   02 ENAME PIC X(4).            
   02 SAL PIC 9(5).
   02 FILLER PIC X(67).    
WORKING-STORAGE SECTION.  
 77 FS1 PIC 9(2).          
 01 ENO2 PIC 9(4).         
 77 EOF PIC X.             
 77 REL-NO PIC 9.          
 01 IN-REC1.               
    03 ENO1 PIC 9(4).       
    03 ENAME1 PIC X(4).     
    03 SAL1 PIC 9(5).       
    03 FILLER PIC X(67).    
PROCEDURE DIVISION.       
           PERFORM OPEN-PARA.    
           PERFORM SEARCH-PARA.  
           PERFORM CLOSE-PARA.   
 OPEN-PARA.                
           OPEN INPUT IN-FILE.   
           MOVE 4 TO ENO1.       
           SEARCH-PARA.                        
           READ IN-FILE RECORD INTO IN-REC1
           IF ENO1 = ENO                   
           MOVE ENO TO ENO1                
           MOVE ENAME TO ENAME1            
           MOVE SAL TO SAL1                
           DISPLAY IN-REC1                 
           ELSE                            
           COMPUTE ENO1 = ENO1 + 1         
           GO TO SEARCH-PARA.              
 CLOSE-PARA.                         
             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   
                                      

No comments