[Migrated content. Thread originally posted on 26 January 2012]
We use C$REDIRECT with Handler-Type-Pre set to true so that the Handler Program does what it is going to do, then Extend will do what it does. Most of the time this works fine, but, when I process a Write statement on a Line Sequential file, I get an error 44 which means that the record size has changed.For a Sequential File, my Handler program does nothing. The following is the first line of code in my handler program:
IF HANDLER-ORGANIZATION-SEQUENTIAL
GOBACK.
I suspect it has something to do with the fact that the Extend runtime (8.1.2.1) adds a carriage return and line feed to the end of each record in Line Sequential files, thus making an 80 character record actually have 82 characters. And somehow, just by entering the C$REDIRECT Handler program, something happens to make Extend think the record size has changed.
A Binary Sequential file works just fine, as do Vision files.
Any ideas greatly appreciated!
