# Suppressing Line numbers

**URL:** <https://techcommunity.softwareag.com/t/suppressing-line-numbers/97965>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Linux\
**Created:** [August 8, 2011, 3:42pm UTC](https://techcommunity.softwareag.com/t/suppressing-line-numbers/97965 "2011-08-08T15:42:27Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![mwessjoh](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@mwessjoh](https://techcommunity.softwareag.com/u/mwessjoh)\
**Post date:** [August 8, 2011, 3:42pm UTC](https://techcommunity.softwareag.com/t/suppressing-line-numbers/97965/1 "2011-08-08T15:42:27Z")

</div>

Hello,

I want to supress the line numbers in the source code files. What is the best way to convert the old line number files to source code files with no line numbers?

I was thinking of:

1. Using Spod to suppress the line numbers.
2. Using a Skript, which deletes all line numbers.

Is there a better way to do it?

What are the pitfall by suppressing the line numbers?

Regards,  
Markus Wessjohann

---

<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:** [August 9, 2011, 4:58am UTC](https://techcommunity.softwareag.com/t/suppressing-line-numbers/97965/2 "2011-08-09T04:58:45Z")

</div>

Hello Markus,  
How are you?  
.  
By default, Natural on Open Systems saves Line Numbers in the source file (eg. myprog.NSP) even when Line Numbers are toggled off in the Natural editor.  
The default behaviour may be changed via the FTOUCH utility.  
.  
Examples:

1. To suppress the saving of line numbers:  
C:\Program Files\Software AG\Natural\6.3\Bin\ftouch.exe lib=mylib suprln=ON  
NB. You must then re-SAVE the Natural source(s).  
.
2. To enable the saving of line numbers:  
C:\Program Files\Software AG\Natural\6.3\Bin\ftouch.exe lib=mylib suprln=OFF  
.  
Kind regards,  
Peter

---

<div class="post-metadata">

**Author:** ![mwessjoh](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@mwessjoh](https://techcommunity.softwareag.com/u/mwessjoh)\
**Post date:** [August 9, 2011, 11:54am UTC](https://techcommunity.softwareag.com/t/suppressing-line-numbers/97965/3 "2011-08-09T11:54:17Z")

</div>

Hi,

fine thank you.

That I know, but after changing the mode, the line numbers stays in the old source code files. When I stow a module, then the line numbers are suppressed.

I don’t want to stow all modules to suppresse the line numbers, thats why I’m thinking of a skript to do the job directly in filesystem.

Is this OK? Can I touch the files directly?

Best regards,  
Markus Wessjohann

---

<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:** [August 9, 2011, 2:11pm UTC](https://techcommunity.softwareag.com/t/suppressing-line-numbers/97965/4 "2011-08-09T14:11:59Z")

</div>

A simple CATALL should take care of that.

I would strongly discourage messing with source code outside of Natural.

Best regards,

Wolfgang

---

<div class="post-metadata">

**Author:** ![Matthias1](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@Matthias1](https://techcommunity.softwareag.com/u/Matthias1)\
**Post date:** [August 11, 2011, 2:35pm UTC](https://techcommunity.softwareag.com/t/suppressing-line-numbers/97965/5 "2011-08-11T14:35:51Z")

</div>

> [@mwessjoh](#):
>
> What are the pitfall by suppressing the line numbers?

Let me guess: you want to feed svn or some other versioning system with your sources …

---

<div class="post-metadata">

**Author:** ![Weihnachtsbar](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/weihnachtsbar/32/146_2.png) [@Weihnachtsbar](https://techcommunity.softwareag.com/u/Weihnachtsbar)\
**Post date:** [August 16, 2011, 2:53pm UTC](https://techcommunity.softwareag.com/t/suppressing-line-numbers/97965/6 "2011-08-16T14:53:23Z")

</div>

Why not use NaturalOne?

A download to Eclipse will remove all line numbers and takes care of line number references.

---

<div class="post-metadata">

**Author:** ![mwessjoh](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@mwessjoh](https://techcommunity.softwareag.com/u/mwessjoh)\
**Post date:** [August 29, 2011, 2:06pm UTC](https://techcommunity.softwareag.com/t/suppressing-line-numbers/97965/7 "2011-08-29T14:06:26Z")

</div>

Hi,

@Wolfgang Winter: No, it doesn’t work. You must save the files, but after you saved the file you change the source User ID and the Source Date :-(.

@Matthias: Yes, I want directly commit the source code to svn.

@Weihnachtsbär: SPoD is better than NaturalOne.

---

<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:** [August 29, 2011, 2:42pm UTC](https://techcommunity.softwareag.com/t/suppressing-line-numbers/97965/8 "2011-08-29T14:42:00Z")

</div>

> [@mwessjoh](#):
>
> @Wolfgang Winter: No, it doesn’t work. You must save the files, but after you saved the file you change the source User ID and the Source Date :-(.

The default “Action” for CATALL is “Catalog”, did you try to change this to “Save” or “Stow” ?  
“Catalog” will, obviously, not touch the source at all.

---

<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:** [August 29, 2011, 3:59pm UTC](https://techcommunity.softwareag.com/t/suppressing-line-numbers/97965/9 "2011-08-29T15:59:51Z")

</div>

> [@mwessjoh](#):
>
> @Weihnachtsbär: SPoD is better than NaturalOne.

I wouldn’t say one or the other is “better”, they follow different philosophies,  
so while SPoD may fit your purposes better than ONE does it may be just  
the opposite for others 😉

---

<div class="post-metadata">

**Author:** ![mwessjoh](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@mwessjoh](https://techcommunity.softwareag.com/u/mwessjoh)\
**Post date:** [September 5, 2011, 1:37pm UTC](https://techcommunity.softwareag.com/t/suppressing-line-numbers/97965/10 "2011-09-05T13:37:34Z")

</div>

Hi,

I think we are leaving the topic. I will explain it again.  
I want

1. supress all line numbers for new files.
2. supress all line numbers for old files and leaving the source code metadata in the FILEDIR.SAG.

The reason is, I want to check-in and -out from the fuser-directory direktly to the subversion repositry.

New files is OK, but how can I change the old ones, with unchanging the metadata?

Is this with Natual-Tools possible or should I deleting the line numbers by Shell-Skript?

Best regards,  
Markus Wessjohann

---

<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:** [September 8, 2011, 5:09pm UTC](https://techcommunity.softwareag.com/t/suppressing-line-numbers/97965/11 "2011-09-08T17:09:44Z")

</div>

> [@mwessjoh](#):
>
> New files is OK, but how can I change the old ones, with unchanging the metadata?
> 
> Is this with Natual-Tools possible or should I deleting the line numbers by Shell-Skript?

Just like I tried to explain without success, so I’ll try again 😉

1.) ftouch lib=xyz suprln=ON

2.) CATALL and just change Action from Catalog to Save (or Stow). This will remove the linenumbers as all sources will be re-saved and this wil honor the suprln setting.

---

<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:** [September 8, 2011, 5:15pm UTC](https://techcommunity.softwareag.com/t/suppressing-line-numbers/97965/12 "2011-09-08T17:15:17Z")

</div>

For example, I created a new library with the default of suprln=off and then created a small program whose source  
on the file system looks like this:

```auto
0010WRITE *INIT-ID
0020*
0030END
```

I then did the ftouch suprln=ON, catall ‘Save’ and it looks like this afterwards:

```auto
WRITE *INIT-ID
*
END
```

---

<div class="post-metadata">

**Author:** ![Helmut\_Spichtinger](https://avatars.discourse-cdn.com/v4/letter/h/e0b2c6/32.png) [@Helmut\_Spichtinger](https://techcommunity.softwareag.com/u/Helmut_Spichtinger)\
**Post date:** [September 9, 2011, 1:44pm UTC](https://techcommunity.softwareag.com/t/suppressing-line-numbers/97965/13 "2011-09-09T13:44:26Z")

</div>

I’m not very familiar with Natural on Open systems.

Perhaps the Natural utility Object Handler is an option for you.

You can UNLOAD the Natural sources with the options:

SUBSTITUTE : Replaces line references by labels during the unload in Transfer format.  
This option only applies if your source-code line numbers are used for statement references. If so, the line numbers of referenced lines and the line number references are replaced by labels. The sources are not modified in the database.

INCLUDE-LINE-NUMBERS: Transfers line numbers during the unload in Transfer format.  
By default, line numbers in Natural objects are not unloaded.

Then LOAD the sources with the Object Handler in a new library with the default of suprln=off like Wolfgang mentioned. (I don’t know whether this works. As said, I’m not familiar with Natural on Open Systems).

---

<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:** [September 9, 2011, 9:17pm UTC](https://techcommunity.softwareag.com/t/suppressing-line-numbers/97965/14 "2011-09-09T21:17:09Z")

</div>

Besides the fact that it isn’t required to move the sources at all with the method I described above,  
with Natural Studio (or Natural ONE) the easier way (compared to SYSOBJH) would be to simply  
drag-and-drop the sources to a different library and back, in combination with the correct SUPRLN setting.

---

<div class="post-metadata">

**Author:** ![mwessjoh](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@mwessjoh](https://techcommunity.softwareag.com/u/mwessjoh)\
**Post date:** [September 12, 2011, 12:13pm UTC](https://techcommunity.softwareag.com/t/suppressing-line-numbers/97965/15 "2011-09-12T12:13:12Z")

</div>

Hi,

I tried this, but it didn’t work.  
All line numbers are suppressed, but all “Metasourcecodedata” is overwritten  
L \*  
Name Type Lib Source User Source Date  
NUASSHD Copycode NUNIT Macke 2010-02-09 15:39  
NUASSP PDA NUNIT MWESSJOH 2011-09-12 08:19  
NUASSP LDA NUNIT MWESSJOH 2011-09-12 08:19

Now I’m the Source Owner. I don’t want to touch this.  
By the way, you can see, that this method doesn’t work for copycodes.

Best regards,  
Markus Wessjohann

---

<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:** [September 12, 2011, 2:24pm UTC](https://techcommunity.softwareag.com/t/suppressing-line-numbers/97965/16 "2011-09-12T14:24:35Z")

</div>

To keep the metadata simply copy away FILEDIR.SAG before the CATALL and back afterwards,  
but you are right, there’s no way to strip linenumbers from copycodes this way.

There are a number of subroutines in SYSEXT which you can use here, for example USR2019N to  
read and SAVE objects (including copycodes), so this should take care of it, but you still will have  
to push / pop FILEDIR.SAG to keep the “meta data”.

---

<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:** [September 12, 2011, 9:15pm UTC](https://techcommunity.softwareag.com/t/suppressing-line-numbers/97965/17 "2011-09-12T21:15:11Z")

</div>

So, to sum it up I’d propose the following:

- ftouch suprln=on
- copy away FILEDIR.SAG
- use USR4206N to read library directory and USR2019N to re-save without line numbers
- copy back FILEDIR.SAG

---

<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, 3:00pm UTC](https://techcommunity.softwareag.com/t/suppressing-line-numbers/97965/18 "2021-04-02T15:00:42Z")

</div>


