> It's often more complicated than that, because of the current > expression size limit. I usually have to create a cursor loop, and build > the long string that will be written to the next line of the file.
Point taken. UNLOAD AS FORMATTED would solve your problem (although I occasionally run up against the expression length limit in other situations too). > My fantasy UNLOAD ... AS FORMATTED would also have an LRECL > keyword, to automatically right-fill with spaces (CHAR(32)) to a certain > logical record length, and a NOCRLF keyword, to not use carriage- > return line feed at the end of a record, but continue immediately at the > next byte with the next record. That could also help allow embedded > CRLF's within the data to be loaded into a mainframe system without > corrupting the data, or requiring character substitutions at both ends. > > After all, we want R:Base to prove itself against "the big boys," don't > we? We do, but to be honest the changes you suggest above would be better handled by using XML as the file transfer format. Of course, that only works if you can get the other end of the file transfer operation to use XML also. But data with embedded newline characters is probably crying out for XML treatment. -- Larry

