IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

re-write in sequential file


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Feb 15, 2007 12:20 am
Reply with quote

swathi.a wrote:
Code:
           IF BASIC-PAY1 > 5000 AND BASIC-PAY1 IS <= 15000 
               IF HOUSE-ALLOW1 = HOUSE-ALLOW2 AND     
                 CONVEY-ALLOW1 = CONVEY-ALLOW2     
                   MOVE TRANS-FILE TO EMP-FILE         
                   RE-WRITE EMP-FILE           
               ELSE                                 
                  MOVE TRANS-FILE TO EMP-FILE         
                  MOVE CONVEY-ALLOW2 TO CONVEY-ALLOW   
                  MOVE HOUSE-ALLOW2 TO HOUSE-ALLOW     
                  RE-WRITE EMP-FILE                       
           END-IF                                 
Kinda looks like you are rewriting in either case from the same "trans-file", which came from where? the emp-file?
Back to top
View user's profile Send private message
swathi.a
Warnings : 1

New User


Joined: 05 Feb 2007
Posts: 10
Location: hyd

PostPosted: Thu Feb 15, 2007 11:33 am
Reply with quote

William Thompson wrote:
swathi.a wrote:
Code:
           IF BASIC-PAY1 > 5000 AND BASIC-PAY1 IS <= 15000 
               IF HOUSE-ALLOW1 = HOUSE-ALLOW2 AND     
                 CONVEY-ALLOW1 = CONVEY-ALLOW2     
                   MOVE TRANS-FILE TO EMP-FILE         
                   RE-WRITE EMP-FILE           
               ELSE                                 
                  MOVE TRANS-FILE TO EMP-FILE         
                  MOVE CONVEY-ALLOW2 TO CONVEY-ALLOW   
                  MOVE HOUSE-ALLOW2 TO HOUSE-ALLOW     
                  RE-WRITE EMP-FILE                       
           END-IF                                 
Kinda looks like you are rewriting in either case from the same "trans-file", which came from where? the emp-file?



if the conditions specified are satisfied it rewrites from trans-file to emp file...
if the house allow & convey allow conditions are not satisfied, it writes from trans-file to emp-file with corrected house allow & convey-allow..
Back to top
View user's profile Send private message
h.dinesh

New User


Joined: 06 Dec 2006
Posts: 46
Location: Chennai

PostPosted: Thu Feb 15, 2007 1:12 pm
Reply with quote

Swati,

Did you check if any of these 'DISPLAY' worked? Just to check if there is any problem with the logic or not.

Code:
       ELSE                                     
         DISPLAY "INVALID BASIC PAY "             
        END-IF                                   
      ELSE                                       
       DISPLAY "INVALID DESG CODE "               
      END-IF                                     
     ELSE                                           
      DISPLAY "INVALID EMPLOYEE NUMBER " EMP-NUMBER1
     END-IF.


Also check the variables used

CONVEY-ALLOW &
HOUSE-ALLOW

before second rewrite are correct.

Dinesh
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top