Re: append a string to another
From: JJ (jj_at_nospam.com)
Date: 12/21/04
- Previous message: Richard: "Re: Email from JCL with attachment"
- In reply to: Tobias Neubert: "append a string to another"
- Next in thread: Chuck Stevens: "Re: append a string to another"
- Reply: Chuck Stevens: "Re: append a string to another"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 20 Dec 2004 21:01:54 -0500
As others have said, find the last non-space of the strings, then use the
STRING verb with reference modifiers denoting the content length of each
variable.
This is a case where it sure would be nice to have a DELIMITED BY TRAILING
SPACES clause, such as:
string thelongstring, in-data delimited by trailing spaces .....
(don't try this - it doesn't exist - I'm just suggesting that it would be
nice to have)
"Tobias Neubert" <t1@s-neubert.net> wrote in message
news:ea2fae75.0412200727.c44265f@posting.google.com...
> Hi,
>
> I am a Cobol newby, trying to write a first program which reads in a
> textfile, line by line and concatenates the lines to one big string. I
> do the following:
>
> ------------
> string thelongstring delimited by size
> In-Data delimited by size
> into thelongstring
> ---------------
>
> thelongstring is 32000 bytes long, In-Data is 80 bytes long. It seems
> that cobol appends In-Data at the very end of thelongstring, that is
> after the last space at position 32000.
>
> Please tell me how it is possible to solve my problem.
>
> Thanks and Kind Regards,
> Tobias Neubert
- Previous message: Richard: "Re: Email from JCL with attachment"
- In reply to: Tobias Neubert: "append a string to another"
- Next in thread: Chuck Stevens: "Re: append a string to another"
- Reply: Chuck Stevens: "Re: append a string to another"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|