Re: append a string to another

From: JJ (jj_at_nospam.com)
Date: 12/21/04

  • Next message: YukonMama: "Re: Email from JCL with attachment"
    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


  • Next message: YukonMama: "Re: Email from JCL with attachment"

    Relevant Pages

    • append a string to another
      ... I am a Cobol newby, trying to write a first program which reads in a ... line by line and concatenates the lines to one big string. ... string thelongstring delimited by size ... that cobol appends In-Data at the very end of thelongstring, ...
      (comp.lang.cobol)
    • Re: append a string to another
      ... > I am a Cobol newby, trying to write a first program which reads in a ... line by line and concatenates the lines to one big string. ... > string thelongstring delimited by size ... > that cobol appends In-Data at the very end of thelongstring, ...
      (comp.lang.cobol)
    • Re: append a string to another
      ... > I am a Cobol newby, trying to write a first program which reads in a ... line by line and concatenates the lines to one big string. ... > string thelongstring delimited by size ... > Tobias Neubert ...
      (comp.lang.cobol)
    • Re: append a string to another
      ... line by line and concatenates the lines to one big string. ... > string thelongstring delimited by size ... You probably want to "delimit by spaces" so you only get the non-space ... I'm not sure if you can concatenate a string back into ...
      (comp.lang.cobol)