Joined: 06 Jun 2008 Posts: 8214 Location: Dubuque, Iowa, USA
There's a manuals link at the top of the page. Look up reference modification in the COBOL Language Reference. Also, if you have to post again after reading this material, please provide sample input and output records -- saying you want to move 'AAAA',I to the output tells us nothing about what you're thinking you will get for output (such as AAAA,I or AAAAI, AAAA1, AAAA01, AAAA0000000000001 -- to mention just a few).
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
Are the records lengths to be written variable or is the data only variable?
If the recfm is fb, no problem, if the recfm is vb, read on.
Whether you use reference modification orstring, you will still need to provide information so the write will know the variable length of the record to be written. Neither reference modification nor string will automatically provide length information.