Carriage return in long string
search cancel

Carriage return in long string

book

Article ID: 204586

calendar_today

Updated On:

Products

OPS/MVS Event Management & Automation

Issue/Introduction

Is it possible in OPS/REXX to add a carriage return (new line) in long strings?

 

Environment

OPS/MVS

Resolution

Suggested including the EBCDIC NL (new line) character (x'15') after each line. Sample code:

 

nl = x2c('15')
line = 'first line' || nl
line = line || 'second line' || nl
line = line || 'third line ' || nl
cmd = 'echo "'line'" >> /u/users/userid/test.txt '
address USS
"USSCMD COMMAND('"cmd"')"

 

Resulting file:

 

BROWSE /u/users/userid/test.txt
********************************* Top of Data **
first line
second line
third line

******************************** Bottom of Data