Actually the records in the file are of variable length. The lrecl of the record is 24,814. And all the records length vary from 4 to 24,810. There is no fixed length record. For better clarity i am rephrasing the question i had posted: "I wanted to write blank character as it is there in input file, but after using cobol WRITE i am able to add only HIGH-VALUE/LOW-VALUE/SPACE. Is there any way I can write to output file with blank character wherever blank character is present"
You have completely ignored what I posted.
Let's start from the beginning. There is NO SUCH THING AS A BLANK CHARACTER! To repeat, you cannot write blank characters to your output file (sic) because blank characters do not exist, period. On the mainframe, the EBCDIC collating sequence is generally used, and it contains 256 characters from X'00 (also known as LOW-VALUES) to X'FF' (also known as HIGH-VALUES). Every byte of every record you write will be one of those 256 characters -- and not a one of them is a blank character.
When using ISPF to display a data set (it's not a file), and the data set is variable length, ISPF leaves the line blank once it reaches the end of that particular record. This is a convention ISPF uses so you will know where the record ends since there is no end-of-line indicator the way there is for UNIX / LINUX / Windows systems. If your program is properly coded, it will set the output record length BEFORE writing the record, and if you then use ISPF to look at that output data set you will see that no characters are displayed after the end of the record. If your program is not properly coded, it is entirely possible that you will output every record as the maximum length allowed.