# Hi, This is my first post

**URL:** <https://techcommunity.softwareag.com/t/hi-this-is-my-first-post/75120>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-Code-Samples\
**Created:** [July 30, 2007, 5:46pm UTC](https://techcommunity.softwareag.com/t/hi-this-is-my-first-post/75120 "2007-07-30T17:46:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![bahiste](https://avatars.discourse-cdn.com/v4/letter/b/c2a13f/32.png) [@bahiste](https://techcommunity.softwareag.com/u/bahiste)\
**Post date:** [July 30, 2007, 5:46pm UTC](https://techcommunity.softwareag.com/t/hi-this-is-my-first-post/75120/1 "2007-07-30T17:46:24Z")

</div>

Hi, I registered this forum today. And have a lot of questions. I guess they are so easy for you. My first question ‘How could I use two different display statement in a natural program without calling any other define window or etc. ?’

First Display Statement

Display Name Surname

Second Display Statement

Display Address Age

I tried to write report channel number like following

Display (1) Name Surname

Display (2) Address Age

But it does not work.Could someone help me please…

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [July 30, 2007, 5:54pm UTC](https://techcommunity.softwareag.com/t/hi-this-is-my-first-post/75120/2 "2007-07-30T17:54:13Z")

</div>

> [@bahiste](#):
>
> But it does not work.Could someone help me please…

Can you please be a bit more specific about what “does not work” means ?

Are you receiving an error message ? Which one ?

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [July 30, 2007, 10:14pm UTC](https://techcommunity.softwareag.com/t/hi-this-is-my-first-post/75120/3 "2007-07-30T22:14:29Z")

</div>

You may want to check out the “Natural Basics” forums. This topic [url][http://tech.forums.softwareag.com/viewtopic.php?C=13&t=7269&highlight=natural+report[/url]](http://tech.forums.softwareag.com/viewtopic.php?C=13&t=7269&highlight=natural+report%5B/url%5D) might help you with your questions on DISPLAY statements.

I’m guessing as to what you intended, but would expect the following to be closer to what you want:

```auto

DISPLAY (1) NAME SURNAME
WRITE (1) AGE ADDRESS
```

This puts the second line of information on the same report as the first. There are more complex possibilities for multi-line output with the DISPLAY statement, but they are not as frequently used.

---

<div class="post-metadata">

**Author:** ![bahiste](https://avatars.discourse-cdn.com/v4/letter/b/c2a13f/32.png) [@bahiste](https://techcommunity.softwareag.com/u/bahiste)\
**Post date:** [July 30, 2007, 10:29pm UTC](https://techcommunity.softwareag.com/t/hi-this-is-my-first-post/75120/4 "2007-07-30T22:29:25Z")

</div>

I wrote the problem in a text file with an attachment.  
[Program.txt](https://techcommunity.softwareag.com/uploads/short-url/unerP6j6qCp0umo79VPC7lmOF8L.txt) (765 Bytes)

---

<div class="post-metadata">

**Author:** ![Douglas\_Kelly](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/douglas_kelly/32/102_2.png) [@Douglas\_Kelly](https://techcommunity.softwareag.com/u/Douglas_Kelly)\
**Post date:** [July 30, 2007, 10:50pm UTC](https://techcommunity.softwareag.com/t/hi-this-is-my-first-post/75120/5 "2007-07-30T22:50:45Z")

</div>

Natural doesn’t provide automatic support for “group headings” - you have to put them in yourself.

```auto
DISPLAY Ad Soyad
/** Subsequently
WRITE "Adres" 51t "Age"
/ "-"(50) 51t "---"
WRITE Adres Age
```

(I replaced the second DISPLAY with a WRITE not for any functional reason, but simply a matter of style: it indicates to subsequent maintainers that the line is not generating headings)

One more possibility - not quite what you were asking for, but possibly acceptable:

```auto
DISPLAY AD / ADRES SOYAD / AGE
```

This puts AD and ADRES in the same column and SOYAD, AGE in the next column (the DISPLAY statement is column oriented; the WRITE/PRINT statements are line oriented). Headings will be on top of the column, not in the data report area.

---

<div class="post-metadata">

**Author:** ![Steve\_Robinson](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/steve_robinson/32/107_2.png) [@Steve\_Robinson](https://techcommunity.softwareag.com/u/Steve_Robinson)\
**Post date:** [July 30, 2007, 10:55pm UTC](https://techcommunity.softwareag.com/t/hi-this-is-my-first-post/75120/6 "2007-07-30T22:55:54Z")

</div>

bahiste,

You cannot have Natural create this type of output for you (see code below) unless you generate separate reports. Natural takes its column headers from the physically first DISPLAY statement in a program. Thus, you get the headers Ad and Soyad.

You could use a WRITE statement to generate your Adress and Age headers. Something like:

WRITE 5T ‘Adress’ 40t ‘Age’ / 5t ‘-’ (50) or something like that, the numbers are probably not appropriate to your data.

Then you could WRITE Adress Age.

I will recommend something I mention to all newbies. This is BASIC Natural stuff. You have apparently not had any Natural education, and probably do not have Natural manuals. Tell management you NEED this, because you do.

steve

If we run this program, the output will be like following

```
  Ad Soyad 

```

* * *

Mehmet Duran  
Yuz Street 16

But this output is not suitable for me. I wanna see an output like that.

```
  Ad Soyad 

```

* * *

Mehmet Duran

Adress Age

* * *

Yuz Street 36

---

<div class="post-metadata">

**Author:** ![Jerome\_LeBlanc](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/jerome_leblanc/32/111_2.png) [@Jerome\_LeBlanc](https://techcommunity.softwareag.com/u/Jerome_LeBlanc)\
**Post date:** [July 30, 2007, 11:27pm UTC](https://techcommunity.softwareag.com/t/hi-this-is-my-first-post/75120/7 "2007-07-30T23:27:05Z")

</div>

Here is another possibility using only Display:

```auto
DEFINE DATA LOCAL                          
1 AD (A10) INIT <'Mehmet'>    
1 SOYAD (A15) INIT <'Duran '>    
1 ADDRESS (A50) INIT <'Yuz Street'>
1 AGE (N3) INIT <16>          
END-DEFINE                                 
FOR AGE = 16 TO 20                         
   DISPLAY AD                              
        SOYAD                              
    // ADDRESS                             
        ' '                                
    // '//AGE' AGE                        
   WRITE '-'(75)                           
END                                        
```

I added the FOR loop to show what multiple records would look on a report and the WRITE ‘-’(75) to separate the records. This looks like:

```auto
    AD SOYAD                                       
                                                                             
                                 ADDRESS AGE            
---------- -------------------------------------------------- ----           
                                                                             
Mehmet Duran                                                             
                                                                             
           Yuz Street 16           
---------------------------------------------------------------------------  
Mehmet Duran                                                             
                                                                             
           Yuz Street 17           
---------------------------------------------------------------------------  
Mehmet Duran                                                             
                                                                             
           Yuz Street 18           
---------------------------------------------------------------------------  
```

Something closer to what you want, but much more complex:

```auto
FOR AGE = 16 TO 20                         
   DISPLAY AD                          
      'SOYAD' SOYAD                       
   // 'ADDRESS'                    
    / '-'(50)                      
    / '/' ADDRESS                      
      ' '                                  
   // 'AGE'                        
    / '-'(3)                       
    / '/' AGE (SG=OFF)              
   WRITE '-'(75)                           
END                                        
```

Looks like this when run:

```auto
    AD SOYAD                                       
---------- --------------------------------------------------                
                                                                             
Mehmet Duran                                                             
                                                                             
           ADDRESS AGE            
           -------------------------------------------------- ---            
           Yuz Street 16            
---------------------------------------------------------------------------  
Mehmet Duran                                                             
                                                                             
           ADDRESS AGE            
           -------------------------------------------------- ---            
           Yuz Street 17            
---------------------------------------------------------------------------  
Mehmet Duran                                                             
                                                                             
           ADDRESS AGE            
           -------------------------------------------------- ---            
           Yuz Street 18            
---------------------------------------------------------------------------  
```

If you really want to stretch your skill set, check out WRITE USING FORM.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:48pm UTC](https://techcommunity.softwareag.com/t/hi-this-is-my-first-post/75120/8 "2021-04-02T14:48:36Z")

</div>


