Regarding the CRLF, my expectation would be that it would strip just the LF characters, leaving the CR characters intact. And according to my updated test program below (run on A-Shell/Linux 5.1.1182.5), it does:
MAP1 FLD'VAL,S,20,"12"+chr(13)+chr(10)+"34"+chr(13)+chr(10)+"56"
MAP1 LF,S,1,chr(10)
? "FLD'VAL before [";FLD'VAL;"] (len="+len(FLD'VAL);")"
XCALL XSTRIP,FLD'VAL,LF,1
?
? "After: [";FLD'VAL;"] (len=";len(FLD'VAL);")"
END
.run xstrip2a
FLD'VAL before [12
34
56] (len=10)
56] (len= 8 )
The "After" display looks weird, because the isolated CR characters are causing it to be overwritten, leaving only the last part of it visible. But the length confirms that 2 characters were removed. If you want to remove both the CR and LF, then just change the LF variable to:
MAP1 LF,S,2,CHR(13)+CHR(10)
Judging from the fact that the behavior doesn't seem to have changed (for me on this program) between 5.1.1182 and 6.0.1244, my guess is that it should be ok in your 1215 version. (Other variations of XSTRIP I cannot vouch for and would recommend updating to the new "stable" 6.0).
But none of that explains why putting a tilde in front of your LF string somehow worked better.
Regarding XFOLD, let me start another topic so as to not violate the "one topic per topic" rule...