FALSE

Page Nav

HIDE

Grid

GRID_STYLE

PS to RRDS Cluster -Writing Records

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.  

No comments