i have a variable block which is used in my cobol program
as input file having records of 4080 after compilation
while runing the program im getiing file attribut mismatch
and it is saying tht the record length of the file is 4084
can any one knw the answer how to reslove it ?

Answers were Sorted based on User's Feedback



i have a variable block which is used in my cobol program as input file having records of 4080 aft..

Answer / ravi

For Variable length file(VB) first 4 characters are used to
store the length of each record. So if your record contains
4080 then actual length is 4080 + 4 = 4084.

So to resolve abend --- increase record length to 4084.

Is This Answer Correct ?    7 Yes 0 No

i have a variable block which is used in my cobol program as input file having records of 4080 aft..

Answer / neha

And in addition to Ravi's answer you also have to mention
file as variable while defining the file.

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More COBOL Interview Questions

What is report-item in COBOL?

0 Answers   Arigo Infotech,


What is the use of LINKAGE SECTION?

1 Answers  


How do we get current date from system with century?

2 Answers  


have in 100 records in a flat file i want to move records like 1,3,5,7,9,11,.. to Output file1 and 2,4,6,8,10,12,14 .. records moved to Output file2..Pls Provide real time answer..

5 Answers   TCS,


How do you define a variable of comp-1 and comp-2?

0 Answers  


CAN ANY ONE HELP WHAT IS QTP? why it is nessery AND WEN IT IS USED?

1 Answers  


what is S04E error in jcl?

11 Answers   IBM, L&T,


How to replace the GOTO statement in COBOL without changing the structure of program. e.g. consider following code... I.D. E.D. D.D. P.D. compute C = A + B. GOTO para 100-display. compute D = C - D. GOTO 200-display. some other logic...... ........ GOTO 300-para. ...... ...... GOTO 400-para. Now I want to replacce all GOTO statements without changing the structure and otput of program.

6 Answers   Accenture,


study the following 01 A PIC 99V0 VALUE 5 01 B PIC 9V9 VALUE 6 01 C PIC 99V9 VALUE 2.5 01 D PIC 99 VALUE 3 COMPUTE A ROUNDED B C = A+B*C/D ON SIZE ERROR PERFORM PRINT-ERROR the comments of A.B.C after execution of the above statement are a.A=10 B=0 C=10 b.A=10 B=9.9 C=9.9 c.A=10 B=0 C=9.9 d.A=10 B=6 C=10

4 Answers   TCS,


I have a source program compiled with Cobol-2. The output file has a record length of 100 defined in the program but a record of 60 bytes getting written into it. i.e. The rest of 40 bytes I am not Writing anything. But it by default puts some values into the last 40 bytes. However it does not impact anything. But when Compiled the module with Enterprise Cobol the last 40 bytes were spaces as fillers. Can anyone explain?

5 Answers   Cognizant,


What is diff between vsam and db2?what is advantage of db2 over vsam?which is best suited one?

1 Answers   Fidelity,


i have n records in one file and in this file there is some fields and i want to count that how many sharma in my file so plz give the coding that how we read sharma ?

2 Answers  


Categories