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

COBOL File Status '44'


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

New User


Joined: 05 Nov 2014
Posts: 95
Location: India

PostPosted: Thu Jan 08, 2015 5:36 pm
Reply with quote

Hi
I am trying to read a Variable Length sequential file and writing into a variable length Sequential file. Both of them has the same structure with a occurs depending clause.

I have just changed one of the fields between the record from 9(5) comp-3 to 9(7) comp-3 and hence the max record length has changed from 2202 to 2203.

When I write the output file I am getting file status '44'. I think somehow I am not moving the data correctly.

The data structure is as follows:
Code:
01  A-RECORD.                                     
                                                               
    05  A-RECORD-KEY.                                         
        10  A-NUM                PIC X(03).             
        10  A-DEPT                PIC X(02).             
        10  A-CDE                PIC X(08).             
        10  A-TYPE-CDE                PIC X(02).             
        10  A-RECD-NUM                PIC 9(05)         COMP-3 *In output this is changed to 9(5) comp-3.
                                                               
    05  A-DATA-AREA.                                         
        10  A-ITM                PIC X(10).             
        10  A-SRC                PIC X(8).               
        10  AIDX                      PIC S9(4) COMP.         
    05  A-DATA-TBL.                                           
        10  A-DATA OCCURS 1 TO 120 TIMES DEPENDING ON AIDX.
            15  A-X-NUM            PIC X(10).             
            15  A-X-SRC            PIC X(8).               
                                                                 
 01  A-SHORT-REC            PIC X(56).                 



I am just moving it as follows:
Code:
MOVE OLD-AIDX              TO  NEW-AIDX           
MOVE OLD-A-NUM    TO  NEW-A-NUM.
MOVE OLD-A-DEPT    TO  NEW-A-DEPT     
MOVE OLD-A-CDE    TO  NEW-A-CDE     
MOVE OLD-A-TYPE-CDE    TO  NEW-A-TYPE-CDE     
MOVE OLD-A-RECD-NUM    TO  NEW-A-RECD-NUM     
MOVE OLD-A-DATA-AREA   TO  NEW-A-DATA-AREA   
MOVE OLD-A-DATA(OLD-AIDX) TO                   
                         NEW-A-DATA(NEW-AIDX)   
MOVE OLD-A-SHORT-REC  TO                 
                          NEW-A-SHORT-REC


WRITE NEW-A-RECORD.


But it is abending with file status '44'.

Please suggest.

Regards

Code'd
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8569
Location: Dubuque, Iowa, USA

PostPosted: Thu Jan 08, 2015 6:18 pm
Reply with quote

In case you did not read the meaning of a file status 44 in the COBOL Language Reference manual:
Quote:
| | | 4 | A boundary violation exists because an attempt was made to rewrite a |
| | | | record to a file and the record was not the same size as the record being |
| | | | replaced. Or an attempt was made to write or rewrite a record that was |
| | | | larger than the largest or smaller than the smallest record allowed by |
| | | | the RECORD IS VARYING clause of the associated file-name.
Once you read this, you will realize that absolutely nothing you posted is helpful. The issue is NOT with the MOVE statements, the problem is that you have not properly specified the record length in your DATA DIVISION.
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 Converting a file from PD to display ... SYNCSORT 4
No new posts Record count of RECFM=U tape file DFSORT/ICETOOL 17
This topic is locked: you cannot edit posts or make replies. Write Character to Hexadecimal file w... COBOL Programming 8
No new posts Checking the total counts inside a re... JCL & VSAM 5
No new posts File-aid batch how to repeat a line... Compuware & Other Tools 2
Search our Forums:

Back to Top