Saturday, 9 February 2013

Easytrieve to copy data from file

Easytrieve to copy data from file :

//STEP020     EXEC  PGM=EZTPA00                         
//EZTVFM    DD    SPACE=(CYL,(3,3)),UNIT=SYSDA        
//SYSPRINT DD    SYSOUT=*                            
//SYSOUT    DD    SYSOUT=*                            
//INFILE       DD    *                                   
21400 SANDIP 55555                                   
//OUTFILE  DD    DSN=NA7384A.TEST.OUT1,DISP=OLD      
//SYSIN    DD    *
                                   
*                                                    
  FILE INFILE                                        
    INREC           01   80  A                       
      EID              01   05  A                       
      ENAME      07   06  A                       
      ESAL          14   05  N                       
*                                                    
  FILE OUTFILE                                       
    OUTREC       01   80  A                       
      EIDO           01   05  A                       
      ENAMEO   07   06  A                       
      ESALO       14   05  N                       
*                                                    
  JOB INPUT NULL                                     
*                                                    
  GET INFILE                                         
*                                                    
    IF EOF INFILE                                    
       DISPLAY ' END HAS REACHED '                   
    STOP                                             
    END-IF                                           
       EIDO           = EID                                
       ENAMEO   = ENAME                              
       ESALO       = ESAL + 3333                       
       PUT OUTFILE                                   

1 comment: