display 
Author Message
 display

If a sentence between brackets is to long u can use the "-" in kolom 7.
That's what I heard.
Tried it but it's not working.
But how exactly does it work.


Thu, 26 Feb 2004 20:57:59 GMT  
 display
    The rules concerning continued COBOL statements can be found in the
Programmers Language Reference Manual in the IBM Manuals tab at
www.mvshelp.com -- I'd try there.

--

....Terry


Quote:
> If a sentence between brackets is to long u can use the "-" in kolom 7.
> That's what I heard.
> Tried it but it's not working.
> But how exactly does it work.



Thu, 26 Feb 2004 23:06:35 GMT  
 display
Try:

   STRING 'first half of long string'
      'second half of long string'
   DELIMITED SIZE INTO DISPLAY-LINE.

There is never any need for a continuation line in COBOL.


Quote:
> If a sentence between brackets is to long u can use the "-" in kolom
7.
> That's what I heard.
> Tried it but it's not working.
> But how exactly does it work.



Thu, 26 Feb 2004 23:35:28 GMT  
 display

Quote:

> Try:

>    STRING 'first half of long string'
>       'second half of long string'
>    DELIMITED SIZE INTO DISPLAY-LINE.

> There is never any need for a continuation line in COBOL.

But what you would get is:
  first half of long stringsecond half of long string

