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?

Answer Posted / ram.g

hi

Before writing into the output file, just explicitly give
move spaces to rest of fields..
eg: ww-filler pic x(40) value spaces.
move ww-filler to ww-out-rec(61:40)
write ww-out-rec.

i hope the above code will resovle your problem.

Happy coding,
Ram.G

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this

968


how to move the records from file to array table. give with code example

2189


what is difference between cobol and cobol/400

21493


How did the release of cobol/370 version 1.3 improve the performance of release 1.1?

616


What is redefines clause in COBOL?

815






What rules are followed by the search verb.

618


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

647


Write a cobol program making use of the redefine clause.

701


How do get the result of your program directly on your pc?

1849


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

711


i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc

2072


Have you used comp and comp-3 in your project? And how?

1981


i want a program using by if, evaluate , string, unstring, perform, occurs?

3996


Write a program that uses move corresponding.

645


What are all the divisions of a COBOL program?

639