|
From: Fred M. <fr...@mo...> - 2005-07-09 20:39:00
|
David Essex wrote: > > Carlos Gomes wrote: > > > In the test program above, the second display (results of String verb > > using DELIMITED BY SPACES) generate a strange output. DEMILITED BY > > SPACES in the fourth string causes a truncation in the first string > > (by default DEMILITED BY SIZE). > > DISPLAY 3, including DELIMITED BY SIZE explicity in the first string, > > generates the expected output. > > If I understand you correctly, the second display is generating this output, > > 2-INSERT,999,12345); > > and should be generating this output, > > 2-INSERT INTO TEST ,999,12345); > > correct ? > > I've looked at the COBOL 1989 (draft) standard, and I think TC is > generating the correct output '2-INSERT,999,12345);', for the following > reasons. > > The figurative constant SPACES (literal) is equivalent to " " (single > space). > Thus the phrase 'DELIMITED BY SPACES' is equivalent to > 'DELIMITED BY " "'. > And the literal 'INSERT INTO TEST ' gets truncated to 'INSERT'. David, you are correct. I cannot read the original message from Carlos Gomes because of the message format but I often used DELIMITED BY SIZE or DELIMITED BY " " (two space characters between quotes). The latter works just fine in COBOL in case intermediate spaces are present in a sending field. -- Fred Mobach - fr...@mo... - pos...@mo... Systemhouse Mobach bv - The Netherlands - since 1976 website : http://fred.mobach.nl Q: servos ad pileum vocare ? A: servos fenestrae ad pileum rubrem vocare ! |