Page 1 of 1

Help Needed in simple display

PostPosted: Mon Jan 05, 2009 8:17 pm
by ram23bal
Hi All,

I use the following display statements

DISPLAY WS-ONE
WS-TWO
WS-THREE
WS-FOUR
WS-FIVE

This wil display as below

WS-ONE(field value) WS-TWo(field value) WS-THREE(field value) ...

WS-XXX are working storage variables.




Now I need to modify the above display by putting an IF condition for WS-THREE.

Note

I tried below

DISPLAY WS-ONE
DISPLAY WS-TWO
IF WS-logic = c
DISPLAY WS-THREE
ELSE
DISPLAY WS-DUMMY
END-IF
DISPLAY WS-FOUR
DISPLAY WS-FIVE


but the display goes to next line. How to make it display in the same line.

Re: Help Needed in simple display

PostPosted: Mon Jan 05, 2009 9:40 pm
by CICS Guy
     IF WS-logic = c
     DISPLAY  WS-ONE WS-TWO WS-THREE WS-FOUR WS-FIVE
     ELSE
     DISPLAY  WS-ONE WS-TWO WS-FOUR WS-FIVE
     END-IF

Re: Help Needed in simple display

PostPosted: Tue Jan 06, 2009 8:39 am
by ram23bal
Hi

Thanks for the reply. As per your answer display will be in two different line. I want it in same line.

Re: Help Needed in simple display

PostPosted: Tue Jan 06, 2009 9:05 am
by ram23bal
Sorry CICSguy I didnt read your reply properly. I have bulk of items to display and I dont want to repeat the display... Is there any conditional diaplays in COBOL...

Re: Help Needed in simple display

PostPosted: Tue Jan 06, 2009 9:42 am
by dick scherrer
Hello,

Is there any conditional diaplays in COBOL...
Only what CG posted.

You might consider building the display area field by field (using STRING and/or refeence modification) and only issue one DISPLAY of the area once it has been built. Each time DISPLAY is issued, a new line is created.

Re: Help Needed in simple display

PostPosted: Wed Jan 07, 2009 1:06 am
by CICS Guy
ram23bal wrote:I have bulk of items to display and I dont want to repeat the display... Is there any conditional diaplays in COBOL...
Nope, but you could 'build' a single line of the displays (conditionally) and then display the correct line......