FALSE

Page Nav

HIDE

Grid

GRID_STYLE

FETCHING RECORDS BY USING DYNAMIC IN RRDS CLUSTER

***** FETCHING RECORDS BY USING DYNAMIC IN RRDS CLUSTER *****  IDENTIFICATION DIVISION.         PROGRAM-...


***** FETCHING RECORDS BY USING DYNAMIC 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 DYNAMIC     
         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).                      
 77 REL-KEY 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.                
           MOVE 3 TO ENO1                  
           START IN-FILE                     
           KEY IS = ENO1                   
           INVALID KEY GO TO CLOSE-PARA.  
           PERFORM SEARCH-PARA.            
  OPEN-PARA.                            
            OPEN I-O IN-FILE.                 
   SEARCH-PARA.                              
                  READ IN-FILE NEXT RECORD INTO IN-REC1
                 AT END DISPLAY "END".                
                 IF ENO1 = ENO                        
                 MOVE IN-REC TO IN-REC1               
                 DISPLAY IN-REC1                      
                 ELSE                                 
                 DISPLAY "NOT FOUND"                  
                 GO TO SEARCH-PARA.                   
 CLOSE-PARA.                              
             CLOSE IN-FILE.                       

No comments