(you forgot a leading or trailing space, which i'm sure
you would have caught after the first print out.  I just
point this out to be pedantic.

But this method also requires execution code to be run
each time you want the literal, where as a data definition
(continue line and all) requires none,

Yes, we have a lot of machine cycles available today,
but i'm still to stingy to waste em.

--
John Andersen
Juneau, Alaska



Thu, 26 Feb 2004 07:32:03 GMT  
 display


Quote:
> If a sentence between brackets is to long u can use the "-" in kolom 7.
> That's what I heard.
> Tried it but it's not working.
> But how exactly does it work.

I never use the continuation feature - I have long literals in working
storage where I can use level numbers to break them down.

I suspect you are missing the quote on the second line (read the following
with a fixed font):

010000  01  FILLER                      PIC X(24)       VALUE
010100                                                             'BEGIN
=COLS>
---1----+----2----+----3----+----4----+----5----+----6----+----7----+---
010110 -    ' WORKING STORAGE  '.



Fri, 27 Feb 2004 20:56:01 GMT  
 display
The hyphen in column 7 only works if the literal on the previous line
goes all the way to column 72.

--Steve



Fri, 27 Feb 2004 23:23:41 GMT  
 display

Quote:

> If a sentence between brackets is to long u can use the "-" in kolom 7.
> That's what I heard.
> Tried it but it's not working.
> But how exactly does it work.

the method is to state wehat you can on the first line. all text up to
column 72 is include, then put a '-' in column 7 and then continue the
literal with a qoute(" or ') in column 12 or later and the rest of the
string. contiune to more lines as required. don't forget the final
terminating quote.


Fri, 27 Feb 2004 23:57:06 GMT  
 display
Another solution that is introduced in the draft of the next COBOL
Standard - and that MANY implementations already support (as an extension)
is to use the "concatenation" operand, e.g.

   "ABC"
  & "DEF"

is the same as "ABCDEF"

(except in cases of "matching" for COPY/REPLACING and REPLACE statement)

The draft also provides another solution to the "continue to column 72"
(especially if that might end in some spaces), that is the following syntax:

   "ABC"-
   "DEF"

However, I don't if any implementors have already provided support for this.

--
Bill Klein
 wmklein <at> ix.netcom.com


Quote:
> > If a sentence between brackets is to long u can use the "-" in kolom 7.
> > That's what I heard.
> > Tried it but it's not working.
> > But how exactly does it work.

> the method is to state wehat you can on the first line. all text up to
> column 72 is include, then put a '-' in column 7 and then continue the
> literal with a qoute(" or ') in column 12 or later and the rest of the
> string. contiune to more lines as required. don't forget the final
> terminating quote.



Sat, 28 Feb 2004 01:15:22 GMT  
 display


Quote:

> > Try:

> >    STRING 'first half of long string'
> >       'second half of long string'
> >    DELIMITED SIZE INTO DISPLAY-LINE.

> > There is never any need for a continuation line in COBOL.

> But what you would get is:
>   first half of long stringsecond half of long string

> (you forgot a leading or trailing space, which i'm sure
> you would have caught after the first print out.  I just
> point this out to be pedantic.

I was thinking of strings like:
"12345678901234567890....."
There are no spaces.

Quote:

> But this method also requires execution code to be run
> each time you want the literal, where as a data definition
> (continue line and all) requires none,

Ah, but you can arrange things so the STRING statement is executed
only once per run.

So the wasted nanoseconds per month is a small price, in my judgement,
for avoiding continuation lines - which ALWAYS generate four or five
compiler errors until you get it just so.

An alternative - some say - is to use free-form source coding where a
line can be, oh, 256 characters long.

Quote:

> Yes, we have a lot of machine cycles available today,
> but i'm still to stingy to waste em.

Good point. I guess I'm just willing to trade more freely than you.


Sat, 28 Feb 2004 05:02:37 GMT  
 display

Quote:

>> > Try:

>> >    STRING 'first half of long string'
>> >       'second half of long string'
>> >    DELIMITED SIZE INTO DISPLAY-LINE.

>> > There is never any need for a continuation line in COBOL.

> Ah, but you can arrange things so the STRING statement is executed
> only once per run.

>> Yes, we have a lot of machine cycles available today,
>> but i'm still to stingy to waste em.

> Good point. I guess I'm just willing to trade more freely than you.

Of course there are are other options with newer compilers.
Those that allow you do define a long literal as
one or more shorter literals joined by an "&" sign:
   PIC X(120) VALUE "this literal" & " that literal" &
               " the other literal".

As far as I know AcuCobol is the only modern pc compiler that
does not accept this format.
--
John Andersen
Juneau, Alaska



Fri, 27 Feb 2004 08:15:11 GMT  
 display
Hey, where did everybody go? Well, better late than never.

I usually continue DISPLAYs like this:

01 ws-fld-1     pic 9(003) value 123.

DISPLAY 'part1 '
'part 2'
'part 3 '
ws-fld-1

This looks like: part1 part 2part 3 123
when displayed.


says...

Quote:

>The hyphen in column 7 only works if the literal on the previous line
>goes all the way to column 72.

>--Steve



Fri, 05 Mar 2004 05:55:08 GMT  
 display
See below on how to use..

    MOVE 'FILE NOT OPEN CONTACT HELP DESK IN CASE YOU
  -     'NEED HELP'   TO ERRMSG

If you observe the first line will not have ending quote and the second line
has a "-" in 7th col. You can stop first line anywhere and there is no need
to continue till 72 col.

Regds
Bhaskar Reddy.


Quote:
> If a sentence between brackets is to long u can use the "-" in kolom 7.
> That's what I heard.
> Tried it but it's not working.
> But how exactly does it work.



Sat, 06 Mar 2004 18:26:40 GMT  
 display
    You don't "have to" continue 'til col. 72, but if you don't, you'll get
a bunch of embedded blanks in ERRSMG.  :)

--

....Terry


Quote:
> See below on how to use..

>     MOVE 'FILE NOT OPEN CONTACT HELP DESK IN CASE YOU
>   -     'NEED HELP'   TO ERRMSG

> If you observe the first line will not have ending quote and the second
line
> has a "-" in 7th col. You can stop first line anywhere and there is no
need
> to continue till 72 col.

> Regds
> Bhaskar Reddy.



> > If a sentence between brackets is to long u can use the "-" in kolom 7.
> > That's what I heard.
> > Tried it but it's not working.
> > But how exactly does it work.



Sat, 06 Mar 2004 19:45:00 GMT  
 display
On Tue, 18 Sep 2001 15:56:40 +0530, "Bhaskar Reddy"

Quote:

>See below on how to use..

>    MOVE 'FILE NOT OPEN CONTACT HELP DESK IN CASE YOU
>  -     'NEED HELP'   TO ERRMSG

>If you observe the first line will not have ending quote and the second line
>has a "-" in 7th col. You can stop first line anywhere and there is no need
>to continue till 72 col.

That is true.  But it might give you a long string of spaces in the
middle of your message

     With kind Regards            |\      _,,,---,,_        
                            ZZZzz /,`.-'`'    -.  ;-;;,    
     Volker Bandke               |,4-  ) )-,_. ,\ (  `'-'  
      (BSP GmbH)                '---''(_/--'  `-'\_)        

      "Once they go up, who cares where they come down? That's not my department."  - Werner von Braun

        (Another Wisdom from my fortune cookie jar)        
______________________________________________________________________________
Posted Via Binaries.net = SPEED+RETENTION+COMPLETION = http://www.binaries.net



Sat, 06 Mar 2004 21:05:28 GMT  
 display
This *may* depend on what compiler you are using and with what compiler
options/directives.  What you say is "true" for any ANSI/ISO conforming
compiler (that has its R-margin past column 72 - which is up to the
implementor).  However, many PC and Unix compilers have a non-conforming
"mode" in which "end-of-line" character(s) are treated as if it were the
R-margin in such cases.

General "hint" - if your compiler accepts "line sequential" source code,
then this MAY be an option (even the default) behavior in your environment.

--
Bill Klein
 wmklein <at> ix.netcom.com

Quote:
>     You don't "have to" continue 'til col. 72, but if you don't, you'll
get
> a bunch of embedded blanks in ERRSMG.  :)

> --

> ....Terry



> > See below on how to use..

> >     MOVE 'FILE NOT OPEN CONTACT HELP DESK IN CASE YOU
> >   -     'NEED HELP'   TO ERRMSG

> > If you observe the first line will not have ending quote and the second
> line
> > has a "-" in 7th col. You can stop first line anywhere and there is no
> need
> > to continue till 72 col.

> > Regds
> > Bhaskar Reddy.



> > > If a sentence between brackets is to long u can use the "-" in kolom
7.
> > > That's what I heard.
> > > Tried it but it's not working.
> > > But how exactly does it work.



Sat, 06 Mar 2004 22:52:11 GMT  
 
 [ 15 post ] 

 Relevant Pages 

1. icons displayed in browses not displaying

2. Display.TransferBlock not supported by display

3. Display RGB pixel data in a display window

4. DISPLAY statement and screen displays

5. changes fixed the Histogram display but spoilt the Geometry display

6. no display name and no $DISPLAY environment variable

7. can't read env(DISPLAY) from regexp with $env(DISPLAY)

8. no display name and no $DISPLAY environment variable -- ????

9. How to change the display in the waveform graph to enable higher frequency displays.

10. VisualWave: display a PDF file

11. APL2/PC display font problem

12. APL2/PC display font problem

 

 
Powered by phpBB® Forum Software