Trying to use STRING
- From: "razor" <iruddock@xxxxxxxxxxxxxxxx>
- Date: 14 Mar 2007 03:31:07 -0700
As an experienced COBOL programmer I am a bit embarrassed to ask this
question, but as I have never had to do something like this before I
am struggling. I need to create a CSV file. I am using STRING
statement to do this. My problem is that I am getting trailing spaces
left on my text fields and I cannot figure how to fix it. I'm sure
somebody has done this before and will show me the error of my ways.
77 WS-NAME PIC X(30).
77 WS-ADD1 PIC X(30).
77 WS-BALANCE PIC ZZZZZ9.99.
STRING QUOTE WS-NAME QUOTE ","
QUOTE WS-ADD1 QUOTE ","
WS-BALANCE ","
Gives me:
"BOB SMITH ","10 THE HIGH
STREET ", 123.45
But I want
"BOB SMITH","10 THE HIGH STREET", 123.45
or even (just out of interest really as this is not giving me a
problem)
"BOB SMITH","10 THE HIGH STREET",123.45
.
- Follow-Ups:
- Re: Trying to use STRING
- From: gary drummond
- Re: Trying to use STRING
- From: JJ
- Re: Trying to use STRING
- From: Bob Iles
- Re: Trying to use STRING
- From: Richard
- Re: Trying to use STRING
- From: Howard Brazee
- Re: Trying to use STRING
- From: Pete Dashwood
- Re: Trying to use STRING
- From: HeyBub
- Re: Trying to use STRING
- From:
- Re: Trying to use STRING
- From: Roger While
- Re: Trying to use STRING
- Prev by Date: Re: The Lambda lambada...Why embedded SQL is becoming irrelevant and why you should start looking at functional programming.
- Next by Date: Re: The Lambda lambada...Why embedded SQL is becoming irrelevant and why you should start looking at functional programming.
- Previous by thread: The Lambda lambada...Why embedded SQL is becoming irrelevant and why you should start looking at functional programming.
- Next by thread: Re: Trying to use STRING
- Index(es):