(IS=on) what does it represent?



Software AG's platform-independent programming language with full support for open-source and Internet applications

(IS=on) what does it represent?

Postby diptisaini » Wed Aug 24, 2011 2:49 pm

DISPLAY NOTITLE TRN(IS=ON) MESSAGE-TYPE(IS=ON) ENTITY(IS=ON)

Can anyone tell me what does (IS=ON) represent in above display statement ?
diptisaini
 
Posts: 90
Joined: Sun Mar 14, 2010 5:12 pm
Has thanked: 0 time
Been thanked: 0 time

Re: (IS=on) what does it represent?

Postby RGZbrog » Wed Aug 24, 2011 8:49 pm

This is documented in the Parameter Reference manual.
With this session parameter, you can suppress the printing of identical information in successive lines created by a WRITE or DISPLAY statement.

So, in a columnar report, you can eliminate repeated values.

A simple program will demonstrate what it does.

Without IS (defaults to OFF/False), note that "ADKINSON" is repeated.:
DEFINE DATA LOCAL
1 EMP    VIEW EMPLOYEES
  2 NAME
  2 FIRST-NAME
END-DEFINE
READ EMP BY NAME
  DISPLAY NAME
          FIRST-NAME
END-READ
END

Page     1                                                   08/24/11  08:10:13
 
        NAME              FIRST-NAME
-------------------- --------------------
 
ABELLAN              KEPA
ACHIESON             ROBERT
ADAM                 SIMONE
ADKINSON             JEFF
ADKINSON             PHYLLIS
ADKINSON             HAZEL
ADKINSON             DAVID
ADKINSON             CHARLIE
ADKINSON             MARTHA
ADKINSON             TIMMIE
ADKINSON             BOB
AECKERLE             SUSANNE
AFANASSIEV           PHILIP
AFANASSIEV           ROSE
AHL                  FLEMMING
AKROYD               ELIZABETH
ALEMAN               SARA
ALESTIA              GORKA
ALEXANDER            PHIL


With IS=ON or True, names are not repeated:
DEFINE DATA LOCAL
1 EMP    VIEW EMPLOYEES
  2 NAME
  2 FIRST-NAME
END-DEFINE
READ EMP BY NAME
  DISPLAY NAME (IS=T)
          FIRST-NAME
END-READ
END

Page     1                                                   08/24/11  08:11:29
 
        NAME              FIRST-NAME
-------------------- --------------------
 
ABELLAN              KEPA
ACHIESON             ROBERT
ADAM                 SIMONE
ADKINSON             JEFF
                     PHYLLIS
                     HAZEL
                     DAVID
                     CHARLIE
                     MARTHA
                     TIMMIE
                     BOB
AECKERLE             SUSANNE
AFANASSIEV           PHILIP
                     ROSE
AHL                  FLEMMING
AKROYD               ELIZABETH
ALEMAN               SARA
ALESTIA              GORKA
ALEXANDER            PHIL
User avatar
RGZbrog
 
Posts: 101
Joined: Mon Nov 23, 2009 1:34 pm
Location: California, USA
Has thanked: 0 time
Been thanked: 0 time


Return to Natural