Quantcast
Channel: Visual COBOL
Viewing all articles
Browse latest Browse all 5819

Forum Post: RE: String handling; carriage return line feed (new line); 0d0a

$
0
0
The Esc characters \n, \r and \r\n are specific to C# and do not mean anything to COBOL. In COBOL you can use hex constants to define these characters for example X"0D" for carriage return and X"0A" for line feed. Here is an example that works in COBOL: working-storage section. 78 CR value X"0D". 01 myfield pic x(10). procedure division. declare s1 = "test" & CR declare s2 = s1::Replace(CR, type System.Environment::NewLine) move s2 to myfield display myfield

Viewing all articles
Browse latest Browse all 5819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>